changeset 169:9ee1bb5d8360

use filetype specific commands for vimux
author zegervdv <zegervdv@me.com>
date Sun, 02 Nov 2014 17:38:24 +0100
parents 27f78c20b486
children 1cdae31a21da
files vimrc
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vimrc	Sun Nov 02 17:29:43 2014 +0100
+++ b/vimrc	Sun Nov 02 17:38:24 2014 +0100
@@ -611,8 +611,9 @@
 " }}}
 " Vimux {{{
 let g:VimuxUseNearest = 1
-nnoremap <silent><leader>s :w<CR>:call VimuxRunCommand('%run -i ' . expand('%'))<CR>
-nnoremap <silent><leader>r :w<CR>:call VimuxRunCommand('rake spec')<CR>
+autocmd FileType python nnoremap <buffer> <silent><leader>s :w<CR>:call VimuxRunCommand('%run -i ' . expand('%'))<CR>
+autocmd FileType ruby nnoremap <buffer> <silent><leader>s :w<CR>:call VimuxRunCommand('rake spec')<CR>
+autocmd FileType  c nnoremap <buffer> <silent><leader>s :w<CR>:call VimuxRunCommand('make')<CR>
 " }}}
 " Tmuxline {{{
 let g:tmuxline_powerline_separators=0