@vim,gvim 配置参考
colorscheme asmanian2 set nu "map <C-c> "+y "map <C-v> "+p map <C-s> :w<CR> syntax on set tabstop=4 set softtabstop=4 set shiftwidth=4 set autoindent set cindent set cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s if &term=="xterm" set t_Co=8 set t_Sb=^[[4%dm set t_Sf=^[[3%dm endif set tags=tags set autochdir let Tlist_Show_One_File=1 let Tlist_Exit_OnlyWindow=1 let g:winManagerWindowLayout='FileExplorer|TagList' nmap wm :WMToggle<cr> let g:miniBufExplMapCTabSwitchBufs=1 let g:miniBufExplMapWindowsNavVim=1 let g:miniBufExplMapWindowNavArrows=1 set nowrap nnoremap <silent> <F12> :A<CR> nnoremap <silent> <F3> :Grep<CR> set encoding=utf-8 set fileencodings=utf-8 "resolve menu messy code source $VIMRUNTIME/delmenu.vim source $VIMRUNTIME/menu.vim "resove consle output messy code language messages zh_CN.utf-8 :set ffs=unix
.vimrc
vim,gvim启动设定
推荐
git clone git://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
sh ~/.vim_runtime/install_basic_vimrc.sh
测试: https://github.com/amix/vimrc
最近在重新配置Vim,也在GitHub上找了三个star和fork数目很高的方案,在这里分享给大家:
https://github.com/amix/vimrc - star 3,482 ; Fork 1,203
https://github.com/humiaozuzu/dot-vimrc - star 781 ; Fork 304
https://github.com/spf13/spf13-vim - star 5,287 ; Fork 1,593
如果大家自己配置的比较顺手的,也欢迎在评论中分享出来。
支持鼠标:
" Send more characters for redraws set ttyfast " Enable mouse use in all modes set mouse=a " Set this to the name of your terminal that supports mouse codes. " Must be one of: xterm, xterm2, netterm, dec, jsbterm, pterm set ttymouse=xterm2
http://www.vim.org/scripts/script.php?script_id=159
minibufexpl.vim : Elegant buffer explorer - takes very little screen space
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
从putty粘贴进vim快捷键, Shift+Insert
智能提示插件,需要手动编绎安装,比较麻烦,未实验。
http://valloric.github.io/YouCompleteMe/
https://github.com/Valloric/YouCompleteMe/wiki/Full-installation-on-CentOS
从源码编译安装vim,若需要YouCompleteMe插件,需要支持python选项,未实验。
http://www.cnblogs.com/wucg/p/7078626.html
安装Emmet-vim:
https://www.vim.org/scripts/script.php?script_id=2981
下载最新emmet-vim.zip
yum install unzip
unzip emmet-vim.zip -d /tmp/emmet
把/tmp/emmet下的东西都复制合并到~/.vim_runtime, 重启vim,
新建html, 输入html:5,然后在Normal模式下按Ctrl+y,(逗号),即可扩展。