mirror of
https://github.com/gryf/python-syntax.git
synced 2025-12-19 20:38:07 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f6f10ff54 | ||
|
|
a0d21acc1c | ||
|
|
ebbdd093b7 | ||
|
|
fc6a66bf80 |
@@ -1,3 +1,11 @@
|
|||||||
|
Revision 3.3.4 (2013-08-11):
|
||||||
|
|
||||||
|
- Highlight True and False as booleans. Patch by Yuri Habrusiev.
|
||||||
|
|
||||||
|
Revision 3.3.3 (2013-06-02):
|
||||||
|
|
||||||
|
- More lightweight syntax reloading. Patch by Will Gray.
|
||||||
|
|
||||||
Revision 3.3.2 (2013-06-01):
|
Revision 3.3.2 (2013-06-01):
|
||||||
|
|
||||||
- Fixed behaviour of b:python_version_2 variable. Reported by Will Gray.
|
- Fixed behaviour of b:python_version_2 variable. Reported by Will Gray.
|
||||||
|
|||||||
11
README.rst
11
README.rst
@@ -126,11 +126,14 @@ Options used by the script
|
|||||||
Contributors
|
Contributors
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- Jeroen Ruigrok van der Werven
|
List of the contributors in alphabetical order:
|
||||||
- Pedro Algarvio
|
|
||||||
- John Eikenberry
|
|
||||||
- Caleb Adamantine
|
|
||||||
- Andrea Riciputi
|
- Andrea Riciputi
|
||||||
- Anton Butanaev
|
- Anton Butanaev
|
||||||
|
- Caleb Adamantine
|
||||||
|
- Jeroen Ruigrok van der Werven
|
||||||
|
- John Eikenberry
|
||||||
- Marc Weber
|
- Marc Weber
|
||||||
|
- Pedro Algarvio
|
||||||
- Will Gray
|
- Will Gray
|
||||||
|
- Yuri Habrusiev
|
||||||
|
|||||||
@@ -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-06-01
|
" Last Change: 2013-08-11
|
||||||
" Filenames: *.py
|
" Filenames: *.py
|
||||||
" Version: 3.3.2
|
" Version: 3.3.4
|
||||||
"
|
"
|
||||||
" 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>
|
||||||
@@ -20,14 +20,17 @@
|
|||||||
" Contributors
|
" Contributors
|
||||||
" ============
|
" ============
|
||||||
"
|
"
|
||||||
" Jeroen Ruigrok van der Werven
|
" List of the contributors in alphabetical order:
|
||||||
" Pedro Algarvio
|
"
|
||||||
" John Eikenberry
|
|
||||||
" Caleb Adamantine
|
|
||||||
" Andrea Riciputi
|
" Andrea Riciputi
|
||||||
" Anton Butanaev
|
" Anton Butanaev
|
||||||
|
" Caleb Adamantine
|
||||||
|
" Jeroen Ruigrok van der Werven
|
||||||
|
" John Eikenberry
|
||||||
" Marc Weber
|
" Marc Weber
|
||||||
|
" Pedro Algarvio
|
||||||
" Will Gray
|
" Will Gray
|
||||||
|
" Yuri Habrusiev
|
||||||
"
|
"
|
||||||
" Options
|
" Options
|
||||||
" =======
|
" =======
|
||||||
@@ -88,8 +91,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)
|
||||||
@@ -157,7 +160,8 @@ if s:Python2Syntax()
|
|||||||
syn keyword pythonPreCondit as
|
syn keyword pythonPreCondit as
|
||||||
syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained
|
syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained
|
||||||
else
|
else
|
||||||
syn keyword pythonStatement as nonlocal False None True
|
syn keyword pythonStatement as nonlocal None
|
||||||
|
syn keyword pythonBoolean True False
|
||||||
syn match pythonFunction "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
syn match pythonFunction "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -368,7 +372,8 @@ syn match pythonFloat "\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=" display
|
|||||||
|
|
||||||
if s:Enabled("g:python_highlight_builtin_objs")
|
if s:Enabled("g:python_highlight_builtin_objs")
|
||||||
if s:Python2Syntax()
|
if s:Python2Syntax()
|
||||||
syn keyword pythonBuiltinObj True False None
|
syn keyword pythonBuiltinObj None
|
||||||
|
syn keyword pythonBoolean True False
|
||||||
endif
|
endif
|
||||||
syn keyword pythonBuiltinObj Ellipsis NotImplemented
|
syn keyword pythonBuiltinObj Ellipsis NotImplemented
|
||||||
syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
|
syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
|
||||||
@@ -521,6 +526,8 @@ if version >= 508 || !exists("did_python_syn_inits")
|
|||||||
HiLink pythonHexError Error
|
HiLink pythonHexError Error
|
||||||
HiLink pythonBinError Error
|
HiLink pythonBinError Error
|
||||||
|
|
||||||
|
HiLink pythonBoolean Boolean
|
||||||
|
|
||||||
HiLink pythonBuiltinObj Structure
|
HiLink pythonBuiltinObj Structure
|
||||||
HiLink pythonBuiltinFunc Function
|
HiLink pythonBuiltinFunc Function
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user