]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
vim: add mfun snippet
[dotfiles.git] / vim / vimrc
index bffc315c8ac71ba588b9694ee66a980a2c2d5b45..e1255968964c13e9ca45920c26c3290261e3c259 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -58,6 +58,7 @@ Plugin 'ompugao/ctrlp-ros'
 " Plugin 'jalcine/cmake.vim'
 " Plugin 'powerman/vim-plugin-viewdoc'
 
+" staging
 " find an alternative (latex-box? Automatic Latex Plugin?)
 Plugin 'http://git.code.sf.net/p/vim-latex/vim-latex'
 " Plugin 'lokaltog/vim-easymotion'
@@ -65,6 +66,10 @@ Plugin 'justinmk/vim-sneak'
 Plugin 'chrisbra/checkattach'
 Plugin 'nathanaelkane/vim-indent-guides'
 Plugin 'alx741/vinfo'
+Plugin 'octol/vim-cpp-enhanced-highlight'
+Plugin 'vim-scripts/mediawiki.vim'
+Plugin 'vim-scripts/replacewithregister'
+Plugin 'tpope/vim-abolish'
 
 " remove entries first
 set runtimepath -=$HOME/.vim
@@ -100,7 +105,7 @@ set showbreak=↪                 " show these chars for wrapped lines
 set lazyredraw                  " don't redraw while executing macros
 
 set list                        " show chars defined in 'listchars'
-set listchars=tab:â\96¸\            " list of strings used for list mode
+set listchars=tab:â\9d­\            " list of strings used for list mode
 set listchars+=extends:❯,precedes:❮
 " Only shown when not in insert mode
 augroup trailing
@@ -318,6 +323,7 @@ nnoremap N Nzzzv
 nnoremap g; g;zzzv
 nnoremap g, g,zzzv
 nnoremap <c-o> <c-o>zzzv
+nnoremap <c-i> <c-i>zzzv
 
 " Not using the default mappings of 'To line from top/bottom'
 noremap H ^
@@ -381,10 +387,13 @@ map Q gq
 " break undo sequence before removing word
 inoremap <C-W> <C-G>u<C-W>
 
-nmap <Leader>b :set expandtab tabstop=4 shiftwidth=4 softtabstop=4<CR>
-nmap <Leader>B :set expandtab tabstop=8 shiftwidth=8 softtabstop=4<CR>
-nmap <Leader>M :set noexpandtab tabstop=8 softtabstop=4 shiftwidth=4<CR>
-nmap <Leader>m :set expandtab tabstop=2 shiftwidth=2 softtabstop=2<CR>
+nnoremap coe :set <C-R>=&expandtab ? 'noexpandtab' : 'expandtab'<CR><CR>
+nnoremap [oe :set expandtab<CR>
+nnoremap ]oe :set noexpandtab<CR>
+
+for idt in range(1,8)
+  exe 'nnoremap co'.idt.' :set tabstop='.idt.' shiftwidth='.idt.' softtabstop='.idt.'<CR>'
+endfor
 
 " space will toggle current fold in normal mode
 nnoremap <leader><Space> za
@@ -418,8 +427,12 @@ let g:delimitMate_expand_space = 1
 nnoremap <silent> <Leader>ff :FSHere<CR>
 nnoremap <silent> <Leader>fl :FSRight<CR>
 nnoremap <silent> <Leader>fh :FSLeft<CR>
+nnoremap <silent> <Leader>fj :FSBelow<CR>
+nnoremap <silent> <Leader>fk :FSAbove<CR>
 nnoremap <silent> <Leader>fL :FSSplitRight<CR>
 nnoremap <silent> <Leader>fH :FSSplitLeft<CR>
+nnoremap <silent> <Leader>fJ :FSSplitBelow<CR>
+nnoremap <silent> <Leader>fK :FSSplitAbove<CR>
 
 " fugitive {{{2
 nmap <silent> <leader>dd :tab split \| Gdiff \| wincmd h<CR>
@@ -530,6 +543,7 @@ if executable('ag')
     let g:unite_source_grep_recursive_opt = ''
 end
 nnoremap <silent> [unite]a :<C-u>Unite grep -input=\12\17<CR>
+command! -nargs=1 Ag Unite grep -input=<args>
 
 " unite-file_rec {{{3
 if executable('ag')