VIM moves in insert mode

One of the things that worries me most about VIM is moving in insert mode. With any other programs I can use the arrow keys to move around, but with VIM I learned how to use h / j / k / l, and in order to enter this mode, I have to press the escape button, and then again, is there faster way to do this?

+8
vim move
source share
5 answers

I have an escape button associated with jj.

imap jj <ESC> 

Thus, when I want to quickly enter normal mode, I press jj twice and my fingers are in a good position to start navigation.

It may seem uncomfortable to start with, but as soon as you get muscle memory, it will look like lightning.

+11
source share

You can temporarily abandon the insert mode by typing ^ O to navigate. Useful for traversing automatic pasted closing brackets.

In most cases, vim understands the page navigation buttons if your terminal is known. The original vi did not, and this team has always been there.

Useful muscle memory:

^ Oo - stop and open line below, capital O above ^ OA - go to the end of the line and continue pasting ^ OI - Insert the beginning at the beginning of the line

Aside:

I used to use vi on system V, at least 23 years ago. Personally, finding a vi idea that has a philosophy is very funny. It was a pragmatic replacement for the experimenting lonely encoder in a hurry. His pragmatism is why he survived because it is easy to port to any Unix. To get the best, you must learn to use f, t, a comma, and a semicolon - they can save you a lot of effort when you use them with c.

+4
source share

use CTRL- [

here is the sentence (possibly from Bram) in the insert.txt help file for: h i_CTRL - [

"Note. If your key is hard to press on the keyboard, practice using CTRL - [."

+2
source share

You can use Ctrl + C to exit paste mode. Adding files to a vimrc file has a caveat: they do not work if you are on a remote server.

+2
source share

If you have a line in the vimrc file that looks like set term=ansi , comment it out. As soon as I did this, I was not able to switch to insert mode with arrows.

+1
source share

All Articles