Quellcode durchsuchen

Merge branch 'master' of https://github.com/hdima/python-syntax

Peter Adrichem vor 9 Jahren
Ursprung
Commit
c42cdfa665
3 geänderte Dateien mit 73 neuen und 7 gelöschten Zeilen
  1. 1
    1
      README.rst
  2. 65
    0
      syntax.txt
  3. 7
    6
      syntax/python.vim

+ 1
- 1
README.rst Datei anzeigen

@@ -81,7 +81,7 @@ Option and commands to select Python version
81 81
 
82 82
 ``python_version_2``
83 83
   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``
85 85
   variable.
86 86
 
87 87
 The following local to buffer commands can be used to switch between two

+ 65
- 0
syntax.txt Datei anzeigen

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

+ 7
- 6
syntax/python.vim Datei anzeigen

@@ -1,10 +1,11 @@
1 1
 " 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
8 9
 "
9 10
 " Based on python.vim (from Vim 6.1 distribution)
10 11
 " by Neil Schemenauer <nas at python dot ca>