因为要在线上服务器使用, 所以只用的vim自带的功能
编写原则 => 简单, 方便, 无依赖, 方便在线上改代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
autocmd! bufwritepost .vimrc source %
"set number " 显示行号。 set ambiwidth=double set autoindent set wildmenu set whichwrap=b,s,<,>,[,] set nobackup set noswapfile autocmd FileType * setl fo-=cro
colorscheme elflord
set expandtab set smarttab set shiftwidth=4
set autochdir let g:netrw_altv = 1 let g:netrw_preview = 1 let g:netrw_liststyle = 3 let g:netrw_winsize = 30 let g:netrw_browse_split = 4
function! ToggleVExplorer() if exists("t:expl_buf_num") let expl_win_num = bufwinnr(t:expl_buf_num) if expl_win_num != -1 let cur_win_nr = winnr() exec expl_win_num . 'wincmd w' close exec cur_win_nr . 'wincmd w' unlet t:expl_buf_num else unlet t:expl_buf_num endif else
Vexplore let t:expl_buf_num = bufnr("%") endif endfunction
map <C-n> :tabn<CR> map <C-b> :tabprevious<CR> map <S-t> :call ToggleVExplorer()<CR> set paste
|