Ranger the best File Manager for Mac (if you like vim)

Ranger is quickly becoming one of my most used tools. I just love the vim-inspired commands and extensibility. Ranger runs in a terminal and is fantastic. You can read av very short review on the blog Idea Machine. Ranger is developed using python and you need the make-tool to install properly. Ranger works quite well whithout installing but I find it a bit faster and better integrated in the environment after install. To get “make” on mac you need the xcode giganourmos developer pack installed. You can download appropriate version here: https://developer.apple.com/xcode/.

Download ranger from http://ranger.nongnu.org/

Install by running “make install:” in extraction folder. After install generate the config files (for tweaking) by running ” ranger –copy-config” you will generate a set of config files placed in the folder ~/.config/ranger

I have done the following modifications to them:

The file “options.py”:

# Which colorscheme to use? These colorschemes are available by default:
49 # default, default88, jungle, snow
50 # Snow is monochrome and default88 uses 88 colors.
51 #colorscheme = 'default'
52 colorscheme = 'default88'

The file rc.conf I added the following mappings to the default ones:

map DD shell trash %s
366 map shf set show_hidden=False
367 map sht set show_hidden=True
368 map vi shell mvim %s
369 map oo shell open %s
370 map DD shell rm -r %s
371 map cd console mkdir
372 map mv console shell mv %s

When ranger is installed I recommend you using the “deafult88” color theme instead of the default “default”

The default colortheme quite hard on the eyes especially the yellow for selections.

The “default88” is a much more readable colorscheme.

“default88” is a 256-color colortheme so you need a terminal with a 256-color mode. The default Terminal app works if you are using Lion but if youre on a Snow Leapoard or earlier you need to get the iterm terminal. You can download iterm here: http://www.iterm2.com/#/section/home

Once installed change color mode like this:

Using ranger is a pure treat, especially the excellent tab (new tab gn, switch tab gt) makes me realize that dual pane file managers aren’t a must… The man page for ranger is available online: http://ranger.nongnu.org/ranger.1.html

So huge cudos to the guys creating this tool and making it Open Source!

This entry was posted in Tooling. Bookmark the permalink.

4 Responses to Ranger the best File Manager for Mac (if you like vim)

  1. Martin Brien says:

    How do you open a pdf from ranger?

  2. benckau says:

    “shell open filename” Will invoke the “default” associated application (based on filetype). I have created a mapping for this in my rc.conf: map oo shell open %s
    So when I hit oo on any file the default associated app will open with the file loaded.

  3. Martin Brien says:

    This worked a treat! Thanks

  4. Yann says:

    zf toggle show hidden files, no need for a custom mapping.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s