From: Dmitry Fedotov Date: Sat, 7 Jun 2025 20:08:51 +0000 (+0300) Subject: Add info about ranger. X-Git-Url: https://www.git.dmfe.net/?a=commitdiff_plain;h=99fe7881cd321ee63143bb8f6cce16d408250db4;p=dmfe-website Add info about ranger. --- diff --git a/docs/unix-linux/utils/ranger.md b/docs/unix-linux/utils/ranger.md new file mode 100644 index 0000000..ae826c6 --- /dev/null +++ b/docs/unix-linux/utils/ranger.md @@ -0,0 +1,104 @@ +--- +tags: + - linux + - unix + - utils + - ranger +--- + +# ranger + +[ranger](https://ranger.fm/) is a console file manager with VI key bindings. + +It provides minimalistic curses interface with a view on the directory. + +## cheatsheet + +### General + +| Shortcut | Description | +| -------- | --------------------------- | +| `ranger` | Start Ranger | +| `Q` | Quit Ranger | +| `R` | Reload current directory | +| `?` | Ranger Manpages / Shortcuts | + +### Movement + +| Shortcut | Description | +| -------- | -------------------- | +| `k` | up | +| `j` | down | +| `h` | parent directory | +| `l` | subdirectory | +| `gg` | go to top of list | +| `G` | go to bottom of list | +| `J` | half page down | +| `K` | half page up | +| `H` | history back | +| `L` | history forward | +| `~` | switch the view | + +### File Operations + +| Shortcut | Description | +| ---------- | -------------------------- | +| `Enter` | Open | +| `r` | open file with | +| `z` | toggle settings | +| `o` | change sort order | +| `zh` | view hidden files | +| `cw` | rename current file | +| `yy` | yank / copy | +| `dd` | cut | +| `pp` | paste | +| `/` | search for files `:search` | +| `n` | next match | +| `N` | prev match | +| `` | Delete | + +### Commands + +| Shortcut | Description | +| -------- | ------------------------------------------------------------------------- | +| `:` | Execute ranger command | +| `!` | Execute shell command | +| `chmod` | Change file permissions | +| `du` | Disk usage of current directory | +| `S` | Run the terminal in the current ranger window (exit to go back to ranger) | + +### Tabs + +| Shortcut | Description | +| ------------- | --------------------- | +| `C-n` | Create new tab | +| `C-w` | Close current tab | +| `tab` | Next tab | +| `shift + tab` | Prev tab | +| `alt + [n]` | goto / create [n] tab | + +### File substituting + +| Shortcut | Description | +| -------- | ----------------------------------- | +| `%f` | Substitute highlighted file | +| `%d` | Substitute current directory | +| `%s` | Substitute currently selected files | +| `%t` | Substitute currently tagged files | + +### Example of substitution + +``` +: bulkrename %s +``` + +### Marker + +| Shortcut | Description | +| --------------- | --------------------------------- | +| `m + ` | Create Marker | +| `um + ` | Delete Marker | +| `' + ` | Go to Marker | +| `t` | tag a file with an * | +| `t"` | tag a file with your desired mark | +