vimrc

My Vim config
git clone git://pcardenasb.com/vimrc
Log | Files | Refs | Submodules

commit 1807f6db973c7d0052916757b1284a857e42609a
parent 93e6a2fc14c6cdff6fe7135bf46c435ed8a009d1
Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe>
Date:   Thu,  5 Nov 2026 15:00:57 -0300

tmux: update

Diffstat:
Mpack/pablo/opt/tmux/plugin/tmux.vim | 35++++++++++++++---------------------
1 file changed, 14 insertions(+), 21 deletions(-)

diff --git a/pack/pablo/opt/tmux/plugin/tmux.vim b/pack/pablo/opt/tmux/plugin/tmux.vim @@ -52,28 +52,21 @@ def TmuxSetBufferNormal(type: string) call system("tmux load-buffer -", @a) finally @a = a_save + set operatorfunc= endtry enddef def TmuxSendFileLocationNormal() - var a_save = @a - try - call system($"tmux set-buffer {expand('%')}:{line(".")}") - call system("tmux paste-buffer -p -t {marked}") - finally - @a = a_save - endtry + call system($"tmux set-buffer {expand('%')}:{line(".")}") + call system("tmux paste-buffer -p -t {marked}") enddef def TmuxSendFileLocationVisual() - var a_save = @a - try - call system($"tmux set-buffer {expand('%')}:{line("'<")}-{line("'>")}") - call system("tmux paste-buffer -p -t {marked}") - finally - @a = a_save - set operatorfunc= - endtry + var first = min([line('v'), line('.')]) + var last = max([line('v'), line('.')]) + call system($"tmux set-buffer {expand('%')}:{first}-{last}") + call system("tmux paste-buffer -p -t {marked}") + call system("tmux select-pane -t {marked}") enddef nmap <silent> <localleader>tb <Cmd>set operatorfunc=<SID>TmuxSetBufferNormal<CR>g@ @@ -81,18 +74,18 @@ vmap <silent> <localleader>tb <ScriptCmd>TmuxSetBufferVisual()<CR> nmap <silent> <localleader>ts <Cmd>set operatorfunc=<SID>TmuxSendKeysToMarkedNormal<CR>g@ vmap <silent> <localleader>ts <ScriptCmd>TmuxSendKeysToMarkedVisual()<CR> -nmap <silent> <localleader>te <ScriptCmd>system('tmux send-keys -t {marked} Enter')<CR> -nmap <silent> <localleader>tc <ScriptCmd>system('tmux send-keys -t {marked} <C-c>')<CR> -nmap <silent> <localleader>td <ScriptCmd>system('tmux send-keys -t {marked} <C-d>')<CR> +map <silent> <localleader>te <ScriptCmd>system('tmux send-keys -t {marked} Enter')<CR> +map <silent> <localleader>tc <ScriptCmd>system('tmux send-keys -t {marked} <C-c>')<CR> +map <silent> <localleader>td <ScriptCmd>system('tmux send-keys -t {marked} <C-d>')<CR> nmap <silent> <localleader>tl <ScriptCmd>TmuxSendFileLocationNormal()<CR> vmap <silent> <localleader>tl <ScriptCmd>TmuxSendFileLocationVisual()<CR> # Python -nmap <silent> <localleader>tpi <ScriptCmd>system('tmux send-keys -t {marked} python Enter')<CR> -nmap <silent> <localleader>tpa <ScriptCmd>system('tmux send-keys -t {marked} ". venv/bin/activate"')<CR> +map <silent> <localleader>tpi <ScriptCmd>system('tmux send-keys -t {marked} python Enter')<CR> +map <silent> <localleader>tpa <ScriptCmd>system('tmux send-keys -t {marked} ". venv/bin/activate"')<CR> # R -nmap <silent> <localleader>tri <ScriptCmd>system('tmux send-keys -t {marked} R Enter')<CR> +map <silent> <localleader>tri <ScriptCmd>system('tmux send-keys -t {marked} R Enter')<CR> # vim: et sts=4 sw=4