Minor documentation update

This commit is contained in:
nfnty
2017-02-16 22:06:25 +01:00
parent 621b04a937
commit 6d231116fa
2 changed files with 19 additions and 17 deletions

View File

@@ -44,38 +44,40 @@ Or you can just manually place `syntax/python.vim
<https://github.com/vim-python/python-syntax/blob/master/syntax/python.vim>`_ <https://github.com/vim-python/python-syntax/blob/master/syntax/python.vim>`_
into ``~/.config/nvim/syntax/`` or ``~/.vim/syntax/``. into ``~/.config/nvim/syntax/`` or ``~/.vim/syntax/``.
Script options Configuration
-------------- --------------
Enable option with:: Enable option with::
let OPTION_NAME = 1 let VARIABLE = 1
Disable option with:: Disable option with::
let OPTION_NAME = 0 let VARIABLE = 0
For example to enable all syntax highlighting features you can place the For example to enable all syntax highlighting features you can add the
following command in your ``~/.config/nvim/init.vim`` or ``~/.vimrc`` script:: following command to your ``~/.config/nvim/init.vim`` or ``~/.vimrc``::
let g:python_highlight_all = 1 let g:python_highlight_all = 1
Options and commands to select Python version Select Python version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
Variables:
``g:python_version_2`` or ``b:python_version_2`` ``g:python_version_2`` or ``b: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). default).
The following commands can be used to switch between modes: Commands to easily switch between modes:
``Python2Syntax`` ``Python2Syntax``
Switch to Python 2 Switch to Python 2
``Python3Syntax`` ``Python3Syntax``
Switch to Python 3 Switch to Python 3
Other options Option variables
~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
``g:python_highlight_builtins`` ``g:python_highlight_builtins``
Highlight builtin functions and objects Highlight builtin functions and objects

View File

@@ -35,25 +35,25 @@ Configuration *python-syntax-configuration
Enable option with: > Enable option with: >
let OPTION_NAME = 1 let VARIABLE = 1
< <
Disable option with: > Disable option with: >
let OPTION_NAME = 0 let VARIABLE = 0
< <
For example to enable all syntax highlighting features you can place the For example to enable all syntax highlighting features you can add the
following command in your `~/.config/nvim/init.vim` or `~/.vimrc` script: > following command to your `~/.config/nvim/init.vim` or `~/.vimrc`: >
let g:python_highlight_all = 1 let g:python_highlight_all = 1
< <
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Options and commands to select Python version *python-syntax-version* Select Python version *python-syntax-version*
`g:python_version_2` or `b:python_version_2` `g:python_version_2` or `b: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). default).
The following commands can be used to switch between modes: Commands to easily switch between modes:
`Python2Syntax` `Python2Syntax`
Switch to Python 2 Switch to Python 2
@@ -61,7 +61,7 @@ The following commands can be used to switch between modes:
Switch to Python 3 Switch to Python 3
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Options *python-syntax-options* Option variables *python-syntax-options* *python-syntax-variables*
`g:python_highlight_builtins` `g:python_highlight_builtins`
Highlight builtin functions and objects Highlight builtin functions and objects