Vim shortcuts in insert mode

keyboard shortcutsvim

When I'm entering some text in vim, sometimes I need to jump to some other place and enter more text. I know there are some shortcuts with ctrl key to simplify the movement.

What are the most useful keyboard shortcuts in insert mode?

e.g.

I have:

'text_sample'

The cursor is in _ position. I want to jump to the end of line without having to press ESC and ctrl + A.

Best Answer

  • End (1 key) the only suggestion that has fewer keystrokes than
  • Esc A (2 keys + use of shift), the one you have suggested.
  • Ctrl-o $ OR Ctrl-o A (2 keys + control and shift), the most keystrokes yet.

The last one illustrates the use of Ctrl-o in Insert mode, which lets you interrupt insert mode to use exactly one normal mode command before returning.

Related Question