Permalink
Browse files

tmux mappings for vim #tw

  • Loading branch information...
1 parent 33ce34d commit 44721f5522dcea006aa25228b8e8d1b0a9613faf @sadasant committed May 14, 2014
Showing with 6 additions and 0 deletions.
  1. +6 −0 .vim/plugin/mappings.vim
@@ -36,6 +36,9 @@
" <Tab>P Change the insert mode (paste, nopaste)
" <Tab>m Run an xmacro (needs our run_xmacro script in bin/ (and bin/ in the $PATH))
" <Tab>/ Clear the last search
+" <Tab>bc Call to tmux new window in the current session, with the directory of the current file.
+" <Tab>b" Splits vertically tmux's current window in the current session, with the directory of the current file.
+" <Tab>b% Splits horizontally tmux's current window in the current session, with the directory of the current file.
nmap <Tab>vr :source ~/.vimrc<cr>
nmap <Tab>vc :source %
nmap <Tab>w :w<cr>
@@ -69,6 +72,9 @@ nmap <Tab>p :set paste<cr>:call setreg("\"", system("xclip -o"))<cr>p:set nopa
nmap <Tab>P :set invpaste<cr>
nmap <Tab>m :!run_xmacro ~/.xmacros/
nmap <Tab>/ :let @/ = ""<cr>
+nmap <Tab>bc :call system('tmux new-window -F "#S" -c "'.expand('%:p:h').'"')<cr>
+nmap <Tab>b" :call system('tmux split-window -F "#S" -c "'.expand('%:p:h').'"')<cr>
+nmap <Tab>b% :call system('tmux split-window -h -F "#S" -c "'.expand('%:p:h').'"')<cr>
" Mapping tab move 0..8
nmap <Tab>tm1 :tabm 0<cr>

0 comments on commit 44721f5

Please sign in to comment.