Jump to the next word in insert mode

With <CTRL-O>, you can execute one command without exiting insert mode.

So you can try <CTRL-O>w, <CTRL-O>3w, etc.


There's a very useful table of insert mode motions at :h ins-special-special.

<S-Left>    cursor one word back (like "b" command)
<C-Left>    cursor one word back (like "b" command)
<S-Right>   cursor one word forward (like "w" command)
<C-Right>   cursor one word forward (like "w" command)

You'll find that Shift-Left/Right and Ctrl-Left/Right will do the trick.

Ctrl/Shift with cursor keys isn't guaranteed to work flawlessly in all terminals, however. You can avoid any problems entirely by using a mapping. Here's one right on to the home row:

:inoremap <C-H> <C-\><C-O>b
:inoremap <C-L> <C-\><C-O>w

Now use CTRL-H and CTRL-L to move by word in insert mode.

However, please be aware that many Vimmers prefer not to move at all in insert mode. That's because once you have moved in insert mode, the . command loses its utility, as does CTRL-A and maybe some other commands.

For me, the Vim way of jumping to the next word in insert mode is <C-[>wi and it's become completely automatic.


You can move one word forwards/backwards in Insert mode by holding down either Shift or Control and pressing the right or left arrow key.

Tags:

Vim