Reload local syntax only

Turning syntax off and back on is more than what's necessary to reload the syntax for the current buffer.
This commit is contained in:
Will Gray
2013-06-01 14:53:27 -05:00
parent e344f212b6
commit fc6a66bf80

View File

@@ -88,8 +88,8 @@ endif
"
" Commands
"
command! -buffer Python2Syntax let b:python_version_2 = 1 | if exists("g:syntax_on") | syn off | endif | syn enable
command! -buffer Python3Syntax let b:python_version_2 = 0 | if exists("g:syntax_on") | syn off | endif | syn enable
command! -buffer Python2Syntax let b:python_version_2 = 1 | let &syntax=&syntax
command! -buffer Python3Syntax let b:python_version_2 = 0 | let &syntax=&syntax
" Enable option if it's not defined
function! s:EnableByDefault(name)