diff --git a/README.md b/README.md index ffc953a..8402584 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,15 @@ the pane in the current window with the largest height, put the following in you let g:tslime_autoset_pane = 1 ``` +If you want a command to be sent to tmux before your actual command, put the following +into your config: + +```vim +let g:tslime_pre_command = "C-c" +``` + +This example will empty whatever is in the prompt or put tmux into normal mode. + Setting Keybindings ------------------- diff --git a/plugin/tslime.vim b/plugin/tslime.vim index e027c30..b6ac67f 100644 --- a/plugin/tslime.vim +++ b/plugin/tslime.vim @@ -15,6 +15,9 @@ function! Send_keys_to_Tmux(keys) call Tmux_Vars() endif + if exists("g:tslime_pre_command") + call system("tmux send-keys -t " . s:tmux_target() . " " . g:tslime_pre_command) + endif call system("tmux send-keys -t " . s:tmux_target() . " " . a:keys) endfunction