tags:

views:

124

answers:

6

Nowa days I'm working with the Vi editor with the positive approach that you can do most things using it - unlike other editors. I came across one problem:

Let's assume I have open a folder with

vi <folder name>

so it opens the folder in Vi and lists the files in that folder. I select a file and read the content, then I want to go back to the previous view which has filenames listed so it is easy to choose another file. But don't know how to achieve this.

I'm hoping some method should be there to achieve this.

+1  A: 

You can always try

:e .
Arkaitz Jimenez
+3  A: 

If you do

:e <folder name>

that will give you your folder buffer again.

Brian Agnew
+7  A: 

G'day,

If you enter

cntl-shift-6

you'll go back to your list of files.

Edit: If you've opened a few files you can get a list of all files open by entering:

:ls

And you'll see something like:

1 #    "ap22_build.sh.log"            line 10
2 %a   "ccc_apache2"                  line 34
3      "local_apache22"               line 12

Then you can use the number on the left to either go to that file by entering:

:3 b

Or open it in a split screen by entering:

:3 sb

HTH

cheers,

Rob Wells
+2  A: 

The name of the command is :Explore, but you can just simply type :E (capital).

WishCow
A: 

Have you considered installing the NerdTree plugin? It'll give you eays file browsing with bookmarks and the ability to open several files from the browser buffer without closing the buffer or changing focus.

innaM
A: 

I've just discovered you can :b <search-string> and tab complete across all files currently in buffers, very useful. With :set wildmenu it's even better!