我有一个脚本,wall
当电池电量低于一定百分比时,它会向所有打开的终端会话发送通知,并且会每分钟持续发送一次,直到电源插入。
有时我工作时vim
无法看到我当前处于什么模式或我是否已经写入文件,这有点烦人。那么有没有比:wq
重新打开文件更好的方法呢?
答案1
Ctrl+L或:redraw!
将清除并重新绘制屏幕:
CTRL-L
CTRL-L Clear and redraw the screen. The redraw may happen
later, after processing typeahead.
:redr :redraw
:redr[aw][!] Redraw the screen right now. When ! is included it is
cleared first.
Useful to update the screen halfway executing a script
or function. Also when halfway a mapping and
'lazyredraw' is set.