我有一个脚本,当电池电量低于一定百分比时,它将向所有打开的终端会话发送wall
通知,并且每分钟都会继续这样做,直到插入电源为止。
有时我工作时vim
无法看到我当前处于什么模式或我是否已写入文件,这有点烦人。:wq
那么除了重新打开文件之外还有什么更好的方法吗?
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.
Run Code Online (Sandbox Code Playgroud)