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'
"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
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
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
" Mappings ---------------------------------------------------------------- {{{
let mapleader = ";"
map Q gq
+nnoremap Q <Nop>
+nnoremap gq <Nop>
" Normal mode ------------------------------------------------------------- {{{
nnoremap Y y$
nnoremap ' `
"nmap <A-SPACE> :b#<CR>
"nmap <Leader>d :bd<CR>
"" keymappig for register operations
-nnoremap <Leader>r :registers<CR>
+""TODO check if this already mapping
+"nnoremap <Leader>r :registers<CR>
"noremap <Leader>x :<C-p>
nnoremap <Leader>a :
nmap <Leader>p "*p
-
+" also works :r !pbpaste<CR>
nmap <A-=> :resize<CR>:vertical resize<CR>
nmap \e= :resize<CR>:vertical resize<CR>
inoremap <C-a> <Home>
inoremap <C-e> <End>
inoremap <C-D> <Del>
-inoremap <C-b> <S-Left>
-inoremap <C-f> <S-Right>
+inoremap <C-b> <Left>
+inoremap <C-f> <Right>
+inoremap <C-/> <Esc>ui
imap <A-d> <S-Right><C-w>
" }}}
" Command mode ------------------------------------------------------- {{{
" 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'
" 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
"endif
" }}}
" NerdTree ---------------------------------------------------------------- {{{
+" Fix keymapping conflict
+nmap <unique> <Leader>, <Plug>MarkClear
nmap <Leader>n :NERDTreeToggle<CR>
nmap <Leader>N :NERDTreeFind<CR>
" }}}