Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I jump to a file e.g. by gf I know that I can do ctrl+O to go back.
But how do I go forward? I.e. what is the opposite of ctrl+O so as to go forward to the file I was earlier to which I jumbed to via gf?

share|improve this question
up vote 4 down vote accepted

The opposite of <C-O> is <C-I> a.k.a. <Tab>:

CTRL-O Go to [count] Older cursor position in jump list

Tab or
CTRL-I Go to [count] newer cursor position in jump list

:jumps will print the jump list, which is nice for orientation.

Learn how to look up commands and navigate the built-in :help; it is comprehensive and offers many tips. You won't learn Vim as fast as other editors, but if you commit to continuous learning, it'll prove a very powerful and efficient editor.

share|improve this answer
How would I use :help to find this topic for instance? – Jim Nov 28 '13 at 13:03
:help CTRL-O; you just need to know the command's mode and the spelling of keys! – Ingo Karkat Nov 28 '13 at 13:07

The opposite of CTRL+O is :$

It does the exact opposite..

In vi-editor go to the command mode by pressing Esc key and :$ will do the opposite of CTRL+O.

share|improve this answer
Did not work for me. – Joseph R. Nov 28 '13 at 9:29
Do you use vi editor? – Ruban Savvy Nov 28 '13 at 9:31
You mean as opposed to vim? – Joseph R. Nov 28 '13 at 9:33
It works in both vim-editor and vi-editor. – Ruban Savvy Nov 28 '13 at 9:35
I use vim and it didn't work for me. Also, just so you know, I'm not the one who downvoted you. – Joseph R. Nov 28 '13 at 9:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.