summary refs log tree commit diff stats
path: root/ranger/help/movement.py
blob: a040783835fc8405276dd27cb9c3b67b209d35d8 (plain) (blame)
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
# Copyright (C) 2009, 2010  Roman Zimbelmann <romanz@lavabit.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

"""
1. Basic movement and browsing

1.1. Move around
1.2. Browser control
1.3. Searching
1.4. Cycling
1.5. Bookmarks
1.6. Mouse usage


==============================================================================
1.1. Ranger has similar movement keys as vim:

Note: A ^ stands for the Ctrl key.

	k	move up
	j	move down
	h	move left (in browser: move one directory up)
	l	move right (in browser: enter this directory, or run this file)

	^U	move half the screen up
	^D	move half the screen down
	H	in browser: move back in history
	L	in browser: move forward in history

	gg	move to the top
	G	move to the bottom
	%	move to the middle

By prefixing a number, you can give more precise commands, eg:

	2^D	move 2 pages down
	5gg	move to the 5th line
	3h	move 3 characters to the left, or move 3 directories up
	30%	move to 30% of the screen

Using arrow keys is equivalent of using h/j/k/l in most cases.
An exception to this is the console, where you can move around with
arrow keys and pressing letters will insert the letter into the console.

Special keys like Home, Page Up,.. work as expected.

These keys work like in vim:

	^U      move half the screen up
	^D      move half the screen down
	^B      move up by one screen
	^F      move down by one screen


==============================================================================
1.2. Browser control

	?	view the help screen
	R	reload the current directory
	^R	clear the cache and reload the view
	^L	redraw the window
	:	open the console |3?|
	b	toggle options

	i	inspect the content of the file
	E	edit the file
	s	open a shell, starting in the current directory

Marking files allows you to use operations on multiple files at once.
If there are any marked files in this directory, "yy" will copy them instead
of the file you're pointing at.

	<Space> mark a file
	v	toggle all marks
	V	remove all marks

By "tagging" files, you can highlight them and mark them to be
special in whatever context you want.

	t	tag/untag the selection
	T	untag the selection


==============================================================================
1.3. Searching

Use "/" to open the search console. |3?|
Enter a string and press <Enter> to search for it in all currently
visible files. Pressing "n" will move you to the next occurance,
"N" to the previous one.

You can search for more than just strings:
	TAB	search tagged files
	cc	cycle through all files by their ctime (last modification)
	cm	cycle by mime type, connecting similar files
	cs	cycle by size, large items first


==============================================================================
1.4. Sorting

To sort files, type "o" suffixed with a key that stands for a certain
sorting mode. By typing any of those keys in upper case, the order will
be reversed.

	os	sort by size
	ob, on	sort by basename
	om	sort by mtime (last modification)
	ot	sort by mime type
	or	reverse order


==============================================================================
1.5. Bookmarks

Type "m<key>" to bookmark the current directory. You can re-enter this
directory by typing "`<key>". <key> can be any letter or digit.
Each time you jump to a bookmark, the special bookmark at key ` will be set
to the last directory. So typing "``" gets you back to where you were before.

Note: The ' key is equivalent to `.


==============================================================================
1.6. Mouse usage

The mouse can be used to quickly enter directories which you point at,
or to scroll around with the mouse wheel. The implementation of the mouse
wheel is not stable due to problems with the ncurses library, but "it works
on my machine".

Clicking into the preview window will usually run the file. |2?|


==============================================================================
"""
# vim:tw=78:sw=4:sts=8:ts=8:ft=help