I'm using Vim as a (debugger) frontend, but am bothered by the "flickering" screens when sending multiple commands at once. My current setup already uses
lazyredraw that should work for functions. I communicate with a vim session using:
> vim --server "<servername>" --remote-send "<command>"
I basically send a unique function every time and then execute it, such that I can take advantage of lazyredraw. A typical
<command> looks like:
:silent execute "function! Mycommands()\n \ vim test/src/main.cc\n \ execute "sign place 5 line=5 name=<SOMESIGN> file=" . expand("%:p")\n \ call cursor(5,1)\n \ redraw!\n \ endfunction" | \ call Mycommands()<Enter>
It (1) opens a file, (2) highlights line 5 using a vim
sign, and (3) moves the cursor to line 5.
If I record my vim session and slow it down, I see how this
<command> is printed to the vim command line (It actually increase the cmd area for these long
<command>'s), I then see how the file is opened, and lastly how the sign is placed. My questions are:
1) can I stop redrawing, send my commands, and then redraw?
2) can I disable the echoing of
<command> to the vim commandline, like possible with a mapping using
3) Is there a better way to achieve the frontend setup that avoids this issue?