1. 安装vim:
# apt-get install -y vim-gnome
2. 安装ctags,ctags用于支持taglist
# apt-get install ctags
3. 安装taglist
# apt-get install vim-scripts vim-addon-manager
# vim-addons install taglist
4. 安装pydiction 实现代码补全:
#wget https://www.vim.org/scripts/script.php"https://www.vim.org/scripts/script.php" rel="external nofollow" >https://www.vim.org/scripts/script.php"https://www.vim.org/scripts/script.php" rel="external nofollow" >https://www.vim.org/scripts/script.php"生成taglist帮助文件列表。
: help taglist.txt “查看taglist帮助信息。
8. 安装vim plug:
# mkdir ~/.vim/autoload/
# cd ~/.vim/autoload/
# wget https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
配置vim plug:
#vim /root/.vimrc call plug#begin('~/.vim/autoload') Plug 'Valloric/YouCompleteMe' call plug#end() #vim /root/.vimrc filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/vundle call vundle#begin() " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' Plugin 'vim-scripts/indentpython.vim' Bundle 'Valloric/YouCompleteMe' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required call plug#begin('~/.vim/autoload') Plug 'Valloric/YouCompleteMe' call plug#end() set nocompatible "关闭与vi的兼容模式 set number "显示行号 set nowrap "不自动折行 set showmatch "显示匹配的括号 set scrolloff=3 "距离顶部和底部3行" set encoding=utf-8 "编码 set fenc=utf-8 "编码 "set mouse=a "启用鼠标 set hlsearch "搜索高亮 syntax on "语法高亮 set helplang=cn set encoding=utf-8 "au BufNewFile,BufRead *.py set tabstop=4 set softtabstop=4 set shiftwidth=4 set textwidth=79 set expandtab set autoindent set fileformat=unix set foldmethod=indent set autoindent " 实现自动缩进 set foldmethod=indent set shiftwidth=4 set expandtab set number "Flagging Unnecessary Whitespace highlight BadWhitespace ctermbg=red guibg=darkred let Tlist_Auto_Highlight_Tag=1 let Tlist_Auto_Open=1 let Tlist_Auto_Update=1 let Tlist_Display_Tag_Scope=1 let Tlist_Exit_OnlyWindow=1 let Tlist_Enable_Dold_Column=1 let Tlist_File_Fold_Auto_Close=1 let Tlist_Show_One_File=1 let Tlist_Use_Right_Window=1 let Tlist_Use_SingleClick=1 filetype plugin on let g:pydiction_location = '/usr/share/vim/vim74/pydiction/complete-dict' let g:pydiction_menu_height = 20 autocmd FileType python set omnifunc=pythoncomplete#Complete let Tlist_Show_One_File = 1 "不同时显示多个文件的tag,只显示当前文件的 let Tlist_Exit_OnlyWindow = 1 "如果 taglist 窗口是最后一个窗口,则退出 vim let Tlist_Use_Right_Window = 1 "在右侧窗口中显示 taglist 窗口 "let Tlist_Auto_Open=1 "在启动 vim 后,自动打开 taglist 窗口 "let Tlist_File_Fold_Auto_Close=1 "只显示当前文件 tag,其它文件的tag折叠 let Tlist_Auto_Highlight_Tag=1 let Tlist_Auto_Open=1 let Tlist_Auto_Update=1 let Tlist_Display_Tag_Scope=1 let Tlist_Exit_OnlyWindow=1 let Tlist_Enable_Dold_Column=1 let Tlist_File_Fold_Auto_Close=1 let Tlist_Show_One_File=1 let Tlist_Use_Right_Window=1 let Tlist_Use_SingleClick=1 nnoremap <silent> <F8> :TlistToggle<CR> filetype plugin on autocmd FileType python set omnifunc=pythoncomplete#Complete autocmd FileType javascrīpt set omnifunc=javascriptcomplete#CompleteJS autocmd FileType html set omnifunc=htmlcomplete#CompleteTags autocmd FileType css set omnifunc=csscomplete#CompleteCSS autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags autocmd FileType php set omnifunc=phpcomplete#CompletePHP autocmd FileType c set omnifunc=ccomplete#Complete autocmd FileType python set omnifunc=pythoncomplete#Complete
插件安装:
切换到命令行模式,依次输入
PlugStatus
PlugInstall
就可以安装插件了
使用vim plug可以方便的管理插件
查看插件类型:
:PlugStatus
安装插件:
:PlugInstall
更新插件::PlugUpdate
vim-plug本身更新::PlugUpgrade
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
更新日志
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]