I am doing some scripting related to tmux and Vim. In my tmux window, I have Vim in one tmux pane and a Tcl command line in another tmux pane.
I want to create a Tcl proc which will dump a string to /tmp/file and then use tmux send-keys
to send :read /tmp/file
to the Vim pane. This is a way for the results of Tcl commands to be automatically read into my Vim buffer.
This is working fine except that I use normal mode Vim mappings where I swap the colon :
and the semi-colon ;
. This means that I actually want tmux send-keys
to send ;read /tmp/file
.
My colon/semi-colon swap means that whatever I write won't work for someone who doesn't swap colon/semi-colon.
Is it possible for an external program to discover if a open Vim window has remapped the :
key? or run an Ex command without preceding it with a colon?
:execute "normal! : …\<CR>"
,:call feedkeys(': …', 'n')
, etc.). The only solution might be the magic key<cmd>
, but you would be dependent on the internal representation of such a key.gQ
, commands,:visual
. Orq:
to open the command-line window.gQ
hack would do the trick. Thanks!