Vim: File Browsing

By ruturajv

Not all must have used this feature of Vim, You can use Vim’s file browsing feature, to select and open a file all you need to do is know a “vsp” command.

To the “vsp” or the Vertical Split command give argument as “.”, a period. Which will prompt Vim to open left bar that will list all directories and files, directories first, just like any directory listing command of your OS.

Vim file browsing

You can traverse the directories by pressing “Enter” to change to that directory, and you can go on browsing.

If you want to open a file, Press “o” when the cursor is under that file. That will open the file in the same window as the Browser window.

If you want to open the file in the previously visited window, press “O” (Captial alphabet O). This will open the file in the previous window.

vim-file-browsing-open.png

Now you know how to use Vim as your favourite GUI Editor :)

3 Responses to “Vim: File Browsing”

  1. guna Says:

    its good. it is very usefull. if i want to open a file in a new window from the browser is there any option?

  2. ruturajv Says:

    press F1, especially in vim-X11 or gvim to see range of options.

  3. dotti Says:

    t opens files in a new tab, if that’s any help

Leave a Reply