X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/1143efde9c8c076f83da5bb0d0060bbb09b318a7..6bdcde0655ded222e6ed9c50759754e4cc5ddc28:/vim/vimrc?ds=sidebyside diff --git a/vim/vimrc b/vim/vimrc index f8a52f6..a32bbe6 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -35,6 +35,7 @@ Bundle 'firef0x/pkgbuild.vim' Bundle 'derekwyatt/vim-fswitch' " seems to have problems right now... may be add later? "Bundle 'jalcine/cmake.vim' +Bundle 'powerman/vim-plugin-viewdoc' " rtp + xdg {{{1 " remove entries first @@ -48,6 +49,10 @@ set runtimepath +=$XDG_CONFIG_HOME/vim/after filetype plugin indent on +" bindings {{{1 +" allow both and / to be +map + " moving around, searching and patterns {{{1 set incsearch " show match for partly typed search command set ignorecase " ignore case when using a search pattern @@ -60,15 +65,24 @@ nmap n :silent nohl nmap # :%s:/::gn " center cursor after search nnoremap n nzz + " disable arrows -inoremap -inoremap -inoremap +noremap +noremap +noremap +noremap +inoremap +inoremap +inoremap inoremap -noremap -noremap -noremap -noremap +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap set nostartofline " don't move the cursor to the first non-blank char of a line set path=.,include/,../include/,/usr/include/c++/*,/opt/ros/hydro/include @@ -229,9 +243,9 @@ set foldmethod=marker " folding type set foldlevelstart=0 " value for 'foldlevel' when starting to edit a file " space will toggle current fold in normal mode -nnoremap @=(foldlevel('.')?'za':"\") +nnoremap za " create folds around visual selection -vnoremap zf +vnoremap zf " save and restore folds set viewoptions=folds,cursor " don't save local options @@ -326,6 +340,10 @@ let g:vim_json_syntax_conceal = 0 let g:tex_flavor='latex' let g:Tex_DefaultTargetFormat='pdf' +" vim-viewdoc {{{2 +let g:no_viewdoc_maps = 1 +nnoremap K :call ViewDoc('doc', '') + " functions {{{1 " auto source vimrc when saved autocmd bufwritepost vimrc source $MYVIMRC