目前用linux 感觉十分给(装)力(逼)
【包管理工具】
https://github.com/tpope/vim-pathogen
【TAB自动补全】
https://github.com/ervandew/supertab
【补全括号】
https://github.com/jiangmiao/auto-pairs
【左侧导航】
https://github.com/scrooloose/nerdtree
【整行代码上下移动配置】
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
syntax on
set nu!
set tabstop=4
set smartindent
set ai!
set showmatch
set incsearch
set backspace=2
set hls
execute pathogen#infect()
"代码上下移动"
function! s:swap_lines(n1, n2)
let line1 = getline(a:n1)
let line2 = getline(a:n2)
call setline(a:n1, line2)
call setline(a:n2, line1)
endfunction
function! s:swap_up()
let n = line('.')
if n == 1
return
endif
call s:swap_lines(n, n - 1)
exec n - 1
endfunction
function! s:swap_down()
let n = line('.')
if n == line('$')
return
endif
call s:swap_lines(n, n + 1)
exec n + 1
endfunction
noremap <silent> <c-s-up> :call <SID>swap_up()<CR>
noremap <silent> <c-s-down> :call <SID>swap_down()<CR>
autocmd vimenter * NERDTree