summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-09-30 18:36:05 +0200
committerhut <hut@lavabit.com>2011-09-30 18:36:05 +0200
commitccdbeb81469164abf6912c1c28ffda944871c1f1 (patch)
treed6cd8e02f6467a696a64ad90f11182f74c92128d /ranger
parent54e67d04df356389680e547c918805545a9c080c (diff)
downloadranger-ccdbeb81469164abf6912c1c28ffda944871c1f1.tar.gz
added pager keybindings
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/commands.py2
-rw-r--r--ranger/defaults/rc.conf46
2 files changed, 36 insertions, 12 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index 20f40d13..78a406a7 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -857,7 +857,7 @@ class pmap(map_):
 	""":pmap <keysequence> <command>
 	Maps a command to a keysequence in the "pager" context.
 	"""
-	context = 'pager'
+	context = 'embedded_pager'
 
 
 class filter(Command):
diff --git a/ranger/defaults/rc.conf b/ranger/defaults/rc.conf
index 7743f37a..92573832 100644
--- a/ranger/defaults/rc.conf
+++ b/ranger/defaults/rc.conf
@@ -260,26 +260,50 @@ cmap <C-y>        eval fm.ui.console.paste()
 
 
 # ===================================================================
+# == Pager Keybindings
+# ===================================================================
+
+# Movement
+pmap j       eval -q fm.ui.pager.move(down=1)
+pmap k       eval -q fm.ui.pager.move(up=1)
+pmap gg      eval -q fm.ui.pager.move(down=0, absolute=True)
+pmap G       eval -q fm.ui.pager.move(down=-1, absolute=True)
+pmap <down>  eval -q fm.ui.pager.move(down=1)
+pmap <up>    eval -q fm.ui.pager.move(up=1)
+pmap <home>  eval -q fm.ui.pager.move(down=0, absolute=True)
+pmap <end>   eval -q fm.ui.pager.move(down=-1, absolute=True)
+
+pmap h       eval -q fm.ui.pager.move(left=4)
+pmap l       eval -q fm.ui.pager.move(right=4)
+pmap <left>  eval -q fm.ui.pager.move(left=4)
+pmap <right> eval -q fm.ui.pager.move(right=4)
+
+pmap q      eval -q fm.ui.close_pager(); fm.ui.close_embedded_pager()
+pmap i      eval -q fm.ui.close_pager(); fm.ui.close_embedded_pager()
+pmap <ESC>  eval -q fm.ui.close_pager(); fm.ui.close_embedded_pager()
+pmap <F3>   eval -q fm.ui.close_pager(); fm.ui.close_embedded_pager()
+
+# ===================================================================
 # == Taskview Keybindings
 # ===================================================================
 
 # Movement
-tmap j eval -q fm.ui.taskview.move(down=1)
-tmap k eval -q fm.ui.taskview.move(up=1)
-tmap gg eval -q fm.ui.taskview.move(down=0, absolute=True)
-tmap G eval -q fm.ui.taskview.move(down=-1, absolute=True)
+tmap j      eval -q fm.ui.taskview.move(down=1)
+tmap k      eval -q fm.ui.taskview.move(up=1)
+tmap gg     eval -q fm.ui.taskview.move(down=0, absolute=True)
+tmap G      eval -q fm.ui.taskview.move(down=-1, absolute=True)
 tmap <down> eval -q fm.ui.taskview.move(down=1)
-tmap <up> eval -q fm.ui.taskview.move(up=1)
+tmap <up>   eval -q fm.ui.taskview.move(up=1)
 tmap <home> eval -q fm.ui.taskview.move(down=0, absolute=True)
-tmap <end> eval -q fm.ui.taskview.move(down=-1, absolute=True)
+tmap <end>  eval -q fm.ui.taskview.move(down=-1, absolute=True)
 
 # Changing priority and deleting tasks
-tmap J eval -q fm.ui.taskview.task_move(-1)
-tmap K eval -q fm.ui.taskview.task_move(0)
-tmap dd eval -q fm.ui.taskview.task_remove()
+tmap J          eval -q fm.ui.taskview.task_move(-1)
+tmap K          eval -q fm.ui.taskview.task_move(0)
+tmap dd         eval -q fm.ui.taskview.task_remove()
 tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
-tmap <pageup> eval -q fm.ui.taskview.task_move(0)
-tmap <delete> eval -q fm.ui.taskview.task_remove()
+tmap <pageup>   eval -q fm.ui.taskview.task_move(0)
+tmap <delete>   eval -q fm.ui.taskview.task_remove()
 
 # A bunch of aliases for closing
 tmap w eval -q fm.ui.close_taskview()
emented version number and updated pydoc html files' href='/akspecs/ranger/commit/doc/pydoc/ranger.gui.widgets.taskview.html?h=v1.9.2&id=34a60763e79546e0f84e30fbcc430632f3dbb39e'>34a60763 ^
4c13e1f2 ^






b3556b21 ^
4c13e1f2 ^








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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150