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?


I have:


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

  • 1
    "most useful" or "favorite" type questions tend to be too vague for this site. I'd suggest revising your question to be more specific, e.g. "what's the fastest way to get to the end of the line in insert mode?". Also, I think you meant esc A (A = shift a), not esc ctrl a.
    – jw013
    Commented Dec 22, 2011 at 16:23

5 Answers 5

  • 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.

  • That's awesome. I never knew about ctrl-o, despite having used Vim for years.
    – Bill B
    Commented Jan 28, 2012 at 21:01

Does your keyboard not have an End key?

This is what I use in insert mode to jump to the end of the line. There is a Home key to jump to the beginning of the line. Also, in insert mode, pageup and pagedown move up and down the page. Otherwise, no vim movement bindings are applicable in insert mode.

(Clearly, for instance, if you type f5w, you will not go to the 5th w, but will type in the characters, "f5w", or } won't go to the next paragraph, but will just type "}", etc.)

  • 1) There are "short" keyboards without Insert/Delete/Home/End/PgUp/PgDn keys 2) It's too far away to move your hand from typing position
    – yahol
    Commented Jul 1, 2018 at 16:44

Here is a link that has some commands, http://www.vmunix.com/~gabor/vi.html

There aren't that many like you've described [ ctrl - ...] in insert mode

but you can read it as ^ mean type control


Vim offers kind of a 'get out of (insert-mode) jail free card', and it's the Alt key.

While in insert mode - just press it while executing a normal mode command. This will get you out of insert mode and then execute the normal mode command.

That said, a couple of solutions for your specific scenario are:

  1. Alt + % - Goes into normal mode and put cursor at the end of the line.
  2. Alt + A - Same as above but goes back into insert mode afterwards.

Important note: This does not accept a repetition-number.

Have fun.

  • I am new to vim and came here from google. It seems <kbd>Alt</kbd> + <kbd>%</kbd> only works with delimiters. Isn't the <kbd>Alt</kbd> + <kbd>0</kbd> what you mean?
    – Celdor
    Commented Oct 13, 2022 at 10:09

if your using vim in the command line alt will send and esc before passing an command. for example if you press alt+shift+a you will exit insert mode and and re-enter insert mode at the end of the line.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .