ubuntu怎么给vim添加python支持

ubuntu怎么给vim添加python支持,第1张

如未安装vim,使用下面命令安装:

[python] view plain copy

sudo apt-get install vim

在用户目录下创建.vim目录,其下创建bundle目录:

[python] view plain copy

mkdir .vim\bundle

安装Bundle/Vundle:

[python] view plain copy

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

创建或编辑用户目录下的.vimrc文件,添加如下内容:

[python] view plain copy

set nocompatible

set rtp+=~/.vim/bundle/vundle/

call vundle#rc()

" let Vundle manage Vundle

" required!

Bundle 'gmarik/vundle'

" The bundles you install will be listed here

Bundle 'scrooloose/nerdtree'

Bundle 'davidhalter/jedi-vim'

filetype plugin indent on

" The rest of your config follows here.

augroup vimrc_autocmds

autocmd!

" highlight characters past column 120

autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black

autocmd FileType python match Excess /\%120v.*/

autocmd FileType python set nowrap

augroup END

" NerdTree Shortcut.

map <f2>:NERDTreeToggle<cr>

" automatically change window’s cwd to file’s dir

set autochdir

" Prefer spaces to tabs

set tabstop=4

set shiftwidth=4

set expandtab

set nu!

打开vim,键入命令“:BundleInstall”,等待自动安装插件完成(下面显示“done”)

在vim中键入命令“:BundleList”可以查看安装的插件。

很简单,比如说你要添加新语法

ftplugin中有很多语法文件夹,你随便复制一个.比如说是C复制出来后.编译c.xpt.vim把不需要的内容全部删除,然后改成汇编语法,一般来说8086需要自动补全的地方不多..楼主应该是用WIN32汇编吧..

很多伪指令像.if你可以自行添加

但是关键不成功的原因有可能是_VIMRC中的配置有问题.建议清空后测试,本人亲测成功!

我也是测试了几个日日夜夜.所有的代码文件全看过了..发现还是这个方法.但是一开始没有成功 .主要原因是因为_VIMRC的问题


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11570108.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-17
下一篇2023-05-17

发表评论

登录后才能评论

评论列表(0条)

    保存