]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vimrc: Add FSWitch settings.
authorSimon Ruderich <simon@ruderich.org>
Thu, 15 Nov 2012 16:59:04 +0000 (17:59 +0100)
committerSimon Ruderich <simon@ruderich.org>
Thu, 15 Nov 2012 16:59:04 +0000 (17:59 +0100)
vimrc

diff --git a/vimrc b/vimrc
index b537d1723e0d9b949333bfa4f69ce6c7ac9c279c..8922942e69464852ff54341f69fe7a8943eaeece 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -808,6 +808,18 @@ if has('eval')
     let g:ctrlp_cache_dir = $HOME . '/.vim/cache/ctrlp'
     " Permanent cache, cleared by a crontab entry.
     let g:ctrlp_clear_cache_on_exit = 0
+
+" FSWitch settings.
+    " Default don't work well for my projects.
+    augroup vimrc
+        autocmd BufEnter *.cc let b:fswitchdst  = 'h'
+                          \ | let b:fswitchlocs = './'
+        autocmd BufEnter *.h  let b:fswitchdst  = 'cc,c'
+                          \ | let b:fswitchlocs = './'
+    augroup END
+
+    " Switch to corresponding header/source file.
+    nnoremap <silent> <Leader>h :FSHere<CR>
 endif