Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do Vim's Control-O and Control-I work?

What do they do, and how do you use them? Any tips / tricks would also be appreciated.

like image 956
Chetan Avatar asked Oct 21 '10 07:10

Chetan


People also ask

What does o mean in Vim?

o. open line below and enter insertion mode. text, ESC. p. put buffer after cursor.

What does Ctrl t do in Vim?

The documentation isn't especially clear— CTRL + T is to jump back in the tag stack, whereas CTRL + O is to jump back to the previous cursor position.


1 Answers

In insert mode, Ctrl-o escapes user to do one normal-mode command, and then return to the insert mode. The same effect can be achieved by <ESC>ing to normal mode, doing the single command and then entering back to insert mode. Ctrl-i is simply a <Tab> in insert mode.

In normal mode, Ctrl-o and Ctrl-i jump user through their "jump list", a list of places where your cursor has been to. The jumplist can be used with the quickfix feature, for example to quickly enter to a line of code containing errors.

like image 150
mike3996 Avatar answered Oct 30 '22 05:10

mike3996