DIY vim编辑神器

1.安装nerd tree
1)安装pathogen
step 1: cd mkdir ~/.vim
step 2: mkdir -p autoload bundle
step 3: 从 https://github.com/tpope/vim-pathogen中下载vim-pathogen
step 4: cd vim-pathogen目录,cp autoload/pathogen.vim ~/.vim/autoload
step 5: 编辑~/.vimrc文件,输入:execute pathogen#infect().然后保存


2)安装nerdtree
step 1: git clone https:github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
step 2: 编辑~/.vimrc文件,添加切换方式:map :NERDTreeToggle
step 3: 设置nerdtree窗口大小:在~/.vimrc文件中添加:let g:NERDTreeWinSize=25


2.自动补全
step1:从https://bitbucket.org/ns9tks/vim-autocomplpop/get/tip.zip下载vim_autocomplpop.zip文件,讲其解压在autocomplpop文件中
step2:从http://www.vim.org/scripts/script.php?script_id=3252 下载vim-l9.zip文件,将其解压在l9文件中
step3:讲autocomplpop,l9复制到~/.vim/bundle中


3.python的代码补全&语法提示功能
参考:https://github.com/rkulla/pydiction
step1: cd ~/.vim/bundle
step2: git clone https:// github.com/rkulla/pydiction.git
step3:配置~/.vimrc:
filetype plugin on

let g:pydiction_location = '/home/user/.vim/bundle/pydiction/complete-dict

let g:pydiction_menu_height = 3


4.搜索结果高亮显示
配置vimrc:
set hlsearch
:nnoremap :nohlsearch:echo


5.taglist安装

step1:安装用于支持taglist的ctags: apt-get install ctags
step2:安装vim插件管理器vim-addon-manager:apt-apt install vim-scripts
step3: vim-addons install taglist


6.代码折叠
step1:cp python_fold.vim ~/.vim/plugin
step2:vimrc配置:set nofoldenable


vimrc文件:

"setting pathogen-vim 
execute pathogen#infect()
filetype plugin indent on

"setting nerdtree
map  :NERDTreeToggle
let g:NERDTreeWinPos="left"
let g:NERDTreeWinSize=18
let g:NERDTreeShowLineNumbers=1

"setting pydiction
filetype plugin on
let g:pydiction_location = '~/.vim/bundle/pydiction/complete-dict'
let g:pydiction_menu_height = 3

"setting highlight
set hlsearch
:nnoremap   :nohlsearch:echo

"setting taglist
let Tlist_Auto_Highlight_Tag=1  
let Tlist_Auto_Open=0 
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=0  
let Tlist_Use_Right_Window=1  
let Tlist_Use_SingleClick=1  
:nnoremap   :TlistToggle

"setting python code folding
set nofoldenable

"setting bufferexploer
let g:miniBufExplMaxSize = 2

"basic setting
syntax on
filetype indent on
set autoindent
set smartindent
set tabstop=4  
set sw=4   
set number

set nowrap
set cursorline
set ruler


你可能感兴趣的:(Environment,Configuration)