Questions tagged [ranger]

Ranger is a terminal-based file manager with vi-style key bindings.

Filter by
Sorted by
Tagged with
22
votes
3answers
9k views

Ranger cd into a folder?

I'm using Ranger to navigate around my file system. Is there a shortcut where I cd into that folder?
15
votes
3answers
7k views

How to create a new file / directory using ranger?

I suppose I could use mkdir / touch but I'm not sure if these would go in the current directory as viewed in ranger.
14
votes
1answer
11k views

Execute command on ranger selection?

I haven't found an advanced tutorial on ranger yet, so my question is: is it possible to execute a command on a selection of files in ranger? If so, how would I do that?
11
votes
2answers
4k views

How to refresh or reload rc.conf in ranger file manager?

At the moment I am constantly changing the rc.conf and rifle.conf files, but every time I want to test the new configuration I need to exit ranger and start again. Is there a solution for this? In ...
9
votes
1answer
6k views

How can I move all `marked` files to another directory in ranger?

When I select multiple files within ranger (using <Space> or V), how do I move these selected files to another directory? I've tried to use dd and pp, but this only moves the file that's ...
8
votes
2answers
1k views

How to cancel a copy operation in ranger file manager?

When I move files and paste in another location, sometimes I make a mistake typing yy instead dd. Then I can't find any means to cancel the copy operation.
8
votes
4answers
6k views

Preview PDF as image in ranger

How can I preview PDFs as images in ranger? By default it uses pdftotext (in the scope.sh preview configuration file), but I would like to use pdfimages, pdftoppm, or another graphical solution ...
8
votes
2answers
11k views

ranger image-preview with transparent terminal background

