Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between CTRL-T and CTRL-O 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. What's the difference between CTRL+T and CTRL+O? They both appear to exhibit the same behavior.

like image 450
Matty Avatar asked Dec 05 '11 05:12

Matty


People also ask

What does Ctrl o do in Vim?

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.

What does o mean in Vim?

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

What is Ctrl G in Vim?

{not in Vi} *g_CTRL-G* *word-count* *byte-count* g CTRL-G Prints the current position of the cursor in five ways: Column, Line, Word, Character and Byte. If the number of Characters and Bytes is the same then the Character position is omitted.

What is Ctrl N in Vim?

Ctrl-N to insert the next matching word; or. Ctrl-P to insert the previous matching word.


1 Answers

CTRL-T is working with tag stack

CTRL-O is working with jumplist

Tag stack and jumplist are different list in vim, but they might have same items when you jumping through tags (eg. using CTRL-])

like image 169
number5 Avatar answered Oct 19 '22 14:10

number5