sponsor Vim development Vim logo Vim Book Ad

vim-ranger : A vim plugin which uses ranger as explorer

 script karma  Rating 26/13, Downloaded by 2316  Comments, bugs, improvements  Vim wiki

created by
Tianjiao Yin
script type

How to use it

It just works.

User Guide

`ranger <http://ranger.nongnu.org/>;`_ is a file manager with VI key bindings.

This plugin is similar to `nerdtree <https://github.com/scrooloose/nerdtree>;`_.
It overrides the default file browser (netrw), so if you :edit a directory a ranger will be opened.
When you open a file in ranger, it will be opened in vim.
You could also select multiple files and open'em all at once (use ``v`` to select multiple files in ranger).
BTW, don't use it with nerdtree at the same time.


You can add ``nnoremap <f3> :tabe %:p:h<cr>`` to your .vimrc so that you could use ``<f3>`` to open new files in new tab.

Known issue

1. (Only for vanilla vim) After opening ranger once and back to vim, you can't use arrow-up/arrow-down to observe vim command line ":" history doesn't work anymore (unless restart vim).
   Workaground: use Ctrl+UP/DOWN to observe history, instead of just UP/DOWN.
2. (Only for neovim) some shortcut don't work, such as "F8", "<c-h>" because of neovim limitation.


ranger >= 1.5.1


This plugin is forked from the official ranger example here:

There are 3 main differences

1. Unlike the original plugin, in my plugin the files are opened in tabs instead of buffers.
2. Ranger will be opened automatically when you :edit a directory. The original plugin requires to execute a vim command to open ranger.
3. My plugin supports neovim.

Copyright (C) 2015 Tianjiao Yin <ytj000@gmail.com>
install details
move it into .vim/plugin

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
ranger.vim 0.5 2016-07-11 7.0 Tianjiao Yin refactor
ranger.vim 0.4 2015-08-04 7.0 Tianjiao Yin add gvim support
ranger.vim 0.3 2015-03-09 7.0 Tianjiao Yin close window is nothing to read
ranger.vim 0.2 2015-03-09 7.0 Tianjiao Yin update
ranger.vim 0.1 2015-03-09 7.0 Tianjiao Yin Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.