When using Vim you can use :Explore to browser through files and folders.

Is there a simple way to start Vim in "Explore mode" from the terminal? Can I do this by just giving Vim some argument?


Alternatively (the passing of directory argument(s) as in @EvergreenTree's answer relies on the autocmds of the netrw plugin, and aren't a general solution), you can pass any Ex command to Vim on startup via the -c argument:

$ vim -c Explore

You can also use +, which is exactly the same as -c, except slightly shorter:

$ vim +Explore
| improve this answer | |

The "Explore Mode" you are talking about is netrw, a vim plugin which is provided by default. It should open in that "mode" if you just try to open a directory with vim, eg. vim foo/bar/baz/

| improve this answer | |
  • 3
    Thank you. So I guess the fastest way to do this is vim .. – Gonçalo Ribeiro Mar 9 '15 at 1:10


vim +Ex

It'll execute :Ex (:Explore) on vim startup to explore the current directory.

| improve this answer | |


  • You're using gvim
  • Your vim supports +clientserver (see vim --version)

Then the following will allow you to simply type gvim (by itself) and get a browser display showing:

augroup VimStartup
au VimEnter * if expand("%") == "" && argc() == 0 && (v:servername =~ 'GVIM\d*' || v:servername == "") | e . | endif
augroup END

(put this into your .vimrc)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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