1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# ===================================================================
# This file contains startup commands for ranger.
#
# The purpose of this file is mainly to define keybindings. For
# changing settings or running more complex python code, use the
# configuration file "options.py" or define commands in "commands.py".
#
# Each line is a command that will be run before the user interface
# is initialized. As a result, you can not use commands which rely on
# the UI such as "delete" or "mark". Lines starting with # are comments.
#
# Note: Press 1? in ranger for a list of key bindings and 2? for a list
# of commands.
# ===================================================================
# The "map" command maps a key sequence to a command. "map gt cd /tmp"
# maps the keys "gt" to the command "cd /tmp". "copymap" copies a key
# binding to another key sequence and "unmap" deletes the given key binding.
#
# Here are some examples:
## go to common directories (this overrides some default keybindings)
#map gt cd /tmp
#map gc cd ~/.config
#map gp cd /usr/portage
#map gb cd /boot
## Unbind "q" so you don't accidentally close ranger
#unmap q
## Edit files with the lowercase "e". By default, uppercase "E" is used.
#copymap E e
## Add a key for searching files with a given string in their name
#map F console shell -p find . | grep -Iir --color
## Find all files in this directory, shuffle them and view in mplayer
#map M shell find . | shuf | xargs -d \\n mplayer -fs
## Add some keys to edit configuration files
#map ,r chain shell vim ~/.config/ranger/rc.conf; source_cmdlist ~/.config/ranger/rc.conf
#map ,a shell vim ~/.config/ranger/apps.py
#map ,c shell vim ~/.config/ranger/commands.py
#map ,o shell vim ~/.config/ranger/options.py
## And some keys to view defaults
#map ,R shell vim %rangerdir/defaults/rc.conf
#map ,A shell vim %rangerdir/defaults/apps.py
#map ,C shell vim %rangerdir/defaults/commands.py
#map ,O shell vim %rangerdir/defaults/options.py
#map ,n shell vim %rangerdir/core/actions.py
## You might want to scroll up/down with u/d like in a pager
#copymap d D
#copymap u U
#map d move down=0.8 pages=True
#map u move up=0.8 pages=True
## Or scroll up/down with ^P/^N:
#copymap <down> <C-N>
#copymap <up> <C-P>
|