wall 命令显示消息后如何重绘终端窗口

Ser*_*nyy 4 vim command-line

我有一个脚本,当电池电量低于一定百分比时,它将向所有打开的终端会话发送wall通知,并且每分钟都会继续这样做,直到插入电源为止。

有时我工作时vim无法看到我当前处于什么模式或我是否已写入文件,这有点烦人。:wq那么除了重新打开文件之外还有什么更好的方法吗?

Flo*_*sch 7

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)