Foss User wrote:
> As you can see if I mix CTRL-O and CTRL-T, it becomes difficult for me
> to predict the behavior. It is easy to understand where I am going to
> move next if I press CTRL-T by using the :jumps command. But I don't
> seem to understand why when I press CTRL-T suddenly it moves forward
> to some unpredictable place.

Ctrl-O and Ctrl-T use different stacks, as they relate to different concepts,
namely jumps and tags.

As you already mentioned, Ctrl-O uses the jump list, visible with the :jumps
command, the list of places where you have been.

Ctrl-T uses the tag stack, visible with the :tags command, the list of places
from where you jumped to a tag (eg. with Ctrl-]).

So, if you use Ctrl-O, it goes back where you came from.
If you use Ctrl-T, it goes back from where you jumped to a tag the last time.

What might have confused you is that jumping to a tag (Ctrl-]) updates both the
jump list (as you leave your current position) and the tag list (as you jump to
a tag), but Ctrl-O does not update the tag stack, nor does Ctrl-T update the
jump list. That's why you 'jump forward' if you first use several Ctrl-O and
then Ctrl-T: the Ctrl-O updated the jump list, but left the tag stack as-is.

See :help tag-stack and :help jump-motions (which mentions ':tag').

> Also, is there
> a list of jumps that CTRL-T would take me through that I can see by
> using a command similar to :jumps?

:tags

-- 
Andreas.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to