X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=vim%2Fvimrc;h=86878247e48f528db4ab564045b4502bc31da3f5;hb=212daa8f51b00f7353cd32c6edf1bc71c49a99b8;hp=e68c9cb60767f6270433cd15ad4b619c3e122a2c;hpb=a3f9febb8a04d66a7af3e0ffee9167e84bf8ba12;p=dotfiles.git diff --git a/vim/vimrc b/vim/vimrc index e68c9cb..8687824 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -13,7 +13,8 @@ Bundle 'vim-scripts/FuzzyFinder' Bundle 'vim-scripts/L9' Bundle 'Valloric/YouCompleteMe' Bundle 'octol/vim-cpp-enhanced-highlight' -Bundle 'bling/vim-airline' +Bundle 'vim-airline/vim-airline' +Bundle 'vim-airline/vim-airline-themes' Bundle 'payneseu/nerdtree' Bundle 'Townk/vim-autoclose' Bundle 'majutsushi/tagbar' @@ -38,6 +39,7 @@ Bundle 'MattesGroeger/vim-bookmarks' "Bundle 'kien/ctrlp.vim' "disable since some conflicting mapping Bundle 'vim-latex/vim-latex' +Plugin 'vimperator/vimperator.vim' call vundle#end() filetype plugin indent on @@ -92,7 +94,7 @@ if has("gui_running") set macmeta "" Macvim only colorscheme molokai set guioptions+=c - set guifont=Sauce\ Code\ Powerline\ Light:h11 + set guifont=Source\ Code\ Pro\ Light:h11 highlight Cursor guifg=white guibg=green set guicursor=a:blinkon0 set guioptions=eac @@ -149,7 +151,7 @@ nmap = = nnoremap zz nnoremap zz -nnoremap +"nnoremap nnoremap nnoremap nnoremap gt @@ -166,12 +168,13 @@ nnoremap  :tabprevious "nmap :b# "nmap d :bd "" keymappig for register operations -nnoremap r :registers +""TODO check if this already mapping +"nnoremap r :registers "noremap x : nnoremap a : nmap p "*p - +" also works :r !pbpaste nmap :resize:vertical resize nmap = :resize:vertical resize @@ -294,8 +297,17 @@ nnoremap sr :FufRenewCache " YouCompleteMe ----------------------------------------------------------- {{{ "syntax on, must before the YCM, +" Load YouCompleteMe only on OSX +if !has("osx") + let g:loaded_youcompleteme = 1 +endif + "let g:ycm_collect_identifiers_from_tags_files = 1 -"let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py' +let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py' +" this is fix youcompleteme python error +"http://www.cnblogs.com/clivelee/p/4266559.html +"https://github.com/Valloric/YouCompleteMe/issues/18 +"let g:ycm_path_to_python_interpreter= '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python' let g:ycm_auto_trigger = 1 let g:ycm_seed_identifiers_with_syntax = 1 let g:ycm_show_diagnostics_ui = 0 @@ -370,6 +382,8 @@ endfunction "endif " }}} " NerdTree ---------------------------------------------------------------- {{{ +" Fix keymapping conflict +nmap , MarkClear nmap n :NERDTreeToggle nmap N :NERDTreeFind " }}} @@ -459,8 +473,19 @@ map ej (easymotion-j) map ek (easymotion-k) map eb (easymotion-b) map ew (easymotion-w) +map ee (easymotion-w) map el (easymotion-lineforward) map eh (easymotion-linebackward) + +"map n (easymotion-sn) +"map j (easymotion-j) +"map k (easymotion-k) +"map b (easymotion-b) +"map w (easymotion-w) +"map e (easymotion-w) +"map l (easymotion-lineforward) +"map h (easymotion-linebackward) + "" }}} " vim-latex --------------------------------------------------------------- {{{ "set grepprg=grep\ -nH\ $* @@ -496,9 +521,10 @@ autocmd FileType qf nnoremap q :q | setlocal nowrap | setl autocmd FileType help nnoremap q :q | vertical resize 85; autocmd FileType c,cpp setlocal foldmethod=syntax | \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") | - \ inoremap { {}kA | + \ inoremap { {}kA| \ nnoremap :let word=expand(""):wincmd o:vsp:exec("tag ". word)zzzr:wincmd w -autocmd FileType python setlocal foldmethod=indent +autocmd FileType python setlocal foldmethod=indent | + \ set list autocmd FileType xml setlocal foldmethod=syntax | \ let g:xml_syntax_folding=1 @@ -506,6 +532,10 @@ autocmd FileType vim setlocal foldmethod=marker | \ setlocal formatoptions-=c formatoptions-=r formatoptions-=o | \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("", "{} \"") +autocmd FileType perl setlocal foldmethod=syntax | + \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") | + \ inoremap { {}kA + autocmd Filetype markdown setlocal textwidth=80 autocmd CmdwinEnter * map q :q @@ -618,7 +648,7 @@ nnoremap \d :call DiffToggle() " }}} "nnoremap @=(foldlevel('.')?'za':"\") -nnoremap @=(foldlevel('.')?'za':"\") +nnoremap @=(foldlevel('.')?'za':"\") "noremap d @=(&diff)?':diffoff':":VCSVimDiff" " https://bitbucket.org/sjl/dotfiles/src/tip/vim/vimrc @@ -673,3 +703,5 @@ nnoremap m :marks abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ< " \ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir'] +"" TODO: +""