Skip to content

Commit 44f1855

Browse files
committed
Update python.vim header
1 parent 716ded1 commit 44f1855

File tree

3 files changed

+73
-7
lines changed

3 files changed

+73
-7
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Option and commands to select Python version
8181

8282
``python_version_2``
8383
Enable highlighting for Python 2 (Python 3 highlighting is enabled by
84-
default). Can also be set as a local to buffer ``b:python_version_2``
84+
default). Also can be set as a local to buffer ``b:python_version_2``
8585
variable.
8686

8787
The following local to buffer commands can be used to switch between two

syntax.txt

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
PYTHON *python.vim* *ft-python-syntax*
2+
3+
There are two commands to enable or disable an option for python.vim
4+
5+
Enable option: >
6+
:let option_name = 1
7+
<
8+
Disable option: >
9+
:let option_name = 0
10+
<
11+
For example to enable all syntax highlighting features you can place the
12+
following command in your `~/.vimrc` script: >
13+
14+
let python_highlight_all = 1
15+
<
16+
Option and commands to select Python version: >
17+
18+
:let python_version_2 = 1
19+
<
20+
Enable highlighting for Python 2 (Python 3 highlighting is enabled by
21+
default). Also can be set as a local to buffer `b:python_version_2`
22+
variable.
23+
24+
The following local to buffer commands can be used to switch between two
25+
highlighting modes:
26+
27+
Switch to Python 2 highlighting mode >
28+
:Python2Syntax
29+
<
30+
Switch to Python 3 highlighting mode >
31+
:Python3Syntax
32+
<
33+
Options used by the script
34+
35+
Highlight builtin functions and objects >
36+
:let python_highlight_builtins = 1
37+
< Highlight builtin objects only >
38+
:let python_highlight_builtin_objs = 1
39+
< Highlight builtin functions only >
40+
:let python_highlight_builtin_funcs = 1
41+
< Highlight standard exceptions >
42+
:let python_highlight_exceptions = 1
43+
< Highlight `%` string formatting >
44+
:let python_highlight_string_formatting = 1
45+
< Highlight syntax of `str.format` syntax >
46+
:let python_highlight_string_format = 1
47+
< Highlight syntax of `string.Template` >
48+
:let python_highlight_string_templates = 1
49+
< Highlight indentation errors >
50+
:let python_highlight_indent_errors = 1
51+
< Highlight trailing spaces >
52+
:let python_highlight_space_errors = 1
53+
< Highlight doc-tests >
54+
:let python_highlight_doctests = 1
55+
< Highlight `print` statement as function for Python 2 >
56+
:let python_print_as_function = 1
57+
< Highlight shebang and coding headers as comments >
58+
:let python_highlight_file_headers_as_comments = 1
59+
< Enable all the options above. NOTE: This option don't override any
60+
previously set options >
61+
:let python_highlight_all = 1
62+
< Can be set to 0 for slow machines >
63+
:let python_slow_sync = 1
64+
<
65+
vim:tw=78:sw=4:ts=8:ft=help:norl:

syntax/python.vim

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
" Vim syntax file
2-
" Language: Python
3-
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
4-
" URL: https://github.com/hdima/python-syntax
5-
" Last Change: 2014-12-27
6-
" Filenames: *.py
7-
" Version: 3.3.7
2+
" Language: Python
3+
" Current Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
4+
" Previous Maintainer: Neil Schemenauer <nas at python dot ca>
5+
" URL: https://github.com/hdima/python-syntax
6+
" Last Change: 2015-03-30
7+
" Filenames: *.py
8+
" Version: 3.3.7
89
"
910
" Based on python.vim (from Vim 6.1 distribution)
1011
" by Neil Schemenauer <nas at python dot ca>

0 commit comments

Comments
 (0)