A.J.Mechelynck wrote:
Alexey Vakhov wrote:
Hi Dear community,
Command o and O create new line and switch to insert mode. I want only
insert blank line and stay in normal mode. I know this problem can be
solved using simple mappting, but maybe in vim there are original
commands for this tip?
Thanks a lot
IIUC there are no intrinsic commands for this; but you could use
o<Esc>
O<Esc>
at the keyboard, or
:put =''
:.-1put =''
in a script.
Best regards,
Tony.
I recently searched for a similar solution and settled on using a user
defined command.
I have the following in my _vimrc file:
:command Iline :norm o <esc> "Inserts a blank line below the current line
When I need to enter a blank line and return to command mode I press the
following:
:Il <enter>
User defined commands can work well as an alternative to mapping.
See :h :command and h: :normal
Kevin