diff --git a/.vim/plugin/mappings.vim b/.vim/plugin/mappings.vim index dfbfc8e..2eef802 100644 --- a/.vim/plugin/mappings.vim +++ b/.vim/plugin/mappings.vim @@ -36,6 +36,9 @@ " P Change the insert mode (paste, nopaste) " m Run an xmacro (needs our run_xmacro script in bin/ (and bin/ in the $PATH)) " / Clear the last search +" bc Call to tmux new window in the current session, with the directory of the current file. +" b" Splits vertically tmux's current window in the current session, with the directory of the current file. +" b% Splits horizontally tmux's current window in the current session, with the directory of the current file. nmap vr :source ~/.vimrc nmap vc :source % nmap w :w @@ -69,6 +72,9 @@ nmap p :set paste:call setreg("\"", system("xclip -o"))p:set nopa nmap P :set invpaste nmap m :!run_xmacro ~/.xmacros/ nmap / :let @/ = "" +nmap bc :call system('tmux new-window -F "#S" -c "'.expand('%:p:h').'"') +nmap b" :call system('tmux split-window -F "#S" -c "'.expand('%:p:h').'"') +nmap b% :call system('tmux split-window -h -F "#S" -c "'.expand('%:p:h').'"') " Mapping tab move 0..8 nmap tm1 :tabm 0