From dd91e08456cc9e0c71b22c58fe67ab7e0e3bdf91 Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 1 Apr 2010 01:26:03 +0200 Subject: added a man page --- doc/ranger.1 | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 doc/ranger.1 (limited to 'doc/ranger.1') diff --git a/doc/ranger.1 b/doc/ranger.1 new file mode 100644 index 00000000..29958cb4 --- /dev/null +++ b/doc/ranger.1 @@ -0,0 +1,187 @@ +.TH RANGER 1 ranger-1.0.4 +.SH NAME +ranger - file manager with a high range overview +.\"----------------------------------------- +.SH SYNOPSIS +.B ranger +.R [OPTIONS] [FILE] +.\"----------------------------------------- +.SH DESCRIPTION +ranger is a file manager with an ncurses frontend that is designed for +smooth interaction with the human visual interface and compatibility with +the muscle memory of individuals with long term exposure to common CLI tools +of unix-like operating systems. +.\"----------------------------------------- +.SH OPTIONS +.TP +--version +Print the version and exit. +.TP +-h, --help +Print a list of options and exit. +.TP +-d, --debug +Activate the debug mode: Whenever an error occurs, ranger will exit and +print a full backtrace. The default behaviour is to merely print the +name of the exception in the statusbar/log and to try to keep running. +.TP +-c, --clean +Activate the clean mode: Ranger will not access or create any configuration +files nor will it leave any traces on your system. This is useful when +your configuration is broken, when you want to avoid clutter, etc. +.TP +-r \fIdir\fR, --confdir=\fIdir\fR +Define a different configuration directory. The default is $HOME/.ranger. +.TP +-m \fIn\fR, --mode=\fIn\fR +When a filename is supplied, make it run in mode \fIn\fR. Check the +documentation for more information on modes. +.TP +-f \fIflags\fR, --flags=\fIflags\fR +When a filename is supplied, make it run with the flags \fIflags\fR. Check the +documentation for more information on flags. +.\"----------------------------------------- +.SH USAGE +.\"----------------------------------------- +.SS Keybindings +Many keybindings take an additional numeric argument. Type \fI5j\fR to move +down 5 lines, \fI10\fR to mark 10 files or \fI3?\fR to read the +third chapter of the documentation. +.TP +h, j, k, l +Move left, down, up, right +.TP +^D or J, ^U or K +Move a half page down, up +.TP +H, L +Move back and forward in the history +.TP +gg +Move to the top +.TP +G +Move to the bottom +.TP +yy +Yank the selection. (mark the files as copied) +.TP +dd +Cut the selection +.TP +pp +Paste the copied/cut files. By default, this will not overwrite existing +files. To overwrite them, use \fBpo\fR. +.TP +m\fIX\fR +Create a bookmark with the name \fIX\fR +.TP +`\fIX\fR +Move to the bookmark with the name \fIX\fR +.TP +n, N +Find the next file, the previous file. You can define what to look for +by typing c\fIX\fR. If nothing is specified, pressing n will get you to +the newest file in the directory. +.TP +o\fIX\fR +Change the sort method (like in mutt) +.TP +z\fIX\fR +Change settings +.TP +f +Quickly navigate by entering a part of the filename +.TP +Space +Mark a file +.TP +v, V +Toggle the mark-status of all files, unmark all files +.TP +/ +Open the search console +.TP +: +Open the command console +.TP +? +Opens the help screen with more keybindings and documentation +.\"----------------------------------------- +.SS Mouse Usage +.TP +Left Mouse Button +Click on something and you'll move there. +To run a file, "enter" it, like a directory, by clicking on the preview. +.TP +Right Mouse Button +Enter a directory +.TP +Scroll Wheel +Scroll +.\"----------------------------------------- +.SS Commands +.TP +:delete +Destroy all files in the selection with a roundhouse kick. Ranger will +ask for a confirmation if you attempt to delete multiple (marked) files or +non-empty directories. +.TP +:rename \fInewname\fR +Rename the current file. Also try the keybinding A for appending something +to a file name. +.TP +:quit +Quit ranger. The current directory will be bookmarked as ' so you can +re-enter it by typing `` or '' the next time you start ranger. +.\"----------------------------------------- +.SH TIPS +.SS +Change the directory after exit +A script like this in your bashrc would make you change the directory +of your parent shell after exiting ranger: +.nf + +ranger() { + $(which ranger) $@ && + cd "$(grep \\^\\' ~/.ranger/bookmarks | cut -b3-)" +} +.\"----------------------------------------- +.SH CONFIGURATION +The files in +.B ranger/defaults/ +can be copied into your configuration directory (by default, this is +$HOME/.ranger) and customized according to your wishes. +.B ranger/defaults/options.py +doesn't have to be copied completely though: Just define those settings +you want to change and they will override the default values. +Colorschemes can be placed in $HOME/.ranger/colorschemes. +.P +All configuration is done in Python. +Each configuration file should contain sufficient documentation. +.\"----------------------------------------- +.SH COPYRIGHT +Copyright \(co +2009, 2010 +Roman Zimbelmann +.P +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. + +There is NO warranty; +not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.\"----------------------------------------- +.SH SEE ALSO +The project page: +.RB < http://savannah.nongnu.org/projects/ranger > +.P +The mailing list: +.RB < http://savannah.nongnu.org/mail/?group=ranger > +.\"----------------------------------------- +.SH BUGS +Since Chuck Norris, the Texas Ranger, watches over this project, there ought +to be no bugs. If you think otherwise, please report them here: +.P +.RB < http://savannah.nongnu.org/bugs/?group=ranger > -- cgit 1.4.1-2-gfad0 From af9b8b3bfd804e703623bfbad2245ef709603283 Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 1 Apr 2010 03:05:26 +0200 Subject: ranger.1: updated --- doc/ranger.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/ranger.1') diff --git a/doc/ranger.1 b/doc/ranger.1 index 29958cb4..d31984fe 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -1,6 +1,6 @@ .TH RANGER 1 ranger-1.0.4 .SH NAME -ranger - file manager with a high range overview +ranger - visual file manager .\"----------------------------------------- .SH SYNOPSIS .B ranger -- cgit 1.4.1-2-gfad0 From 921fa593d056ad791a48570196664ca29f57a8d4 Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 1 Apr 2010 03:54:32 +0200 Subject: ranger.1: update --- doc/ranger.1 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'doc/ranger.1') diff --git a/doc/ranger.1 b/doc/ranger.1 index d31984fe..13f47ca2 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -7,10 +7,13 @@ ranger - visual file manager .R [OPTIONS] [FILE] .\"----------------------------------------- .SH DESCRIPTION -ranger is a file manager with an ncurses frontend that is designed for -smooth interaction with the human visual interface and compatibility with -the muscle memory of individuals with long term exposure to common CLI tools -of unix-like operating systems. +Ranger is a file manager with an ncurses frontend written in Python. +.P +It is designed to give you a broader overview of the file system by displaying +previews and backviews, dividing the screen into several columns. +The keybindings are similar to those of other console programs like +.BR vim ", " mutt " or " ncmpcpp +so the usage will be intuitive and efficient. .\"----------------------------------------- .SH OPTIONS .TP -- cgit 1.4.1-2-gfad0 From 85a9a41ebf4092e33cb1d176b94d427c01a10e32 Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 6 Apr 2010 01:29:27 +0200 Subject: updated keybindings and documentation --- doc/ranger.1 | 22 +++++++++++++++++++++- ranger/defaults/keys.py | 6 +++--- ranger/help/movement.py | 20 +++++++++++++++++--- 3 files changed, 41 insertions(+), 7 deletions(-) (limited to 'doc/ranger.1') diff --git a/doc/ranger.1 b/doc/ranger.1 index 13f47ca2..e62cee54 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -46,7 +46,7 @@ documentation for more information on flags. .\"----------------------------------------- .SH USAGE .\"----------------------------------------- -.SS Keybindings +.SS General Keybindings Many keybindings take an additional numeric argument. Type \fI5j\fR to move down 5 lines, \fI10\fR to mark 10 files or \fI3?\fR to read the third chapter of the documentation. @@ -66,6 +66,12 @@ Move to the top G Move to the bottom .TP +^R +Reload everything +.TP +^L +Redraw the screen +.TP yy Yank the selection. (mark the files as copied) .TP @@ -111,6 +117,20 @@ Open the command console ? Opens the help screen with more keybindings and documentation .\"----------------------------------------- +.SS Keybindings for using Tabs +Tabs are used to work in different directories in the same Ranger instance. +.TP +g\fIN\fR +Open a tab. N has to be a number from 0 to 9. If the tab doesn't exist yet, +it will be created. +.TP +gt, gT +Go to the next or previous tab. You can also use TAB and SHIFT+TAB. +.TP +gc, ^W +Close the current tab. The last tab cannot be closed. +.P +.\"----------------------------------------- .SS Mouse Usage .TP Left Mouse Button diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py index 6628e064..9be42a78 100644 --- a/ranger/defaults/keys.py +++ b/ranger/defaults/keys.py @@ -168,8 +168,8 @@ def initialize_commands(map): # ------------------------------------------------------------ tabs map('gc', ctrl('W'), fm.tab_close()) - map('gt', fm.tab_move(1)) - map('gT', fm.tab_move(-1)) + map('gt', TAB, fm.tab_move(1)) + map('gT', KEY_BTAB, fm.tab_move(-1)) for n in range(10): map('g' + str(n), fm.tab_open(n)) @@ -179,7 +179,7 @@ def initialize_commands(map): map('n', fm.search()) map('N', fm.search(forward=False)) - map(TAB, fm.search(order='tag')) + map('ct', fm.search(order='tag')) map('cc', fm.search(order='ctime')) map('cm', fm.search(order='mimetype')) map('cs', fm.search(order='size')) diff --git a/ranger/help/movement.py b/ranger/help/movement.py index a0407838..e9dd6fad 100644 --- a/ranger/help/movement.py +++ b/ranger/help/movement.py @@ -21,7 +21,8 @@ 1.3. Searching 1.4. Cycling 1.5. Bookmarks -1.6. Mouse usage +1.6. Tabs +1.7. Mouse usage ============================================================================== @@ -102,7 +103,7 @@ 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 + ct 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 @@ -134,7 +135,20 @@ Note: The ' key is equivalent to `. ============================================================================== -1.6. Mouse usage +1.6. Tabs + +Tabs are used to work in different directories in the same Ranger instance. +In Ranger, tabs are very simple though and only store the directory path. + + gt Go to the next tab. (also TAB) + gT Go to the previous tab. (also Shift+TAB) + g Open a tab. N has to be a number from 0 to 9. + If the tab doesn't exist yet, it will be created. + gc, ^W Close the current tab. The last tab cannot be closed. + + +============================================================================== +1.7. 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 -- cgit 1.4.1-2-gfad0 From 1ee34606450cabd86a62ca5992775729e9dd098a Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 6 Apr 2010 01:54:46 +0200 Subject: Improved tabs --- doc/ranger.1 | 3 +++ ranger/core/actions.py | 25 ++++++++++++++----------- ranger/defaults/keys.py | 1 + ranger/gui/widgets/titlebar.py | 7 +++++++ ranger/help/movement.py | 1 + 5 files changed, 26 insertions(+), 11 deletions(-) (limited to 'doc/ranger.1') diff --git a/doc/ranger.1 b/doc/ranger.1 index e62cee54..2e03b729 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -124,6 +124,9 @@ g\fIN\fR Open a tab. N has to be a number from 0 to 9. If the tab doesn't exist yet, it will be created. .TP +gn +Create a new tab. +.TP gt, gT Go to the next or previous tab. You can also use TAB and SHIFT+TAB. .TP diff --git a/ranger/core/actions.py b/ranger/core/actions.py index d52dac2b..b40febc8 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -428,12 +428,15 @@ class Actions(EnvironmentAware, SettingsAware): def _get_tab_list(self): return sorted(self.tabs) - def tab_open(self, name): - if name in self.tabs: - self.current_tab = name - self.enter_dir(self.tabs[name], remember=False) + def tab_open(self, name, path=None): + do_emit_signal = name != self.current_tab + self.current_tab = name + if path or (name in self.tabs): + self.enter_dir(path or self.tabs[name]) else: - self.tab_new(name) + self._update_current_tab() + if do_emit_signal: + self.signal_emit('tab.change') def tab_close(self, name=None): if name is None: @@ -454,12 +457,12 @@ class Actions(EnvironmentAware, SettingsAware): if newtab != self.current_tab: self.tab_open(newtab) - def tab_new(self, name, path=None): - self.current_tab = name - if path: - self.enter_dir(path, remember=False) - else: - self._update_current_tab() + def tab_new(self): + for i in range(10): + i = (i + 1) % 10 + if not i in self.tabs: + self.tab_open(i) + break def _update_current_tab(self): self.tabs[self.current_tab] = self.env.cwd.path diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py index 9be42a78..63e09dfd 100644 --- a/ranger/defaults/keys.py +++ b/ranger/defaults/keys.py @@ -170,6 +170,7 @@ def initialize_commands(map): map('gc', ctrl('W'), fm.tab_close()) map('gt', TAB, fm.tab_move(1)) map('gT', KEY_BTAB, fm.tab_move(-1)) + map('gn', ctrl('N'), fm.tab_new()) for n in range(10): map('g' + str(n), fm.tab_open(n)) diff --git a/ranger/gui/widgets/titlebar.py b/ranger/gui/widgets/titlebar.py index 4bd15e0f..c643b8a8 100644 --- a/ranger/gui/widgets/titlebar.py +++ b/ranger/gui/widgets/titlebar.py @@ -33,6 +33,13 @@ class TitleBar(Widget): need_redraw = False tab_width = 0 + def __init__(self, *args, **keywords): + Widget.__init__(self, *args, **keywords) + self.fm.signal_bind('tab.change', self.request_redraw, weak=True) + + def request_redraw(self): + self.need_redraw = True + def draw(self): if self.need_redraw or \ self.env.cf != self.old_cf or\ diff --git a/ranger/help/movement.py b/ranger/help/movement.py index e9dd6fad..df5021f2 100644 --- a/ranger/help/movement.py +++ b/ranger/help/movement.py @@ -142,6 +142,7 @@ In Ranger, tabs are very simple though and only store the directory path. gt Go to the next tab. (also TAB) gT Go to the previous tab. (also Shift+TAB) + gn Create a new tab g Open a tab. N has to be a number from 0 to 9. If the tab doesn't exist yet, it will be created. gc, ^W Close the current tab. The last tab cannot be closed. -- cgit 1.4.1-2-gfad0 From 6c47470535209ac48900d6db6b17ff1e0cd9e6be Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 6 Apr 2010 03:29:57 +0200 Subject: corrected documentation --- doc/ranger.1 | 2 +- ranger/help/movement.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/ranger.1') diff --git a/doc/ranger.1 b/doc/ranger.1 index 2e03b729..9e1ab5a0 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -124,7 +124,7 @@ g\fIN\fR Open a tab. N has to be a number from 0 to 9. If the tab doesn't exist yet, it will be created. .TP -gn +gn, ^N Create a new tab. .TP gt, gT diff --git a/ranger/help/movement.py b/ranger/help/movement.py index df5021f2..4ea2b0c3 100644 --- a/ranger/help/movement.py +++ b/ranger/help/movement.py @@ -73,7 +73,7 @@ These keys work like in vim: ^R clear the cache and reload the view ^L redraw the window : open the console |3?| - b toggle options + z toggle options i inspect the content of the file E edit the file @@ -142,7 +142,7 @@ In Ranger, tabs are very simple though and only store the directory path. gt Go to the next tab. (also TAB) gT Go to the previous tab. (also Shift+TAB) - gn Create a new tab + gn, ^N Create a new tab g Open a tab. N has to be a number from 0 to 9. If the tab doesn't exist yet, it will be created. gc, ^W Close the current tab. The last tab cannot be closed. -- cgit 1.4.1-2-gfad0