X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=vim%2Fvimrc;h=dafbea714e132e31a8afdd02115f90e412ac1d09;hb=HEAD;hp=070046c4e38198c5063f32fb2aa124b44e4719f4;hpb=14c26f56d0f9e84d27b2d6877c05c6d76c37d7a3;p=dotfiles.git diff --git a/vim/vimrc b/vim/vimrc index 070046c..dafbea7 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 @@ -82,6 +84,7 @@ set confirm set nostartofline " don't jump to first character when paging set wrap set expandtab +set backspace=indent,eol,start "set textwidth, formatoptions for chinese set formatoptions+=m set colorcolumn=+1 @@ -92,7 +95,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 @@ -117,6 +120,8 @@ endif " Mappings ---------------------------------------------------------------- {{{ let mapleader = ";" map Q gq +nnoremap Q +nnoremap gq " Normal mode ------------------------------------------------------------- {{{ nnoremap Y y$ nnoremap ' ` @@ -166,12 +171,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 @@ -196,8 +202,9 @@ inoremap u inoremap inoremap inoremap -inoremap -inoremap +inoremap +inoremap +inoremap ui imap " }}} " Command mode ------------------------------------------------------- {{{ @@ -294,12 +301,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_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 @@ -374,6 +386,8 @@ endfunction "endif " }}} " NerdTree ---------------------------------------------------------------- {{{ +" Fix keymapping conflict +nmap , MarkClear nmap n :NERDTreeToggle nmap N :NERDTreeFind " }}} @@ -524,7 +538,7 @@ autocmd FileType vim setlocal foldmethod=marker | autocmd FileType perl setlocal foldmethod=syntax | \ let b:AutoClosePairs = AutoClose#DefaultPairsModified("\"", "{}") | - \ inoremap { {}kA + \ inoremap { {}kA autocmd Filetype markdown setlocal textwidth=80 @@ -693,3 +707,5 @@ nnoremap m :marks abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ< " \ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir'] +"" TODO: +""