Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config option tslime_pre_command #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------------

Expand Down
3 changes: 3 additions & 0 deletions plugin/tslime.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ function! Send_keys_to_Tmux(keys)
call <SID>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

Expand Down