Vim command to insert blank line in normal mode

后端 未结 4 1005
时光说笑
时光说笑 2020-12-10 01:39

Is there any command in Vim that will do the same thing as o or O (insert a blank line before/after the current one), but which doesn\'t also switc

4条回答
  •  长情又很酷
    2020-12-10 01:51

    In insert mode:

    :normal O
    

    From vim inline manual:

    Execute Normal mode commands {commands}. This makes it possible to execute Normal mode commands typed on the command-line. {commands} are executed like they are typed. For undo all commands are undone together. Execution stops when an error is encountered. If the [!] is given, mappings will not be used. {commands} should be a complete command. If {commands} does not finish a command, the last one will be aborted as if or was typed.

    http://vimdoc.sourceforge.net/htmldoc/various.html#:normal

    I got the hint there: https://unix.stackexchange.com/a/16452/7914

提交回复
热议问题