I like the image-preview in ranger, but I also like my terminal transparent. Is there really no way to get the image-preview work with w3m and transparent background? (I'm willing to change my ...
7
votes
2answers
12k views

How to change the default text editor in ranger?

Currently, ranger will only open text files with nano, and I want it to open them with vim. As per the Arch Wiki I have tried adding has xdg-open, flag f = xdg-open "$1" ext txt = vim "$@" to rifle....
6
votes
1answer
2k views

What does the the red star / asterix indicate in Ranger?

What does the red star mean in the Ranger file navigator? Result of running ls -la in same directory: drwxrwxr-x 2 philip philip 4096 Oct 18 23:45 . drwxrwxr-x 5 philip philip 4096 Oct 18 23:36 .. -...
6
votes
1answer
4k views

Ranger - open_with without suspending

When I open a file into ranger with a GUI application not listed in the rifle.conf file (i.e. using the open_with command), the ranger terminal window gets "suspended" until I close the GUI app. For ...
5
votes
2answers
2k views

How do I find out what program ranger is using to preview a file?

I am using the ranger terminal based file manager to navigate and view files. When I navigate to a folder which contains pdf files, and position the cursor on a PDF file ranger reads the file and ...
5
votes
1answer
165 views

xmodmap key bindings reset when I open a new tab in the shell

When I open a shell in ranger with shift-s, open vim and then open a shell with :sh or open a new shell tab with ctrl-shift-t, my xmodmap keybindings (swapped caps lock and escape keys) are reset. ...
4
votes
1answer
6k views

Set Environment Variable for Ranger File Manager

I've recently stumbled across ranger file manager and immediately took a liking to it but I'm having a problem. How is it possible to change environment variables for ranger? I want my default editor ...
4
votes
2answers
2k views

Open multiple files from ranger in vim

When I highlight multiple files in ranger from the same dir, I can open them all in vim with r and than 0 or @ and than add vim. But if I highlight files from different dirs, than this doesn't work. ...
3
votes
2answers
4k views

Sort files in specific folder with ranger

I would like to sort the files in my Screenshots folder by date, so I added the following to my rc.conf: setlocal PATH=~/Screenshots sort mtime setlocal PATH=~/Screenshots sort_reverse False But it ...
3
votes
1answer
1k views

How to enable syntax highlighting in ranger preview?

I have seen some screenshots where ranger uses syntax-highlighting in its preview window. So I was wondering how to enable this feature and found out that I need the scope.sh file in the directory /...
3
votes
1answer
1k views

Is there a way to get ranger to syntax-highlight files using the X colorscheme of the terminal?

The file manager ranger works great, and uses the normal X resources color scheme of my terminal (urxvt). But when it shows a preview of files and highlights their syntax (presumably using highlight ...
3
votes
2answers
1k views

“scope.sh” is lacking for ranger file manager

Ranger is a file manager using Miller columns to navigate between the tree. It has an external script called scope.sh that previews files utilizing external applications such as the .torrent files ...
3
votes
2answers
167 views

Bicon. Incorrect exit from shell, open in ranger

Installed bicon-git, this is written in .bashrc # hack to launch bicon if not launched if ! [[ "$(ps -p $(ps -p $(echo $$) -o ppid=) -o comm=)" =~ 'bicon'* ]]; then bicon.bin fi Launch ranger ...
3
votes
2answers
1k views

open(1) in rifle.conf for ranger on OS X

ranger ~/.config/ranger/rifle.conf For simplicity What one line – in the rifle configuration file – could cause open(1) to be used for all types of file? Background https://forums.pcbsd.org/...
3
votes
1answer
170 views

Store opened tabs of sessions into file

Is it possible to store the current ranger session into a file so to restore it at a later point in time? EDIT: I ask this question because I use many different ranger sessions and tabs inside a tmux ...
3
votes
4answers
4k views

ranger: open many files with mplayer

I use the file explorer called ranger and I wonder if it is possible to open many files in different directory with mplayer? What I can already do is to select all the files (pressing v) from one ...
3
votes
1answer
457 views

Default application used for “open folder” in popup menu

When I enter, for instance, xdg-mime query filetype Video/movie.mkv, the output is video/x-matroska; if I then enter xdg-mime query default video/x-matroska, the output is mplayer.desktop, and that is ...
2
votes
2answers
1k views

Ranger : do not try to display large files (preview)

I am using Ranger as a file explorer, and by the way it's great... I have an issue because Ranger can display a preview of the file currently selected. Which is quite useful but becomes problematic ...
2
votes
1answer
612 views

Refresh cache of Ranger file manager

How do I refresh ranger file manager? It automatically refreshes if a file is changed/edited/created/removed inside current directory, but I want to be able to force it to do so. How would I do that?
2
votes
1answer
215 views

How to “follow” symlink in Ranger to open containing directory of target?

In Ranger, I often have symlink and I want to go to the containing directory of the file that is linked to. How to do this with Ranger?
2
votes
1answer
37 views

How can I view current file only instead of all marked files in ranger?

In the ranger file manager, https://github.com/ranger/ranger, how can I open the currently selected file instead of all marked files? I'd like to iterate through a directory and choose whether I mark ...
2
votes
0answers
59 views

“Union” based file manager

I would like to be able to perform actions on files in different locations within a common window/container. Let's say I have the following directory structure: └── DCIM    ├── browser-photos    │ ...
1
vote
2answers
102 views

How to create multiple directories in Ranger?

As in the equivalent of mkdir dir1 dir2 when running in bash. This creates two separate directories, dir1 and dir2. If you run :mkdir dir1 dir2 in ranger, it simply creates a directory called 'dir1 ...
1
vote
2answers
247 views

Where is the editor choice kept in ranger?

On a fresh ranger install I tried to open neofetch config with ranger and selected ed to see what is it. I am glad Ctrl+D worked to exit the ed, but now ranger opens all files with it. Restarting ...
1
vote
1answer
127 views

How to bind a keyboard shortcut in zsh to a program requiring stdin?

This is a follow-up to this question: I'm trying to create a keyboard shortcut for the terminal file manager ranger, in order to jump from the zsh prompt into the file manager with a single keystroke. ...
1
vote
1answer
1k views

Preview files in ranger

I have been able to preview images in ranger. But for some reason I don't have file preview. Not for any type of files. Not for compressed files either. I'm running linux mint and ranger v1.7.1. How ...
1
vote
2answers
838 views

Open file behavior using Ranger in Windows Subsystem for Linux

I am using Microsoft Windows ([Version 10.0.15063]) subsystem for Linux and observe an unexpected behavior when opening files using Ranger file manager in bash. For example, I have ~/.config/rifle....
1
vote
2answers
1k views

Ranger what program is opening file?

I'm using ranger and when I navigate to a folder with audio files and press enter it plays mp3 files in terminal. The terminal audio program isn't my default as when I double click from GUI a ...
1
vote
2answers
744 views

How to script ranger to copy a file to another directory via python

ranger is a command line file manager that can be extended with python. The commands.py file contains examples of the built in commands: https://github.com/ranger/ranger/blob/master/ranger/config/...
1
vote
0answers
18 views

jump to a directory inside of ranger

I tried :cd path but it does literally nothing. Imagine I open ranger while inside of ~/dir/, now I want to go to ~/somewhere/else/ while inside of ranger. I know I can hjjjj(whatever)lj/k(whatever)...
1
vote
1answer
88 views

Ranger: Add Foxit pdf reader to rifle.conf

I've Zathura as my default pdf viewer which is fine. I've also installed Foxit Reader but it doesn't show up when I try to open any pdf file in ranger with r key. I tried adding following line in my ...
1
vote
1answer
65 views

Atom crashes after closing the file manager ranger

When I open a file with atom through ranger and than close the terminal which executes ranger, it causes the atom editor to close too, my configuration file looks like: user@computer ~ $ cat ~/....
0
votes
2answers
36 views

How to change relative symlinked path to “actual” one (in ranger or terminal)

What is actual path? Consider folder A in the file system and a symlinked B to it. Consider currently in ranger (or terminal) inside a sub-directory within B such as /home/B/sub1/sub2 which is in fact ...
0
votes
2answers
354 views

Use ranger as my default file manager in i3wm

When download a file via browser, the download status message box has an option named show in folder, How can I configure it to open ranger when I click it? Reason I want to do it: I'm currently ...
0
votes
1answer
179 views

How do you go back to the previous directory in Ranger?

In Ranger you can go to a directory with g. When you type g it gives you a list of places you can very easily go. For example g, and then p takes me to /tmp. How do I get back to the directory I was ...
0
votes
1answer
161 views

Ranger cannot open pdf files with Foxitreader

I have the following lines in my rifle.conf for reading pdf files: ext pdf, has foxitreader, X, flag f = foxitreader -- "$@" ext pdf, has evince, X, flag f = evince -- "$@" ext pdf, has zathura, ...
0
votes
0answers
10 views

Configure Ranger file manager to open google docs synched by Insync

I have arch linux with all the lastest updates, and I am running Ranger file manager version 1.9.2-1. I use insync version 1.5.7 to sync my google drive files to the laptop. If I open a terminal ...
0
votes
0answers
58 views

w3m does not show images

I'm trying to use w3m to show image previews in ranger but I can't get it to work. w3m seems to be working for drawing in general as i can display webpages in the terminal. However when i try w3m ...
0
votes
0answers
18 views

Ranger: How to Remap hjkl Keys?

I using Ranger and I am a Colemak Keyboard Layout user. I want to remap the h, j, k, and l keys to n, u, e, i keys. I tried this: issue #8 and Ranger doesn't seem to read from ~/.config/ranger/keys.py....
0
votes
1answer
255 views

ranger “set preview_files true” does not work

Since quite some time the file-preview-window in ranger stays empty. I.e. it indeed shows up but does not preview the content of text-files. Image preview and .pdf preview however does work. The ...
0
votes
0answers
164 views

How do I delete a single one-off file without disturbing the batch-job I'm making?

As a follow up to this question, how do I delete a single file without losing the selection that I've already got? for i in $(seq 1 5); do touch "$i.jpg"; done; mkdir subdir Let's say you marked 1....
0
votes
0answers
19 views

Batch moving a custom set of images with Ranger? [duplicate]

This is a question for the Ranger (file manager) Let's say that I have a directory with five files.. for i in $(seq 1 5); do touch "$i.jpg"; done; mkdir subdir How would I move 1.jpg, and 4.jpg, ...
0
votes
1answer
179 views

Ranger, open file freeze the terminal

I set Viewnior for open image files, but when I open any image file (jpg or png) ranger stays frozen or something similar, and I only can return to ranger when I close the app that opened the file. ...