Adam Asked: 2014-10-17 11:30:45 +0800 CST2014-10-17 11:30:45 +0800 CST 2014-10-17 11:30:45 +0800 CST Open an existing file from Vim 772 I would like to open a file that already exists while already in Vim. What is the command to do this? command-line 2 Answers Voted Best Answer Mitch 2014-10-17T11:31:58+08:002014-10-17T11:31:58+08:00 vim [your file] If this isn't working for you, make sure you have it installed with: sudo apt-get install vim If you're already IN vim do :edit [your file] Additionally, to move back to the previous file after you finish editing the new file you can use :e# This will return you to the previous file muru 2014-10-17T12:46:20+08:002014-10-17T12:46:20+08:00 You can also use tabs and split views: :tabe /path/to/file Effect: :vs /path/to/file (or :sp for a horizontal split) Effect: Use :tabn, :tabp to navigate between tabs, and CtrlW with the arrow keys to navigate between splits.
vim [your file]
If this isn't working for you, make sure you have it installed with:
If you're already IN vim do
Additionally, to move back to the previous file after you finish editing the new file you can use
This will return you to the previous file
You can also use tabs and split views:
Effect:
(or
:sp
for a horizontal split)Effect:
Use
:tabn
,:tabp
to navigate between tabs, and CtrlW with the arrow keys to navigate between splits.