vimrc

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

commit d99b9b99413501754d7f14b017d44d9617ec4a4f
parent 75f635b23f247d7189b7951a53372f5751526db7
Author: Pablo Cárdenas <pablo.cardenas@imca.edu.pe>
Date:   Fri,  2 Oct 2026 13:00:16 -0300

tmux: added SendFileLocation

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

diff --git a/pack/pablo/opt/tmux/plugin/tmux.vim b/pack/pablo/opt/tmux/plugin/tmux.vim @@ -52,6 +52,26 @@ def TmuxSetBufferNormal(type: string) call system("tmux load-buffer -", @a) finally @a = a_save + 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 +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 enddef @@ -65,6 +85,9 @@ nmap <silent> <localleader>te <ScriptCmd>system('tmux send-keys -t {marked} Ente 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> +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>