python-syntax


Ⅰ. 插件描述

Python syntax highlighting script for Vim

Ⅱ. 基本信息

创建日期:  2015-04-16
使用用户:  55
Github星:  34
插件作者:  Rémi Casanova

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'kh3phr3n/python-syntax-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'kh3phr3n/python-syntax-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'kh3phr3n/python-syntax-come-back-be-here'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/kh3phr3n/python-syntax

Ⅳ. 文档说明

# Python syntax highlighting script for Vim

Enhanced version of the original Python syntax highlighting script.
Based on python.vim from Vim 7.4 distribution by Zvezdan Petkovic.

python-syntax

Features

Changes from the original python.vim are:

  • [OFF] Highlight self, cls keywords
  • [ON] Highlight class, function parameters
  • [ON] Highlight standard operators: ~,!,^,&,|,*,/,%,+,-
  • [ON] Highlight pseudo operators: -=,//=,*=,&=,%=,+=,!=
  • 3 extras options:

    • let python_self_cls_highlight = 1
    • let python_no_operator_highlight = 1
    • let python_no_parameter_highlight = 1
  • All the options can be switched on together (recommended).

    • let python_highlight_all = 1

Color Scheme

  • Vim keywords:

    • pythonRepeat pythonConditional pythonInclude pythonTodo pythonComment pythonStatement
    • pythonEscape pythonSpaceError pythonException pythonExceptions pythonDoctest pythonDoctestValue
    • pythonNumber pythonString pythonRawString pythonBuiltin pythonFunction pythonClass pythonDecorator
    • pythonSelf pythonConstant pythonBrackets pythonOperator pythonExtraOperator pythonExtraPseudoOperator pythonClassParameters pythonFunctionParameters

How to install

The easiest installation method is to place syntax/python.vim script into your ~/.vim/syntax/ directory.
You can also use Pathogen or Vundle plugin managers in which case you can install the whole kh3phr3n/python-syntax
repository into the corresponding plugins directory.

Informations

This plugin is strongly inspired by:

Contributors

添加新评论