Ranger is a lightweight but powerful file manager with Vi-like key bindings. It shines at exploring file trees, looking for specific files, and performing bulk operations on folders and files. Three column layout will be very similar to Mac OS X users: center column shows contents of the current directory, left column lists contents of a parent directory, and the right column contains preview for the selected file or folder.
Ranger supports movement with familiar to Vi users
has internal command line which is invoked with
:, as well as many other
features and key bindings similar to Vi. Another great selling point - Ranger
can be extended with custom commands and key bindings. Utility is written in
Python, therefore all the commands are nothing more than Python scripts.
Ranger is easy to install and can be found in most public repositories, just
ranger package using your favorite package manager. While you’re at
it, you may want to install some external utilities to help Ranger properly
display file previews (list is taken from ArchWiki page on Ranger):
highlightfor syntax highlighting.
img2txt) for image previews in ASCII.
perl-image-exiftoolfor media file information.
pdftotext) for PDF.
transmission-clifor BitTorrent information.
w3mfor image previews.
After all the dependencies are installed, quickly start up
ranger, exit it
q, and run
ranger --copy-config=all to generate configuration files in
Here are a few of the key bindings and commands I found useful:
- Use spacebar to select files one by one. By selecting multiple files, you can
perform bulk operations on them. Use
Vto perform visual selection. Lowercase
vreverses current selection. For instance, you can run
:deleteafter selecting multiple files and folders.
- As mentioned above, execute
:deleteto remove currently selected file (or files).
- To fullscreen a preview window, hit
iagain to return the preview window to it’s normal size.
Gallow you to jump to the top and bottom of the file list respectively.
zhto toggle hidden files display.
- As in Vim,
/searches for a file in a current buffer, while
Nlet you navigate to the next and previous matches respectively.
:filterallows you to only limit your view to the files matching a pattern. It’s also interactive - changes are applied as you type.
If you’re an avid Vim user, you’ll find using Ranger surprisingly intuitive. Otherwise you might get confused and scared away, probably for a good reason. Ranger is designed to provide Vi-like feel for file browsing, and it does that job well.