mirror of
https://github.com/vim-python/python-syntax.git
synced 2025-12-08 21:54:48 +08:00
Fix behaviour of b:python_version_2 variable
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
Revision 3.3.2 (2013-06-01):
|
||||||
|
|
||||||
|
- Fixed behaviour of b:python_version_2 variable. Reported by Will Gray.
|
||||||
|
|
||||||
Revision 3.3.1 (2013-05-12):
|
Revision 3.3.1 (2013-05-12):
|
||||||
|
|
||||||
- The script was moved to its own repository at
|
- The script was moved to its own repository at
|
||||||
|
|||||||
@@ -133,3 +133,4 @@ Contributors
|
|||||||
- Andrea Riciputi
|
- Andrea Riciputi
|
||||||
- Anton Butanaev
|
- Anton Butanaev
|
||||||
- Marc Weber
|
- Marc Weber
|
||||||
|
- Will Gray
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
" Language: Python
|
" Language: Python
|
||||||
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
||||||
" URL: https://github.com/hdima/python-syntax
|
" URL: https://github.com/hdima/python-syntax
|
||||||
" Last Change: 2013-05-12
|
" Last Change: 2013-06-01
|
||||||
" Filenames: *.py
|
" Filenames: *.py
|
||||||
" Version: 3.3.1
|
" Version: 3.3.2
|
||||||
"
|
"
|
||||||
" Based on python.vim (from Vim 6.1 distribution)
|
" Based on python.vim (from Vim 6.1 distribution)
|
||||||
" by Neil Schemenauer <nas at python dot ca>
|
" by Neil Schemenauer <nas at python dot ca>
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
" Andrea Riciputi
|
" Andrea Riciputi
|
||||||
" Anton Butanaev
|
" Anton Butanaev
|
||||||
" Marc Weber
|
" Marc Weber
|
||||||
|
" Will Gray
|
||||||
"
|
"
|
||||||
" Options
|
" Options
|
||||||
" =======
|
" =======
|
||||||
@@ -99,12 +100,15 @@ endfunction
|
|||||||
|
|
||||||
" Check if option is enabled
|
" Check if option is enabled
|
||||||
function! s:Enabled(name)
|
function! s:Enabled(name)
|
||||||
return exists(a:name) && {a:name} != 0
|
return exists(a:name) && {a:name}
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Is it Python 2 syntax?
|
" Is it Python 2 syntax?
|
||||||
function! s:Python2Syntax()
|
function! s:Python2Syntax()
|
||||||
return s:Enabled("b:python_version_2") || s:Enabled("g:python_version_2")
|
if exists("b:python_version_2")
|
||||||
|
return b:python_version_2
|
||||||
|
endif
|
||||||
|
return s:Enabled("g:python_version_2")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user