mirror of
https://github.com/vim-python/python-syntax.git
synced 2025-12-08 21:54:48 +08:00
Update python.vim header
This commit is contained in:
@@ -81,7 +81,7 @@ Option and commands to select Python version
|
|||||||
|
|
||||||
``python_version_2``
|
``python_version_2``
|
||||||
Enable highlighting for Python 2 (Python 3 highlighting is enabled by
|
Enable highlighting for Python 2 (Python 3 highlighting is enabled by
|
||||||
default). Can also be set as a local to buffer ``b:python_version_2``
|
default). Also can be set as a local to buffer ``b:python_version_2``
|
||||||
variable.
|
variable.
|
||||||
|
|
||||||
The following local to buffer commands can be used to switch between two
|
The following local to buffer commands can be used to switch between two
|
||||||
|
|||||||
65
syntax.txt
Normal file
65
syntax.txt
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
PYTHON *python.vim* *ft-python-syntax*
|
||||||
|
|
||||||
|
There are two commands to enable or disable an option for python.vim
|
||||||
|
|
||||||
|
Enable option: >
|
||||||
|
:let option_name = 1
|
||||||
|
<
|
||||||
|
Disable option: >
|
||||||
|
:let option_name = 0
|
||||||
|
<
|
||||||
|
For example to enable all syntax highlighting features you can place the
|
||||||
|
following command in your `~/.vimrc` script: >
|
||||||
|
|
||||||
|
let python_highlight_all = 1
|
||||||
|
<
|
||||||
|
Option and commands to select Python version: >
|
||||||
|
|
||||||
|
:let python_version_2 = 1
|
||||||
|
<
|
||||||
|
Enable highlighting for Python 2 (Python 3 highlighting is enabled by
|
||||||
|
default). Also can be set as a local to buffer `b:python_version_2`
|
||||||
|
variable.
|
||||||
|
|
||||||
|
The following local to buffer commands can be used to switch between two
|
||||||
|
highlighting modes:
|
||||||
|
|
||||||
|
Switch to Python 2 highlighting mode >
|
||||||
|
:Python2Syntax
|
||||||
|
<
|
||||||
|
Switch to Python 3 highlighting mode >
|
||||||
|
:Python3Syntax
|
||||||
|
<
|
||||||
|
Options used by the script
|
||||||
|
|
||||||
|
Highlight builtin functions and objects >
|
||||||
|
:let python_highlight_builtins = 1
|
||||||
|
< Highlight builtin objects only >
|
||||||
|
:let python_highlight_builtin_objs = 1
|
||||||
|
< Highlight builtin functions only >
|
||||||
|
:let python_highlight_builtin_funcs = 1
|
||||||
|
< Highlight standard exceptions >
|
||||||
|
:let python_highlight_exceptions = 1
|
||||||
|
< Highlight `%` string formatting >
|
||||||
|
:let python_highlight_string_formatting = 1
|
||||||
|
< Highlight syntax of `str.format` syntax >
|
||||||
|
:let python_highlight_string_format = 1
|
||||||
|
< Highlight syntax of `string.Template` >
|
||||||
|
:let python_highlight_string_templates = 1
|
||||||
|
< Highlight indentation errors >
|
||||||
|
:let python_highlight_indent_errors = 1
|
||||||
|
< Highlight trailing spaces >
|
||||||
|
:let python_highlight_space_errors = 1
|
||||||
|
< Highlight doc-tests >
|
||||||
|
:let python_highlight_doctests = 1
|
||||||
|
< Highlight `print` statement as function for Python 2 >
|
||||||
|
:let python_print_as_function = 1
|
||||||
|
< Highlight shebang and coding headers as comments >
|
||||||
|
:let python_highlight_file_headers_as_comments = 1
|
||||||
|
< Enable all the options above. NOTE: This option don't override any
|
||||||
|
previously set options >
|
||||||
|
:let python_highlight_all = 1
|
||||||
|
< Can be set to 0 for slow machines >
|
||||||
|
:let python_slow_sync = 1
|
||||||
|
<
|
||||||
|
vim:tw=78:sw=4:ts=8:ft=help:norl:
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Python
|
" Language: Python
|
||||||
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
" Current Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
||||||
" URL: https://github.com/hdima/python-syntax
|
" Previous Maintainer: Neil Schemenauer <nas at python dot ca>
|
||||||
" Last Change: 2014-12-27
|
" URL: https://github.com/hdima/python-syntax
|
||||||
" Filenames: *.py
|
" Last Change: 2015-03-30
|
||||||
" Version: 3.3.7
|
" Filenames: *.py
|
||||||
|
" Version: 3.3.7
|
||||||
"
|
"
|
||||||
" 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>
|
||||||
|
|||||||
Reference in New Issue
Block a user