Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you return from 'gf' in Vim

Tags:

vim

editor

People also ask

How do I go back in Vim?

Undo Changes in Vim / Vi To undo changes in Vim and Vi use the u , :u or :undo commands: If you are in insert or any other mode, press the Esc key to go back to the normal mode, which is also known as command mode. Type u to undo the last change.

How do you get out of replace in Vim?

Basic Find and Replace To go back to normal mode from any other mode, just press the 'Esc' key.

What does CTRL w do in Vim?

Ctrl-w = tells Vim to assign an equal number of lines to each viewport.

How do I go back to insert mode in vi?

To enter Insert mode, press i . In Insert mode, you can enter text, use the Enter key to go to a new line, use the arrow keys to navigate text, and use vi as a free-form text editor. To return to Command mode, press the Esc key once.


I use Ctrl-O


I frequently use Ctrl-6 for this.

It's handy because it allows me to quickly jump back and forth between the two files.


You might want to use CTRL-W gf to open the file in a new tab.

You can close the newly opened file as always with :bd, or use CTRL-6 and other usual ways of changing buffers.


Just use :e# followed by Enter - that basically says to edit the last (most recent) file.


Use gf to descend into a file and use :bf to get back


Ctrl-Shift-6 is one.

:e#↲ is another.