|
@@ -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:
|