These 2 vim keyboard shortcuts seems for similar purpose, <C-T>
goes back previous tag in the history, and <C-o>
goes to previous entry in the jump list. Any difference between these 2?
The tag stack is populated only when you jump to a tag using something like :tag foo
or <c-]>
. This means that you can do any number of non-tag-related jumps between your <C-]>
s and <C-t>
s without altering the tag stack and be pretty confident that <C-t>
will always jump you to the latest tag you visited and from where.
The jump list, on the other hand, will record all the jumps you did between your tag-related jumps so <C-o>
will usually take quite a few more attempts to go back to where you want to go than <C-t>
.
Think about <C-o>
as a "catchall" way to go back and <C-t>
as more specialized version of <C-o>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With