From: Samir Benmendil Date: Mon, 15 Dec 2014 17:44:30 +0000 (+0000) Subject: vim: setup fswitch X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/fa47cc94bf4dd9e857b3a1aa27ae7917759779d5?ds=inline vim: setup fswitch --- diff --git a/vim/ftplugin/roscpp.vim b/vim/ftplugin/roscpp.vim index e69de29..c43b32e 100644 --- a/vim/ftplugin/roscpp.vim +++ b/vim/ftplugin/roscpp.vim @@ -0,0 +1,9 @@ +augroup fs_roscpp + autocmd! + autocmd BufEnter *.cpp let b:fswitchdst = 'h' + autocmd BufEnter *.cpp let b:fswitchlocs = 'reg:|src$|include/**|' + autocmd BufEnter *.h let b:fswitchdst = 'cpp' + autocmd BufEnter *.h let b:fswitchlocs = 'reg:/include.*/src/' +augroup END + +set makeprg=catkin_make\ -C$ROS_WORKSPACE diff --git a/vim/vimrc b/vim/vimrc index 23e9b8a..caa3348 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -400,6 +400,13 @@ let g:checkattach_filebrowser = 'ranger' " Gundo {{{2 nnoremap :GundoToggle +" fswitch {{{2 +nnoremap ff :FSHere +nnoremap fl :FSRight +nnoremap fh :FSLeft +nnoremap fL :FSSplitRight +nnoremap fH :FSSplitLeft + " fugitive {{{2 nmap dd :tab split \| Gdiff \| wincmd h " delete fugitive buffers when closed diff --git a/vim/ycm_extra_conf.py b/vim/ycm_extra_conf.py index ba18821..74d7b8e 100644 --- a/vim/ycm_extra_conf.py +++ b/vim/ycm_extra_conf.py @@ -31,7 +31,6 @@ def FlagsForFile( filename, **kwargs ): flags += rospack() relative_to = cwd final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to ) - print flags return { 'flags': final_flags,