As Ralf said in the comments, there is no built-in command that does this. I would recommend using either ji
, jI
, or jA
for this purpose, since those are all only two keys, and they're fairly normal vim idioms.
If you'd really like to do this with a single keystroke, you could always overwrite the o
command to not make a newline. To do this, add one of the following lines to your .vimrc
(depending on which behavior you want):
" Enter insert mode at the beginning of the next line
nnoremap o j0i
" Enter insert mode at the end of the next line
nnoremap o jA
" Enter insert mode at the first non-whitespace character
nnoremap o jI
(Note that the lines starting with "
are just comments)
Unfortunately, this overwrites o
which I think is a very useful command. Normally, to add your own shortcuts without overwriting the default ones, it's standard to use <leader>
. However in this case, something like
nnoremap <leader>o ji
would be pretty pointless since it's not any shorter than just manually doing it with ji
ji
maybe followed by<C-T>
to get the indent. See:help i_CTRL-T
. Maybe better:jA
in case there are already leading spaces/tab.