美文网首页
linux vim python语法高亮

linux vim python语法高亮

作者: 星际探索者 | 来源:发表于2020-04-07 15:40 被阅读0次

1、vim ~/.vimrc,将下列内容复制进去
set nocompatible
set number
filetype on
set history=1000
set background=dark
syntax on
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set showmatch
set guioptions-=T
set vb t_vb=
set ruler
set nohls
set incsearch
if has("vms")
set nobackup
else
set backup
endif

2、取消let python_highlight_all = 1在/usr/share/vim/vim74/syntax/python.vim前的引号
,添加下列行到该文件
syn keyword pythonBuiltin reversed sorted sum self
syn match pythonOper "=/|+/|-/|*/|{/|}/|[/|]/|(/|)/|/./|,"

相关文章

网友评论

      本文标题:linux vim python语法高亮

      本文链接:https://www.haomeiwen.com/subject/vadnphtx.html