mirror of
https://github.com/vim-python/python-syntax.git
synced 2025-12-12 07:31:51 +08:00
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:
@@ -88,8 +88,8 @@ endif
|
|||||||
"
|
"
|
||||||
" Commands
|
" Commands
|
||||||
"
|
"
|
||||||
command! -buffer Python2Syntax let b:python_version_2 = 1 | 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 | if exists("g:syntax_on") | syn off | endif | syn enable
|
command! -buffer Python3Syntax let b:python_version_2 = 0 | let &syntax=&syntax
|
||||||
|
|
||||||
" Enable option if it's not defined
|
" Enable option if it's not defined
|
||||||
function! s:EnableByDefault(name)
|
function! s:EnableByDefault(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user