3
One dumb solution I find is to type :!clear in vim, but this is just a temporary solution. I am yet to find a better solution. Are you able to fix your issue?
3
This is by design. The :help :! (a closely related command) offers this:
Vim redraws the screen after the command is finished,
because it may have printed any text. This requires a
hit-enter prompt, so that you can read any messages.
To avoid this use:
:silent !{cmd}
The screen is not redrawn then, thus ...
3
Not really what you want but you can still redirect messages to a split with such a command:
:redir @">|silent messages|redir END|split|put
Just map it to a shortcut that suits you.
3
The video goes by quickly, but I paused it and I seem to have seen him type the following:
:!chmod u+x %
Which then produces this output:
:!chmod u+x compiler.rb
[No write since last change]
"compiler.rb" 5L, 42C
Press ENTER or type command to continue
So, actually, Vim does prompt to "press ENTER" after the command is complete, but it ...
2
As @Christian Brabandt pointed out in the comment this is a known issue and there might not be a lot of solutions, for now, to make cursorline work properly.
However, you can use different workarounds:
In this answer @Carpetsmoker suggest a mapping which will set cursorline and cursorcolumn for a fraction of a second. This is pretty useful to easily locate ...
1
resize is the command which solves the problem. That is not Vim's,
but X11's resize.
So I just added this to ~/.vimrc
silent !resize
to get the command automatically issued on Vim start.
If you do not want to see the command's output after quitting Vim,
silent !resize > /dev/null
1
The output you're getting in your terminal that is messing up the text in Vim is likely from the running sxhkd binary that you're spawning in background.
As a possible way to fix this, you can redirect its output to /dev/null when you launch it from the autocmd.
Instead of ending the external command with:
sxhkd &
Use instead:
sxhkd >/dev/null 2&...
1
Try this autocmd:
augroup my_cmdline_window
au!
au CmdWinEnter * nno <buffer><expr><nowait> <c-c> '<c-c>'.timer_start(0, {-> execute('redraw')})[-1]
augroup END
The timer is necessary to delay :redraw. Without it, :redraw would be executed before C-c is pressed, that is before the command line window is left, ...
1
one workaround is to write an tempfile with the command(s) in them.
Then send a command to source this file. like in
> vim --server "<servername>" --remote-send "so /path/to/tempfile"
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
redraw × 15scrolling × 4
terminal × 3
vimrc × 2
cursorline × 2
syntax-highlighting × 1
command-line × 1
gvim × 1
autocompletion × 1
external-command × 1
clientserver × 1
original-vim × 1
x11 × 1
message × 1
silent-mode × 1
st × 1
popup-menu × 1