X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/4358a57a61c6aa6330902467980d75b48648f119..29b8323849e82549d4a23f125daf050dd4ed66f4:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index 83f2379..7a99c9d 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -65,6 +65,7 @@ Plugin 'justinmk/vim-sneak' Plugin 'chrisbra/checkattach' Plugin 'nathanaelkane/vim-indent-guides' Plugin 'alx741/vinfo' +Plugin 'vim-scripts/mediawiki.vim' " remove entries first set runtimepath -=$HOME/.vim @@ -100,7 +101,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:▸\ " list of strings used for list mode +set listchars=tab:❭\ " list of strings used for list mode set listchars+=extends:❯,precedes:❮ " Only shown when not in insert mode augroup trailing @@ -313,6 +314,8 @@ nmap # :%s:/::gn " center cursor after search and open folds nnoremap n nzzzv nnoremap N Nzzzv +nnoremap ^O ^Ozzzv +nnoremap ^I ^Izzzv " same when jumping around nnoremap g; g;zzzv @@ -381,10 +384,13 @@ map Q gq " break undo sequence before removing word inoremap u -nmap b :set expandtab tabstop=4 shiftwidth=4 softtabstop=4 -nmap B :set expandtab tabstop=8 shiftwidth=8 softtabstop=4 -nmap M :set noexpandtab tabstop=8 softtabstop=4 shiftwidth=4 -nmap m :set expandtab tabstop=2 shiftwidth=2 softtabstop=2 +nnoremap coe :set =&expandtab ? 'noexpandtab' : 'expandtab' +nnoremap [oe :set expandtab +nnoremap ]oe :set noexpandtab + +for idt in range(1,8) + exe 'nnoremap co'.idt.' :set tabstop='.idt.' shiftwidth='.idt.' softtabstop='.idt.'' +endfor " space will toggle current fold in normal mode nnoremap za @@ -443,8 +449,6 @@ nmap [og IndentGuidesEnable nmap ]og IndentGuidesDisable " NERDTree {{{2 -" open/close NERDTree with \e -nmap e :NERDTreeToggle nmap :NERDTreeToggle " to open files/dirs let NERDTreeMapActivateNode='l' @@ -530,6 +534,7 @@ if executable('ag') let g:unite_source_grep_recursive_opt = '' end nnoremap [unite]a :Unite grep -input= +nnoremap [unite]g :Unite grep " unite-file_rec {{{3 if executable('ag') @@ -637,7 +642,7 @@ nmap ev :call EditConfig('vimrc') nmap ef :call EditConfig('ftplugin') nmap es :call EditConfig('syntax') nmap ei :call EditConfig('indent') -nmap eu :UltiSnipsEdit +nmap eu :UltiSnipsEdit:lcd %:p:h " spell check {{{2 " http://tex.stackexchange.com/a/52932