A tiny vim plugin that sends a word/line/paragraph of text from vim into a tmux pane for execution.
git clone https://mcol.xyz/code/tide
Log | Files | Refs | README | LICENSE

commit 72c6303579c7f4341a3cdc8eef03ab39cad37495
parent 9d2c3d784f6de41767f49691ce0cd13b672be729
Author: mcol <mcol@posteo.net>
Date:   Sat,  9 Feb 2019 10:31:00 +0000

fix run section to not run extra line at bottom

Diffstat:
Mplugin/tide.vim | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/plugin/tide.vim b/plugin/tide.vim @@ -72,9 +72,11 @@ endfunction " send current section delimited by double comments function! s:TmuxSendSection() " find shortest comment character - let s:com = split(&comments, ",") - let s:scom = substitute(s:com[0], "^.*:", '', '') - for s:i in s:com + if ! exists("b:com") + let b:com = split(&comments, ",") + endif + let s:scom = substitute(b:com[0], "^.*:", '', '') + for s:i in b:com let s:ncom = substitute(s:i, "^.*:", '', '') if len(s:ncom) < len(s:scom) let s:scom = s:ncom @@ -86,7 +88,7 @@ function! s:TmuxSendSection() if s:bottom <= s:top let s:bottom = line('$') elseif s:bottom != line('$') - let s:bottom = prevnonblank(s:bottom) + let s:bottom = prevnonblank(s:bottom-1) endif if s:top == 0 let s:top = 1