💾 Archived View for laniakea.rodoste.de › tui › ranger.gmi captured on 2024-08-25 at 00:34:37. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-11-04)

-=-=-=-=-=-=-

🏠 home

ranger: file manager

2023-03-10

Ranger is a file browser for the commandline. This page contains my personal tweaks, config changes and commonly used keyboard shortcuts.

keyboard shortcuts

use nvim keys

| key seq.  | description                                                     |
| --------- | --------------------------------------------------------------- |
| h         | up one level                                                    |
| k         | down one level                                                  |
| j         | down one item in list                                           |
| k         | up one item in list                                             |
| Ctrl-D    | scroll down one half screen                                     |
| Ctrl-U    | scroll up one half screen                                       |
| gh        | quick jump to home dir                                          |

copy path and information

| key seq.  | description                                                     |
| --------- | --------------------------------------------------------------- |
| yd        | yank directory information (excludes filename)                  |
| yp        | yank absolute path information (includes filename)              |
| yn        | yank name (this is _only_ the file/dir name, no path            |
| y.        | yank name without extension                                     |

operations

| key seq.  | description                                                     |
| --------- | --------------------------------------------------------------- |
| :touch n  | create new file `n`                                             |
| :mkdir n  | create new diectory `n`                                         |
| a         | rename append (cursor at end of current name, before extension) |
| A         | rename append (cursor at end of extension)                      |
| I         | rename insert (cursor at beginning of name)                     |
| Space     | mark file                                                       |
| v         | mark all files in current list                                  |
| V         | mark in visual mode (can do this multiple times for segments)   |
| uV        | unmark in visual mode                                           |
| t         | toggle tag                                                      |
| yy        | copy marked (if any), current otherwise                         |
| dd        | cut marked (if any), current otherwise                          |
| dD        | delete marked (if any), current otherwise                       |
| pp        | paste (will dynamically rename doubles)                         |
| po        | paste overwrite                                                 |
| pl        | paste absolute symlink to yy-copied file                        |
| pL        | paste relative symlink to yy-copied file                        |

tweaks and config changes

Generally the `rc.conf` is extensive and superbly documented. Tweaking ranger is really easy.

Do have a look at the official documentation however, some aspects of the program are configured in other files.

Ranger has multiple options to integrate file previews into the TUI. What you can use depends on what other programs you have installed and which terminal you use. Do have a look.

theming

By default ranger will use the terminal theme, which is good enough for me. The `rc.conf` however does have some default colorschemes.

plugins & addons

I find the `devicons` plugin tremendously useful. If you're using a Nerdfont in your terminal — and you really should! — it adds file and folder icons and similar things to the interface. I find that this makes it much easier to find the right things.

https://github.com/alexanderjeurissen/ranger_devicons

To get the most out of ranger, I find that a bunch of additional software was required to make use of some of the built-in addons:

---

see all articles on command-line tools