Every now and then I search and tinker with TUIs1 that optimize my development workflow. I’m one of those guys now who tells everyone to spend one or two weeks on setting up a fast & useful workflow before starting to code. This post talks a little about a tool called ranger : a command-line tool for faster navigation & my love at first-sight ♥
Ranger is a file explorer for command line with (configurable) vim-like keybindings. Which means you can
change permissions & do a whole lot of other operations while being inside terminal with easy to use ncurses based interface & mnemonic2 keybindings!
If you use Arch Linux, you can get it from
yaourt: open terminal and execute
yaourt rangerand pick either ranger from community or ranger-git from aur.
Otherwise follow instructions from their git repository.
General Instructions :
- To start : Open your terminal and type
?for manpages and shortcuts.
Rto reload current directory (not really required most of the time).
- Every keybinding mentioned below is configurable.
- Tab completion is supported.
Basic Usage :
- Quick navigation while being inside terminal :
- You can use arrow keys
← ↑ → ↓or vim-like
h j k lto navigate.
hwill take you to parent directory of current directory.
lwill take you to sub-directory of current directory.
ggto go to top of list and
Gto go to bottom.
- To copy or yank a single file, press
:copywhen it is highlighted.
- To cut a single file, press
:cutwhen it is highlighted.
- Paste file(s) with
:paste. If you paste files with same name, it’ll rename to avoid same names.
- You can overwrite while pasting if you don’t want to rename by using
To delete a file, use
To operate on multiple files, you’ll have to mark them first at a time with
SPCkey or you can also mark multiple at once with
SHIFT + V + (↑ ↓)and then proceeed as usual with
- To rename a file or folder, you can use
cwwhich corresponds to
change wordin vim. Or you can simply use the command
:rename <new name>.
Text-based user interface (TUI), also called textual user interface or terminal user interface, is a retronym coined sometime after the invention of graphical user interfaces. TUIs display computer graphics in text mode. An advanced TUI may, like GUIs, use the entire screen area and accept mouse and other inputs. ↩
Mnemonic : A pattern of letters which assists in remembering something. ↩