diff options
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | doc/ranger.1 | 372 | ||||
-rw-r--r-- | doc/ranger.pod | 287 | ||||
-rw-r--r-- | doc/rifle.1 | 2 | ||||
-rw-r--r-- | ranger/config/commands.py | 2 | ||||
-rw-r--r-- | ranger/config/rc.conf | 358 | ||||
-rw-r--r-- | ranger/config/rifle.conf | 7 | ||||
-rw-r--r-- | ranger/core/fm.py | 2 | ||||
-rw-r--r-- | ranger/ext/keybinding_parser.py | 8 | ||||
-rwxr-xr-x | ranger/ext/rifle.py | 2 | ||||
-rw-r--r-- | ranger/gui/ui.py | 2 | ||||
-rw-r--r-- | ranger/gui/widgets/console.py | 2 |
12 files changed, 494 insertions, 562 deletions
diff --git a/README.md b/README.md index 63047253..979aa8f9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ranger v.1.6.1 ============== -ranger is a console file manager with VI key bindings. It provides a +ranger is a console file manager with Emacs key bindings. It provides a minimalistic and nice curses interface with a view on the directory hierarchy. It ships with "rifle", a file launcher that is good at automatically finding out which program to use for what file type. @@ -44,7 +44,7 @@ Features * Preview of the selected file/directory * Common file operations (create/chmod/copy/delete/...) * Renaming multiple files at once -* VIM-like console and hotkeys +* Emacs-like console and hotkeys * Automatically determine file types and run them with correct programs * Change the directory of your shell after exiting ranger * Tabs, Bookmarks, Mouse support @@ -89,10 +89,10 @@ use to uninstall ranger. Getting Started --------------- -After starting ranger, you can use the Arrow Keys (or hjkl) to navigate, Enter -to open a file or type Q to quit. The third column shows a preview of the -current file. The second is the main column and the first shows the parent -directory. +After starting ranger, you can use the Arrow Keys (or <C-n>, <C-p>, <C-b>, +<C-f>) to navigate, Enter to open a file or type <C-x><C-c> to quit. The third +column shows a preview of the current file. The second is the main column and +the first shows the parent directory. Ranger can automatically copy default configuration files to ~/.config/ranger if you run it with the switch --copy-config. (see ranger --help for a diff --git a/doc/ranger.1 b/doc/ranger.1 index 3ba4fe4e..7c01dc26 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -133,13 +133,13 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.6.1" "03/03/2015" "ranger manual" +.TH RANGER 1 "ranger-1.6.1" "03/31/2015" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" -ranger \- visual file manager +ranger \- Emacs\-like file browser .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBranger\fR [\fB\-\-version\fR] [\fB\-\-help\fR] [\fB\-\-debug\fR] [\fB\-\-clean\fR] @@ -150,13 +150,12 @@ ranger \- visual file manager [\fB\-\-profile\fR] [\fB\-\-cmd\fR=\fIcommand\fR] [\fIpath\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" -ranger is a console file manager with \s-1VI\s0 key bindings. +ranger is a console file manager with Emacs key bindings. .SH "RESOURCES" .IX Header "RESOURCES" \&\fIThis manual\fR contains instructions on how to use and configure ranger. .PP -\&\fIInside ranger\fR, you can press \fI1?\fR for a list of key bindings, \fI2?\fR for -commands and \fI3?\fR for settings. +\&\fIInside ranger\fR, you can press \fI<C\-h>\fR for help. .PP The \fI\s-1README\s0\fR contains install instructions. .PP @@ -285,11 +284,11 @@ To enable this feature, set the option \f(CW\*(C`preview_images_method\*(C'\fR t .SS "\s-1SELECTION\s0" .IX Subsection "SELECTION" The \fIselection\fR is defined as \*(L"All marked files \s-1IF THERE ARE ANY,\s0 otherwise -the current file.\*(R" Be aware of this when using the :delete command, which -deletes all files in the selection. +the current file.\*(R" Be aware of this when using the \f(CW\*(C`<M\-x>delete\*(C'\fR +command, which deletes all files in the selection. .PP -You can mark files by pressing <Space>, v, etc. A yellow \fBMrk\fR symbol at the -bottom right indicates that there are marked files in this directory. +You can mark files by pressing <Space>, <C\-Space>, etc. A yellow \fBMrk\fR symbol +at the bottom right indicates that there are marked files in this directory. .SS "\s-1MACROS\s0" .IX Subsection "MACROS" Macros can be used in commands to abbreviate things. @@ -323,14 +322,16 @@ which accepts any key, then the macro \f(CW%any\fR (or \f(CW%any0\fR, \f(CW%any1 used in the command to get the key that was pressed. .SS "\s-1BOOKMARKS\s0" .IX Subsection "BOOKMARKS" -Type \fBm<key>\fR to bookmark the current directory. You can re-enter this -directory by typing \fB`<key>\fR. <key> can be any letter or digit. Unlike vim, -both lowercase and uppercase bookmarks are persistent. +Type \fB<C\-x>rm<key>\fR to bookmark the current directory. You can +re-enter this directory by typing \fB<C\-x>rb<key>\fR. <key> can be any +letter or digit. Unlike vim, both lowercase and uppercase bookmarks are +persistent. .PP -Each time you jump to a bookmark, the special bookmark at key ` will be set -to the last directory. So typing \*(L"``\*(R" gets you back to where you were before. +Each time you jump to a bookmark, the special bookmark at key ` will be set to +the last directory. So typing \fB<C\-x>rb`\fR gets you back to where you +were before. .PP -Bookmarks are selectable when tabbing in the :cd command. +Bookmarks are selectable when tabbing in the \f(CW\*(C`<M\-x>cd\*(C'\fR command. .PP Note: The bookmarks ' (Apostrophe) and ` (Backtick) are the same. .SS "\s-1RIFLE\s0" @@ -343,16 +344,18 @@ programs so it can be used effectively out of the box on a variety of systems. It's configured in \fIrifle.conf\fR through a list of conditions and commands. For each line the conditions are checked and if they are met, the respective command is taken into consideration. By default, simply the first matching -rule is used. In ranger, you can list and choose rules by typing \*(L"r\*(R" or simply -by typing \*(L"<rulenumber><enter>\*(R". If you use rifle standalone, you can list all -rules with the \*(L"\-l\*(R" option and pick a rule with \*(L"\-p <number>\*(R". +rule is used. In ranger, you can list and choose rules by typing +\&\fB<M\-f>\fR or simply by typing \*(L"<rulenumber><enter>\*(R". If you use rifle +standalone, you can list all rules with the \*(L"\-l\*(R" option and pick a rule with +\&\*(L"\-p <number>\*(R". .PP The rules, along with further documentation, are contained in \&\fIranger/config/rifle.conf\fR. .SS "\s-1FLAGS\s0" .IX Subsection "FLAGS" Flags give you a way to modify the behavior of the spawned process. They are -used in the commands \f(CW\*(C`:open_with\*(C'\fR (key \*(L"r\*(R") and \f(CW\*(C`:shell\*(C'\fR (key \*(L"!\*(R"). +used in the commands \f(CW\*(C`<M\-x>open_with\*(C'\fR (key \fB<M\-f>\fR) and +\&\f(CW\*(C`<M\-x>shell\*(C'\fR (key \fB<M\-!>\fR). .PP .Vb 4 \& f Fork the process. (Run in background) @@ -362,7 +365,7 @@ used in the commands \f(CW\*(C`:open_with\*(C'\fR (key \*(L"r\*(R") and \f(CW\*( .Ve .PP There are some additional flags that can currently be used only in the \f(CW\*(C`shell\*(C'\fR -command: (for example \f(CW\*(C`:shell \-w df\*(C'\fR) +command: (for example \f(CW\*(C`<M\-x> shell \-w df\*(C'\fR) .PP .Vb 3 \& p Redirect output to the pager @@ -378,9 +381,9 @@ The terminal program name for the \*(L"t\*(R" flag is taken from the environment variable \f(CW$TERMCMD\fR. If it doesn't exist, it tries to extract it from \f(CW$TERM\fR and uses \*(L"xterm\*(R" as a fallback if that fails. .PP -Examples: \f(CW\*(C`:open_with c\*(C'\fR will open the file that you currently point at, even -if you have selected other files. \f(CW\*(C`:shell \-w df\*(C'\fR will run \*(L"df\*(R" and wait for -you to press Enter before switching back to ranger. +Examples: \f(CW\*(C`<M\-x>open_with c\*(C'\fR will open the file that you currently +point at, even if you have selected other files. \f(CW\*(C`<M\-x>shell \-w df\*(C'\fR +will run \*(L"df\*(R" and wait for you to press Enter before switching back to ranger. .SS "\s-1PLUGINS\s0" .IX Subsection "PLUGINS" ranger's plugin system consists of python files which are located in @@ -414,157 +417,148 @@ Key bindings are defined in the file \fIranger/config/rc.conf\fR. Check this file for a list of all key bindings. You can copy it to your local configuration directory with the \-\-copy\-config=rc option. .PP -Many key bindings take an additional numeric argument. Type \fI5j\fR to move -down 5 lines, \fI2l\fR to open a file in mode 2, \fI10<Space>\fR to mark 10 files. -.PP This list contains the most useful bindings: .SS "\s-1MAIN BINDINGS\s0" .IX Subsection "MAIN BINDINGS" -.IP "h, j, k, l" 14 -.IX Item "h, j, k, l" -Move left, down, up or right -.IP "^D or J, ^U or K" 14 -.IX Item "^D or J, ^U or K" -Move a half page down, up -.IP "H, L" 14 -.IX Item "H, L" -Move back and forward in the history -.IP "gg" 14 -.IX Item "gg" +.IP "^G" 14 +.IX Item "^G" +The universal \*(L"abort\*(R" key. Stops copying processes, clears selection and gets +you out of the console. +.IP "^P, ^N" 14 +.IX Item "^P, ^N" +Move to the previous and next items +.IP "^B, ^F" 14 +.IX Item "^B, ^F" +Move back and forward +.IP "^V, Alt+v" 14 +.IX Item "^V, Alt+v" +Move a page up and down +.IP "^U^Space" 14 +.IX Item "^U^Space" +Move back in the history +.IP "Alt+<" 14 +.IX Item "Alt+<" Move to the top -.IP "G" 14 -.IX Item "G" +.IP "Alt+>" 14 +.IX Item "Alt+>" Move to the bottom -.IP "[, ]" 14 +.IP "Alt+{, Alt+}" 14 +.IX Item "Alt+{, Alt+}" Move up and down in the parent directory. -.IP "^R" 14 -.IX Item "^R" +.IP "^X^R" 14 +.IX Item "^X^R" Reload everything .IP "^L" 14 .IX Item "^L" Redraw the screen -.IP "i" 14 -.IX Item "i" +.IP "^Xi" 14 +.IX Item "^Xi" Inspect the current file in a bigger window. -.IP "E" 14 -.IX Item "E" -Edit the current file in \f(CW$EDITOR\fR (\*(L"nano\*(R" by default) -.IP "S" 14 -.IX Item "S" -Open a shell in the current directory -.IP "?" 14 +.IP "^X^F" 14 +.IX Item "^X^F" +Edit the current file in \f(CW$EDITOR\fR (\*(L"emacs\*(R" by default) +.IP "^Hm" 14 +.IX Item "^Hm" Opens this man page -.IP "W" 14 -.IX Item "W" +.IP "^XW" 14 +.IX Item "^XW" Opens the log window where you can review messages that pop up at the bottom. -.IP "w" 14 -.IX Item "w" +.IP "^Ww" 14 +.IX Item "^Ww" Opens the task window where you can view and modify background processes that -currently run in ranger. In there, you can type \*(L"dd\*(R" to abort a process and -\&\*(L"J\*(R" or \*(L"K\*(R" to change the priority of a process. Only one process is run at a -time. -.IP "^C" 14 -.IX Item "^C" +currently run in ranger. In there, you can type ^D to abort a process and +Alt+p or Alt+n to change the priority of a process. Only one process is run at +a time. +.IP "^G" 14 +.IX Item "^G" Stop the currently running background process that ranger has started, like copying files, loading directories or file previews. -.IP "<octal>=, +<who><what>, \-<who><what>" 14 -.IX Item "<octal>=, +<who><what>, -<who><what>" -Change the permissions of the selection. For example, \f(CW\*(C`777=\*(C'\fR is equivalent to -\&\f(CW\*(C`chmod 777 %s\*(C'\fR, \f(CW\*(C`+ar\*(C'\fR does \f(CW\*(C`chmod a+r %s\*(C'\fR, \f(CW\*(C`\-ow\*(C'\fR does \f(CW\*(C`chmod o\-w %s\*(C'\fR etc. -.IP "yy" 14 -.IX Item "yy" +.IP "<C\-x>+<who><what>, <C\-x>\-<who><what>" 14 +.IX Item "<C-x>+<who><what>, <C-x>-<who><what>" +Change the permissions of the selection. For example, \f(CW\*(C`<C\-x>+ar\*(C'\fR does +\&\f(CW\*(C`chmod a+r %s\*(C'\fR, \f(CW\*(C`<C\-x>\-ow\*(C'\fR does \f(CW\*(C`chmod o\-w %s\*(C'\fR etc. +.IP "Alt+w" 14 +.IX Item "Alt+w" Copy (yank) the selection, like pressing Ctrl+C in modern \s-1GUI\s0 programs. -.IP "dd" 14 -.IX Item "dd" +.IP "^W" 14 +.IX Item "^W" Cut the selection, like pressing Ctrl+X in modern \s-1GUI\s0 programs. -.IP "pp" 14 -.IX Item "pp" +.IP "^Yy" 14 +.IX Item "^Yy" Paste the files which were previously copied or cut, like pressing Ctrl+V in modern \s-1GUI\s0 programs. -.IP "po" 14 -.IX Item "po" +.IP "^Yo" 14 +.IX Item "^Yo" Paste the copied/cut files, overwriting existing files. -.IP "pl, pL" 14 -.IX Item "pl, pL" +.IP "^Yl, ^YL" 14 +.IX Item "^Yl, ^YL" Create symlinks (absolute or relative) to the copied files -.IP "phl" 14 -.IX Item "phl" +.IP "^Yhl" 14 +.IX Item "^Yhl" Create hardlinks to the copied files -.IP "pht" 14 -.IX Item "pht" +.IP "^Yht" 14 +.IX Item "^Yht" Duplicate the subdirectory tree of the copied directory, then create hardlinks for each contained file into the new directory tree. -.IP "m\fIX\fR" 14 -.IX Item "mX" +.IP "^Xrm\fIX\fR" 14 +.IX Item "^XrmX" Create a bookmark with the name \fIX\fR -.IP "`\fIX\fR" 14 -.IX Item "`X" +.IP "^Xrb\fIX\fR" 14 +.IX Item "^XrbX" Move to the bookmark with the name \fIX\fR -.IP "n" 14 -.IX Item "n" -Find the next file. By default, this gets you to the newest file in the -directory, but if you search something using the keys /, cm, ct, ..., it will -get you to the next found entry. -.IP "N" 14 -.IX Item "N" +.IP "^S" 14 +.IX Item "^S" +Find the next file. (Currently broken) +.IP "^R" 14 +.IX Item "^R" Find the previous file. -.IP "o\fIX\fR" 14 -.IX Item "oX" +.IP "^Xo\fIX\fR" 14 +.IX Item "^XoX" Change the sort method (like in mutt) .IP "z\fIX\fR" 14 .IX Item "zX" Change settings. See the settings section for a list of settings and their hotkey. -.IP "u\fI?\fR" 14 -.IX Item "u?" -Universal undo-key. Depending on the key that you press after \*(L"u\*(R", it either -restores closed tabs (uq), removes tags (ut), clears the copy/cut buffer (ud), -starts the reversed visual mode (uV) or clears the selection (uv). -.IP "f" 14 -.IX Item "f" -Quickly navigate by entering a part of the filename. +.IP "^_" 14 +.IX Item "^_" +Universal undo-key. Depending on the key that you press afterwards, it either +restores closed tabs (^_k), removes tags (^_t) or clears the copy/cut buffer +(^_w). .IP "Space" 14 .IX Item "Space" Mark a file. -.IP "v" 14 -.IX Item "v" -Toggle the mark-status of all files -.IP "V" 14 -.IX Item "V" +.IP "^Space" 14 +.IX Item "^Space" Starts the visual mode, which selects all files between the starting point and the cursor until you press \s-1ESC. \s0 To unselect files in the same way, use \*(L"uV\*(R". -.IP "/" 14 +.IP "^Xs" 14 +.IX Item "^Xs" Search for files in the current directory. -.IP ":" 14 +.IP "Alt+x" 14 +.IX Item "Alt+x" Open the console. -.IP "!" 14 +.IP "Alt+!" 14 +.IX Item "Alt+!" Open the console with the content \*(L"shell \*(R" so you can quickly run commands -.IP "@" 14 -Open the console with the content \*(L"shell \f(CW%s\fR\*(R", placing the cursor before the -\&\*(L" \f(CW%s\fR\*(R" so you can quickly run commands with the current selection as the -argument. -.IP "r" 14 -.IX Item "r" +.IP "Alt+f" 14 +.IX Item "Alt+f" Open the console with the content \*(L"open with \*(R" so you can decide which program to use to open the current file selection. -.IP "cd" 14 -.IX Item "cd" -Open the console with the content \*(L"cd \*(R" .IP "Alt\-\fIN\fR" 14 .IX Item "Alt-N" Open a tab. N has to be a number from 0 to 9. If the tab doesn't exist yet, it will be created. -.IP "gn, ^N" 14 -.IX Item "gn, ^N" +.IP "^Xf" 14 +.IX Item "^Xf" Create a new tab. -.IP "gt, gT" 14 -.IX Item "gt, gT" -Go to the next or previous tab. You can also use \s-1TAB\s0 and \s-1SHIFT+TAB\s0 instead. -.IP "gc, ^W" 14 -.IX Item "gc, ^W" +.IP "^Xb" 14 +.IX Item "^Xb" +Go to the next tab. +.IP "^Xk" 14 +.IX Item "^Xk" Close the current tab. The last tab cannot be closed this way. -.IP "M" 14 -.IX Item "M" +.IP "^Xm" 14 +.IX Item "^Xm" A key chain that allows you to quickly change the line mode of all the files of the current directory. For a more permanent solution, use the command \&\*(L"default_linemode\*(R" in your rc.conf. @@ -605,7 +599,7 @@ value are in [brackets]. The hotkey to toggle the setting is in <brokets>, if a hotkey exists. .PP Settings can be changed in the file \fI~/.config/ranger/rc.conf\fR or on the -fly with the command \fB:set option value\fR. Examples: +fly with the command \fB<M\-x>set option value\fR. Examples: .PP .Vb 2 \& set column_ratios 1,2,3 @@ -624,7 +618,7 @@ The different types of settings and an example for each type: \& none | none .Ve .PP -You can view a list of all settings and their current values by pressing \*(L"3?\*(R" +You can view a list of all settings and their current values by pressing \*(L"^Hs\*(R" in ranger. .IP "automatically_count_files [bool]" 4 .IX Item "automatically_count_files [bool]" @@ -634,21 +628,22 @@ off will still allow you to see the number of files after entering the directory. .IP "autosave_bookmarks [bool]" 4 .IX Item "autosave_bookmarks [bool]" -Save bookmarks (used with mX and `X) instantly? This helps to synchronize -bookmarks between multiple ranger instances but leads to *slight* performance -loss. When false, bookmarks are saved when ranger is exited. +Save bookmarks (used with \fB<C\-x>rm\fR and \fB<C\-x>rb\fR) instantly? +This helps to synchronize bookmarks between multiple ranger instances but leads +to *slight* performance loss. When false, bookmarks are saved when ranger is +exited. .IP "autoupdate_cumulative_size [bool]" 4 .IX Item "autoupdate_cumulative_size [bool]" You can display the \*(L"real\*(R" cumulative size of directories by using the command -:get_cumulative_size or typing \*(L"dc\*(R". The size is expensive to calculate and +<M\-x>get_cumulative_size or typing \*(L"<C\-x>dc\*(R". The size is expensive to calculate and will not be updated automatically. You can choose to update it automatically though by turning on this option. .IP "cd_bookmarks [bool]" 4 .IX Item "cd_bookmarks [bool]" Specify whether bookmarks should be included in the tab completion of the \*(L"cd\*(R" command. -.IP "collapse_preview [bool] <zc>" 4 -.IX Item "collapse_preview [bool] <zc>" +.IP "collapse_preview [bool] <^Xzc>" 4 +.IX Item "collapse_preview [bool] <^Xzc>" When no preview is visible, should the last column be squeezed to make use of the whitespace? .IP "colorscheme [string]" 4 @@ -685,8 +680,8 @@ Draw borders around columns? .IX Item "draw_progress_bar_in_statusbar [bool]" Draw a progress bar in the status bar which displays the average state of all currently running tasks which support progress bars? -.IP "flushinput [bool] <zi>" 4 -.IX Item "flushinput [bool] <zi>" +.IP "flushinput [bool] <^Xzi>" 4 +.IX Item "flushinput [bool] <^Xzi>" Flush the input after each key hit? One advantage is that when scrolling down with \*(L"j\*(R", ranger stops scrolling instantly when you release the key. One disadvantage is that when you type commands blindly, some keys might get lost. @@ -715,19 +710,19 @@ How many directory changes should be kept in history? When the metadata manager module looks for metadata, should it only look for a \&\*(L".metadata.json\*(R" file in the current directory, or do a deep search and check all directories above the current one as well? -.IP "mouse_enabled [bool] <zm>" 4 -.IX Item "mouse_enabled [bool] <zm>" +.IP "mouse_enabled [bool] <^Xzm>" 4 +.IX Item "mouse_enabled [bool] <^Xzm>" Enable mouse input? .IP "padding_right [bool]" 4 .IX Item "padding_right [bool]" When collapse_preview is on and there is no preview, should there remain a little padding on the right? This allows you to click into that space to run the file. -.IP "preview_directories [bool] <zP>" 4 -.IX Item "preview_directories [bool] <zP>" +.IP "preview_directories [bool] <^XzP>" 4 +.IX Item "preview_directories [bool] <^XzP>" Preview directories in the preview column? -.IP "preview_files [bool] <zp>" 4 -.IX Item "preview_files [bool] <zp>" +.IP "preview_files [bool] <^Xzp>" 4 +.IX Item "preview_files [bool] <^Xzp>" Preview files in the preview column? .IP "preview_images [bool]" 4 .IX Item "preview_images [bool]" @@ -758,25 +753,25 @@ Always show the terminal cursor? .IP "show_hidden_bookmarks [bool]" 4 .IX Item "show_hidden_bookmarks [bool]" Show dotfiles in the bookmark preview window? (Type ') -.IP "show_hidden [bool] <zh>, <^H>" 4 -.IX Item "show_hidden [bool] <zh>, <^H>" +.IP "show_hidden [bool] <^Xzh>" 4 +.IX Item "show_hidden [bool] <^Xzh>" Show hidden files? -.IP "sort_case_insensitive [bool] <zc>" 4 -.IX Item "sort_case_insensitive [bool] <zc>" +.IP "sort_case_insensitive [bool] <^Xzc>" 4 +.IX Item "sort_case_insensitive [bool] <^Xzc>" Sort case-insensitively? If true, \*(L"a\*(R" will be listed before \*(L"B\*(R" even though its \s-1ASCII\s0 value is higher. -.IP "sort_directories_first [bool] <zd>" 4 -.IX Item "sort_directories_first [bool] <zd>" +.IP "sort_directories_first [bool] <^Xzd>" 4 +.IX Item "sort_directories_first [bool] <^Xzd>" Sort directories first? -.IP "sort_reverse [bool] <or>" 4 -.IX Item "sort_reverse [bool] <or>" +.IP "sort_reverse [bool] <^Xor>" 4 +.IX Item "sort_reverse [bool] <^Xor>" Reverse the order of files? .IP "sort_unicode [bool]" 4 .IX Item "sort_unicode [bool]" When sorting according to some string, should the unicode characters be compared, instead of looking at the raw character values to save time? -.IP "sort [string] <oa>, <ob>, <oc>, <oe>, <om>, <on>, <ot>, <os>, <oz>" 4 -.IX Item "sort [string] <oa>, <ob>, <oc>, <oe>, <om>, <on>, <ot>, <os>, <oz>" +.IP "sort [string] <^Xoa>, <^Xob>, <^Xoc>, <^Xoe>, <^Xom>, <^Xon>, <^Xot>, <^Xos>, <^Xoz>" 4 +.IX Item "sort [string] <^Xoa>, <^Xob>, <^Xoc>, <^Xoe>, <^Xom>, <^Xon>, <^Xot>, <^Xos>, <^Xoz>" Which sorting mechanism should be used? Choose one of \fBatime\fR, \fBbasename\fR, \&\fBctime\fR, \fBextension\fR, \fBmtime\fR, \fBnatural\fR, \fBtype\fR, \fBsize\fR, \fBrandom\fR .Sp @@ -797,8 +792,8 @@ Set a window title? .IP "update_tmux_title [bool]" 4 .IX Item "update_tmux_title [bool]" Set the title to \*(L"ranger\*(R" in the tmux program? -.IP "use_preview_script [bool] <zv>" 4 -.IX Item "use_preview_script [bool] <zv>" +.IP "use_preview_script [bool] <^Xzv>" 4 +.IX Item "use_preview_script [bool] <^Xzv>" Use the preview script defined in the setting \fIpreview_script\fR? .IP "vcs_aware [bool]" 4 .IX Item "vcs_aware [bool]" @@ -818,10 +813,11 @@ Enable this if key combinations with the Alt Key don't work for you. (Especially on xterm) .SH "COMMANDS" .IX Header "COMMANDS" -You can enter the commands in the console which is opened by pressing \*(L":\*(R". +You can enter the commands in the console which is opened by pressing \fBAlt+x\fR. .PP -You can always get a list of the currently existing commands by typing \*(L"2?\*(R" in -ranger. For your convenience, this is a list of the \*(L"public\*(R" commands including their parameters, excluding descriptions: +You can always get a list of the currently existing commands by typing \*(L"^Hc\*(R" in +ranger. For your convenience, this is a list of the \*(L"public\*(R" commands +including their parameters, excluding descriptions: .PP .Vb 10 \& alias [newcommand] [oldcommand] @@ -897,7 +893,7 @@ This shell script is opened in an editor for you to review. After you close it, it will be executed. .IP "cd [\fIdirectory\fR]" 2 .IX Item "cd [directory]" -The cd command changes the directory. The command \f(CW\*(C`:cd \-\*(C'\fR is equivalent to +The cd command changes the directory. The command \f(CW\*(C`<M\-x>cd \-\*(C'\fR is equivalent to typing ``. .IP "chain \fIcommand1\fR[; \fIcommand2\fR[; \fIcommand3\fR...]]" 2 .IX Item "chain command1[; command2[; command3...]]" @@ -911,10 +907,6 @@ the user, the group and others. A 1 permits execution, a 2 permits writing, a 4 permits reading. Add those numbers to combine them. So a 7 permits everything. .Sp -Key bindings in the form of [\-+]<who><what> and <octal>= also exist. For -example, \fB+ar\fR allows reading for everyone, \-ow forbids others to write and -777= allows everything. -.Sp See also: man 1 chmod .IP "cmap \fIkey\fR \fIcommand\fR" 2 .IX Item "cmap key command" @@ -950,13 +942,13 @@ Sets the default linemode. See \fIlinemode\fR command. Examples: .Sp Set the global default linemode to \*(L"permissions\*(R": - :default_linemode permissions + <M\-x> default_linemode permissions .Sp Set the default linemode to \*(L"permissions\*(R" for all files tagged with \*(L"p\*(R" or \*(L"P\*(R": - :default_linemode tag=pP permissions + <M\-x> default_linemode tag=pP permissions .Sp Set the default linemode for all files in ~/books/ to \*(L"metatitle\*(R": - :default_linemode path=/home/.*?/books/.* metatitle + <M\-x> default_linemode path=/home/.*?/books/.* metatitle .IP "delete" 2 .IX Item "delete" Destroy all files in the selection with a roundhouse kick. ranger will ask for @@ -972,9 +964,9 @@ text, use the function `p'. The result is displayed on the screen unless you use the \*(L"\-q\*(R" option. .Sp Examples: - :eval fm - :eval len(fm.tabs) - :eval p(\*(L"Hello World!\*(R") + <M\-x> eval fm + <M\-x> eval len(fm.tabs) + <M\-x> eval p(\*(L"Hello World!\*(R") .IP "filter [\fIstring\fR]" 2 .IX Item "filter [string]" Displays only the files which contain the \fIstring\fR in their basename. Running @@ -1011,8 +1003,11 @@ Sets the linemode of all files in the current directory. The linemode may be: \& "permissions": display each line as "<permissions> <owner> <group> <basename>" \& "metatitle": display metadata from .metadata.json files if \& available, fall back to the "filename" linemode if no -\& metadata was found. See :meta command. +\& metadata was found. See <M\-x>meta command. .Ve +.Sp +The custom linemodes may be added by subclassing the \fILinemodeBase\fR class. +See the \fIranger.core.linemode\fR module for some examples. .IP "load_copy_buffer" 2 .IX Item "load_copy_buffer" Load the copy buffer from \fI~/.config/ranger/copy_buffer\fR. This can be used to @@ -1041,8 +1036,8 @@ the tag argument, all tagged files are marked. Set the metadata of the currently highlighted file. Example: .Sp .Vb 2 -\& :meta title The Hitchhiker\*(Aqs Guide to the Galaxy -\& :meta year 1979 +\& <M\-x> meta title The Hitchhiker\*(Aqs Guide to the Galaxy +\& <M\-x> meta year 1979 .Ve .Sp This metadata can be displayed by, for example, using the \*(L"metatitle\*(R" line mode @@ -1083,8 +1078,8 @@ Change the link destination of the current symlink file to <newpath>. First <tab> will load the original link. .IP "rename_append" 2 .IX Item "rename_append" -Opens the console with \*(L":rename <current file>\*(R" with the cursor automatically -placed before the file extension +Opens the console with \*(L"<M\-x> rename <current file>\*(R" with the cursor +automatically placed before the file extension .IP "rename \fInewname\fR" 2 .IX Item "rename newname" Rename the current file. If a file with that name already exists, the renaming @@ -1115,8 +1110,8 @@ influence its behaviour: \& \-v = inverts the match .Ve .Sp -Multiple flags can be combined. For example, \*(L":scout \-gpt\*(R" would create -a :filter\-like command using globbing. +Multiple flags can be combined. For example, \*(L"<M\-x>scout \-gpt\*(R" would create a +<M\-x>filter\-like command using globbing. .IP "search \fIpattern\fR" 2 .IX Item "search pattern" Search files in the current directory that match the given (case insensitive) @@ -1216,7 +1211,7 @@ and settings are defined here. .IP "commands.py" 10 .IX Item "commands.py" A python module that defines commands which can be used in ranger's console by -typing \*(L":\*(R" or in the rc.conf file. +typing \*(L"<M\-x>\*(R" or in the rc.conf file. .IP "commands_full.py" 10 .IX Item "commands_full.py" This file is copied by \-\-copy\-config=commands_full and serves as a reference @@ -1242,14 +1237,16 @@ Plugins can be placed here. .IX Item "bookmarks" This file contains a list of bookmarks. The syntax is /^(.):(.*)$/. The first character is the bookmark key and the rest after the colon is the path to the -file. In ranger, bookmarks can be set by typing m<key>, accessed by typing -\&'<key> and deleted by typing um<key>. +file. In ranger, bookmarks can be set by typing +\&\fB<C\-x>rm<key>\fR, accessed by typing +\&\fB<C\-x>rb<key>\fR and deleted by typing +\&\fB<C\-x>ru<key>\fR. .IP "copy_buffer" 10 .IX Item "copy_buffer" -When running the command :save_copy_buffer, the paths of all currently copied -files are saved in this file. You can later run :load_copy_buffer to copy the -same files again, pass them to another ranger instance or process them in a -script. +When running the command <M\-x>save_copy_buffer, the paths of all currently +copied files are saved in this file. You can later run <M\-x>load_copy_buffer +to copy the same files again, pass them to another ranger instance or process +them in a script. .IP "history" 10 .IX Item "history" Contains a list of commands that have been previously typed in. @@ -1257,8 +1254,8 @@ Contains a list of commands that have been previously typed in. .IX Item "tagged" Contains a list of tagged files. The syntax is /^(.:)?(.*)$/ where the first letter is the optional name of the tag and the rest after the optional colon is -the path to the file. In ranger, tags can be set by pressing t and removed -with T. To assign a named tag, type "<tagname>. +the path to the file. In ranger, tags can be set by pressing +\&\fB<C\-x>t<tagname>\fR and removed with \fB<C\-_>t\fR. .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" These environment variables have an effect on ranger: @@ -1274,15 +1271,12 @@ This can save time if you copied the whole rc.conf to ~/.config/ranger/ and don't need the default one at all. .IP "\s-1EDITOR\s0" 8 .IX Item "EDITOR" -Defines the editor to be used for the \*(L"E\*(R" key. Defaults to \*(L"nano\*(R". -.IP "\s-1SHELL\s0" 8 -.IX Item "SHELL" -Defines the shell that ranger is going to use with the :shell command and -the \*(L"S\*(R" key. Defaults to \*(L"/bin/sh\*(R". +Defines the editor to be used for the \fB<C\-x><C\-f>\fR key. +Defaults to \*(L"emacs\*(R". .IP "\s-1TERMCMD\s0" 8 .IX Item "TERMCMD" Defines the terminal emulator command that ranger is going to use with the -:terminal command and the \*(L"t\*(R" run flag. Defaults to \*(L"xterm\*(R". +<M\-x>terminal command and the \*(L"t\*(R" run flag. Defaults to \*(L"xterm\*(R". .IP "\s-1XDG_CONFIG_HOME\s0" 8 .IX Item "XDG_CONFIG_HOME" Specifies the directory for configuration files. Defaults to \fI\f(CI$HOME\fI/.config\fR. diff --git a/doc/ranger.pod b/doc/ranger.pod index 336a886c..5ebdbc98 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -1,6 +1,6 @@ =head1 NAME -ranger - visual file manager +ranger - Emacs-like file browser @@ -19,7 +19,7 @@ B<ranger> [B<--version>] [B<--help>] [B<--debug>] [B<--clean>] =head1 DESCRIPTION -ranger is a console file manager with VI key bindings. +ranger is a console file manager with Emacs key bindings. @@ -28,8 +28,7 @@ ranger is a console file manager with VI key bindings. I<This manual> contains instructions on how to use and configure ranger. -I<Inside ranger>, you can press I<1?> for a list of key bindings, I<2?> for -commands and I<3?> for settings. +I<Inside ranger>, you can press I<E<lt>C-hE<gt>> for help. The F<README> contains install instructions. @@ -184,11 +183,11 @@ To enable this feature, set the option C<preview_images_method> to iterm2. =head2 SELECTION The I<selection> is defined as "All marked files IF THERE ARE ANY, otherwise -the current file." Be aware of this when using the :delete command, which -deletes all files in the selection. +the current file." Be aware of this when using the C<E<lt>M-xE<gt>delete> +command, which deletes all files in the selection. -You can mark files by pressing <Space>, v, etc. A yellow B<Mrk> symbol at the -bottom right indicates that there are marked files in this directory. +You can mark files by pressing <Space>, <C-Space>, etc. A yellow B<Mrk> symbol +at the bottom right indicates that there are marked files in this directory. =head2 MACROS @@ -220,14 +219,16 @@ used in the command to get the key that was pressed. =head2 BOOKMARKS -Type B<m<keyE<gt>> to bookmark the current directory. You can re-enter this -directory by typing B<`<keyE<gt>>. <key> can be any letter or digit. Unlike vim, -both lowercase and uppercase bookmarks are persistent. +Type B<E<lt>C-xE<gt>rm<keyE<gt>> to bookmark the current directory. You can +re-enter this directory by typing B<E<lt>C-xE<gt>rb<keyE<gt>>. <key> can be any +letter or digit. Unlike vim, both lowercase and uppercase bookmarks are +persistent. -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. +Each time you jump to a bookmark, the special bookmark at key ` will be set to +the last directory. So typing B<E<lt>C-xE<gt>rb`> gets you back to where you +were before. -Bookmarks are selectable when tabbing in the :cd command. +Bookmarks are selectable when tabbing in the C<E<lt>M-xE<gt>cd> command. Note: The bookmarks ' (Apostrophe) and ` (Backtick) are the same. @@ -241,9 +242,10 @@ programs so it can be used effectively out of the box on a variety of systems. It's configured in F<rifle.conf> through a list of conditions and commands. For each line the conditions are checked and if they are met, the respective command is taken into consideration. By default, simply the first matching -rule is used. In ranger, you can list and choose rules by typing "r" or simply -by typing "<rulenumber><enter>". If you use rifle standalone, you can list all -rules with the "-l" option and pick a rule with "-p <number>". +rule is used. In ranger, you can list and choose rules by typing +B<E<lt>M-fE<gt>> or simply by typing "<rulenumber><enter>". If you use rifle +standalone, you can list all rules with the "-l" option and pick a rule with +"-p <number>". The rules, along with further documentation, are contained in F<ranger/config/rifle.conf>. @@ -251,7 +253,8 @@ F<ranger/config/rifle.conf>. =head2 FLAGS Flags give you a way to modify the behavior of the spawned process. They are -used in the commands C<:open_with> (key "r") and C<:shell> (key "!"). +used in the commands C<E<lt>M-xE<gt>open_with> (key B<E<lt>M-fE<gt>>) and +C<E<lt>M-xE<gt>shell> (key B<E<lt>M-!E<gt>>). f Fork the process. (Run in background) c Run the current file only, instead of the selection @@ -259,7 +262,7 @@ used in the commands C<:open_with> (key "r") and C<:shell> (key "!"). t Run application in a new terminal window There are some additional flags that can currently be used only in the C<shell> -command: (for example C<:shell -w df>) +command: (for example C<E<lt>M-xE<gt> shell -w df>) p Redirect output to the pager s Silent mode. Output will be discarded. @@ -273,9 +276,9 @@ The terminal program name for the "t" flag is taken from the environment variable $TERMCMD. If it doesn't exist, it tries to extract it from $TERM and uses "xterm" as a fallback if that fails. -Examples: C<:open_with c> will open the file that you currently point at, even -if you have selected other files. C<:shell -w df> will run "df" and wait for -you to press Enter before switching back to ranger. +Examples: C<E<lt>M-xE<gt>open_with c> will open the file that you currently +point at, even if you have selected other files. C<E<lt>M-xE<gt>shell -w df> +will run "df" and wait for you to press Enter before switching back to ranger. =head2 PLUGINS @@ -310,40 +313,46 @@ Key bindings are defined in the file F<ranger/config/rc.conf>. Check this file for a list of all key bindings. You can copy it to your local configuration directory with the --copy-config=rc option. -Many key bindings take an additional numeric argument. Type I<5j> to move -down 5 lines, I<2l> to open a file in mode 2, I<10<SpaceE<gt>> to mark 10 files. - This list contains the most useful bindings: =head2 MAIN BINDINGS =over 14 -=item h, j, k, l +=item ^G + +The universal "abort" key. Stops copying processes, clears selection and gets +you out of the console. + +=item ^P, ^N + +Move to the previous and next items -Move left, down, up or right +=item ^B, ^F -=item ^D or J, ^U or K +Move back and forward -Move a half page down, up +=item ^V, Alt+v -=item H, L +Move a page up and down -Move back and forward in the history +=item ^U^Space -=item gg +Move back in the history + +=item Alt+< Move to the top -=item G +=item Alt+> Move to the bottom -=item [, ] +=item Alt+{, Alt+} Move up and down in the parent directory. -=item ^R +=item ^X^R Reload everything @@ -351,92 +360,86 @@ Reload everything Redraw the screen -=item i +=item ^Xi Inspect the current file in a bigger window. -=item E - -Edit the current file in $EDITOR ("nano" by default) +=item ^X^F -=item S +Edit the current file in $EDITOR ("emacs" by default) -Open a shell in the current directory - -=item ? +=item ^Hm Opens this man page -=item W +=item ^XW Opens the log window where you can review messages that pop up at the bottom. -=item w +=item ^Ww Opens the task window where you can view and modify background processes that -currently run in ranger. In there, you can type "dd" to abort a process and -"J" or "K" to change the priority of a process. Only one process is run at a -time. +currently run in ranger. In there, you can type ^D to abort a process and +Alt+p or Alt+n to change the priority of a process. Only one process is run at +a time. -=item ^C +=item ^G Stop the currently running background process that ranger has started, like copying files, loading directories or file previews. -=item <octal>=, +<who><what>, -<who><what> +=item E<lt>C-xE<gt>+<who><what>, E<lt>C-xE<gt>-<who><what> -Change the permissions of the selection. For example, C<777=> is equivalent to -C<chmod 777 %s>, C<+ar> does C<chmod a+r %s>, C<-ow> does C<chmod o-w %s> etc. +Change the permissions of the selection. For example, C<E<lt>C-xE<gt>+ar> does +C<chmod a+r %s>, C<E<lt>C-xE<gt>-ow> does C<chmod o-w %s> etc. -=item yy +=item Alt+w Copy (yank) the selection, like pressing Ctrl+C in modern GUI programs. -=item dd +=item ^W Cut the selection, like pressing Ctrl+X in modern GUI programs. -=item pp +=item ^Yy Paste the files which were previously copied or cut, like pressing Ctrl+V in modern GUI programs. -=item po +=item ^Yo Paste the copied/cut files, overwriting existing files. -=item pl, pL +=item ^Yl, ^YL Create symlinks (absolute or relative) to the copied files -=item phl +=item ^Yhl Create hardlinks to the copied files -=item pht +=item ^Yht Duplicate the subdirectory tree of the copied directory, then create hardlinks for each contained file into the new directory tree. -=item mI<X> +=item ^XrmI<X> Create a bookmark with the name I<X> -=item `I<X> +=item ^XrbI<X> Move to the bookmark with the name I<X> -=item n +=item ^S -Find the next file. By default, this gets you to the newest file in the -directory, but if you search something using the keys /, cm, ct, ..., it will -get you to the next found entry. +Find the next file. (Currently broken) -=item N +=item ^R Find the previous file. -=item oI<X> +=item ^XoI<X> Change the sort method (like in mutt) @@ -445,74 +448,56 @@ Change the sort method (like in mutt) Change settings. See the settings section for a list of settings and their hotkey. -=item uI<?> +=item ^_ -Universal undo-key. Depending on the key that you press after "u", it either -restores closed tabs (uq), removes tags (ut), clears the copy/cut buffer (ud), -starts the reversed visual mode (uV) or clears the selection (uv). - -=item f - -Quickly navigate by entering a part of the filename. +Universal undo-key. Depending on the key that you press afterwards, it either +restores closed tabs (^_k), removes tags (^_t) or clears the copy/cut buffer +(^_w). =item Space Mark a file. -=item v - -Toggle the mark-status of all files - -=item V +=item ^Space Starts the visual mode, which selects all files between the starting point and the cursor until you press ESC. To unselect files in the same way, use "uV". -=item / +=item ^Xs Search for files in the current directory. -=item : +=item Alt+x Open the console. -=item ! +=item Alt+! Open the console with the content "shell " so you can quickly run commands -=item @ - -Open the console with the content "shell %s", placing the cursor before the -" %s" so you can quickly run commands with the current selection as the -argument. - -=item r +=item Alt+f Open the console with the content "open with " so you can decide which program to use to open the current file selection. -=item cd - -Open the console with the content "cd " - =item Alt-I<N> Open a tab. N has to be a number from 0 to 9. If the tab doesn't exist yet, it will be created. -=item gn, ^N +=item ^Xf Create a new tab. -=item gt, gT +=item ^Xb -Go to the next or previous tab. You can also use TAB and SHIFT+TAB instead. +Go to the next tab. -=item gc, ^W +=item ^Xk Close the current tab. The last tab cannot be closed this way. -=item M +=item ^Xm A key chain that allows you to quickly change the line mode of all the files of the current directory. For a more permanent solution, use the command @@ -577,7 +562,7 @@ value are in [brackets]. The hotkey to toggle the setting is in <brokets>, if a hotkey exists. Settings can be changed in the file F<~/.config/ranger/rc.conf> or on the -fly with the command B<:set option value>. Examples: +fly with the command B<E<lt>M-xE<gt>set option value>. Examples: set column_ratios 1,2,3 set show_hidden true @@ -592,7 +577,7 @@ The different types of settings and an example for each type: list | 1,2,3,4 none | none -You can view a list of all settings and their current values by pressing "3?" +You can view a list of all settings and their current values by pressing "^Hs" in ranger. =over @@ -606,14 +591,15 @@ directory. =item autosave_bookmarks [bool] -Save bookmarks (used with mX and `X) instantly? This helps to synchronize -bookmarks between multiple ranger instances but leads to *slight* performance -loss. When false, bookmarks are saved when ranger is exited. +Save bookmarks (used with B<E<lt>C-xE<gt>rm> and B<E<lt>C-xE<gt>rb>) instantly? +This helps to synchronize bookmarks between multiple ranger instances but leads +to *slight* performance loss. When false, bookmarks are saved when ranger is +exited. =item autoupdate_cumulative_size [bool] You can display the "real" cumulative size of directories by using the command -:get_cumulative_size or typing "dc". The size is expensive to calculate and +<M-x>get_cumulative_size or typing "<C-x>dc". The size is expensive to calculate and will not be updated automatically. You can choose to update it automatically though by turning on this option. @@ -622,7 +608,7 @@ though by turning on this option. Specify whether bookmarks should be included in the tab completion of the "cd" command. -=item collapse_preview [bool] <zc> +=item collapse_preview [bool] <^Xzc> When no preview is visible, should the last column be squeezed to make use of the whitespace? @@ -670,7 +656,7 @@ Draw borders around columns? Draw a progress bar in the status bar which displays the average state of all currently running tasks which support progress bars? -=item flushinput [bool] <zi> +=item flushinput [bool] <^Xzi> Flush the input after each key hit? One advantage is that when scrolling down with "j", ranger stops scrolling instantly when you release the key. One @@ -704,7 +690,7 @@ When the metadata manager module looks for metadata, should it only look for a ".metadata.json" file in the current directory, or do a deep search and check all directories above the current one as well? -=item mouse_enabled [bool] <zm> +=item mouse_enabled [bool] <^Xzm> Enable mouse input? @@ -714,11 +700,11 @@ When collapse_preview is on and there is no preview, should there remain a little padding on the right? This allows you to click into that space to run the file. -=item preview_directories [bool] <zP> +=item preview_directories [bool] <^XzP> Preview directories in the preview column? -=item preview_files [bool] <zp> +=item preview_files [bool] <^Xzp> Preview files in the preview column? @@ -759,20 +745,20 @@ Always show the terminal cursor? Show dotfiles in the bookmark preview window? (Type ') -=item show_hidden [bool] <zh>, <^H> +=item show_hidden [bool] <^Xzh> Show hidden files? -=item sort_case_insensitive [bool] <zc> +=item sort_case_insensitive [bool] <^Xzc> Sort case-insensitively? If true, "a" will be listed before "B" even though its ASCII value is higher. -=item sort_directories_first [bool] <zd> +=item sort_directories_first [bool] <^Xzd> Sort directories first? -=item sort_reverse [bool] <or> +=item sort_reverse [bool] <^Xor> Reverse the order of files? @@ -781,7 +767,7 @@ Reverse the order of files? When sorting according to some string, should the unicode characters be compared, instead of looking at the raw character values to save time? -=item sort [string] <oa>, <ob>, <oc>, <oe>, <om>, <on>, <ot>, <os>, <oz> +=item sort [string] <^Xoa>, <^Xob>, <^Xoc>, <^Xoe>, <^Xom>, <^Xon>, <^Xot>, <^Xos>, <^Xoz> Which sorting mechanism should be used? Choose one of B<atime>, B<basename>, B<ctime>, B<extension>, B<mtime>, B<natural>, B<type>, B<size>, B<random> @@ -809,7 +795,7 @@ Set a window title? Set the title to "ranger" in the tmux program? -=item use_preview_script [bool] <zv> +=item use_preview_script [bool] <^Xzv> Use the preview script defined in the setting I<preview_script>? @@ -835,10 +821,11 @@ Enable this if key combinations with the Alt Key don't work for you. =head1 COMMANDS -You can enter the commands in the console which is opened by pressing ":". +You can enter the commands in the console which is opened by pressing B<Alt+x>. -You can always get a list of the currently existing commands by typing "2?" in -ranger. For your convenience, this is a list of the "public" commands including their parameters, excluding descriptions: +You can always get a list of the currently existing commands by typing "^Hc" in +ranger. For your convenience, this is a list of the "public" commands +including their parameters, excluding descriptions: alias [newcommand] [oldcommand] bulkrename @@ -917,7 +904,7 @@ it, it will be executed. =item cd [I<directory>] -The cd command changes the directory. The command C<:cd -> is equivalent to +The cd command changes the directory. The command C<E<lt>M-xE<gt>cd -> is equivalent to typing ``. =item chain I<command1>[; I<command2>[; I<command3>...]] @@ -933,10 +920,6 @@ the user, the group and others. A 1 permits execution, a 2 permits writing, a 4 permits reading. Add those numbers to combine them. So a 7 permits everything. -Key bindings in the form of [-+]<who><what> and <octal>= also exist. For -example, B<+ar> allows reading for everyone, -ow forbids others to write and -777= allows everything. - See also: man 1 chmod =item cmap I<key> I<command> @@ -980,13 +963,13 @@ Sets the default linemode. See I<linemode> command. Examples: Set the global default linemode to "permissions": - :default_linemode permissions + <M-x> default_linemode permissions Set the default linemode to "permissions" for all files tagged with "p" or "P": - :default_linemode tag=pP permissions + <M-x> default_linemode tag=pP permissions Set the default linemode for all files in ~/books/ to "metatitle": - :default_linemode path=/home/.*?/books/.* metatitle + <M-x> default_linemode path=/home/.*?/books/.* metatitle =item delete @@ -1005,9 +988,9 @@ text, use the function `p'. The result is displayed on the screen unless you use the "-q" option. Examples: - :eval fm - :eval len(fm.tabs) - :eval p("Hello World!") + <M-x> eval fm + <M-x> eval len(fm.tabs) + <M-x> eval p("Hello World!") =item filter [I<string>] @@ -1049,7 +1032,7 @@ Sets the linemode of all files in the current directory. The linemode may be: "permissions": display each line as "<permissions> <owner> <group> <basename>" "metatitle": display metadata from .metadata.json files if available, fall back to the "filename" linemode if no - metadata was found. See :meta command. + metadata was found. See <M-x>meta command. The custom linemodes may be added by subclassing the I<LinemodeBase> class. See the I<ranger.core.linemode> module for some examples. @@ -1085,8 +1068,8 @@ the tag argument, all tagged files are marked. Set the metadata of the currently highlighted file. Example: - :meta title The Hitchhiker's Guide to the Galaxy - :meta year 1979 + <M-x> meta title The Hitchhiker's Guide to the Galaxy + <M-x> meta year 1979 This metadata can be displayed by, for example, using the "metatitle" line mode by typing Mt. @@ -1135,8 +1118,8 @@ Change the link destination of the current symlink file to <newpath>. First =item rename_append -Opens the console with ":rename <current file>" with the cursor automatically -placed before the file extension +Opens the console with "<M-x> rename <current file>" with the cursor +automatically placed before the file extension =item rename I<newname> @@ -1168,8 +1151,8 @@ influence its behaviour: -t = apply filter and search pattern as you type -v = inverts the match -Multiple flags can be combined. For example, ":scout -gpt" would create -a :filter-like command using globbing. +Multiple flags can be combined. For example, "<M-x>scout -gpt" would create a +<M-x>filter-like command using globbing. =item search I<pattern> @@ -1290,7 +1273,7 @@ and settings are defined here. =item commands.py A python module that defines commands which can be used in ranger's console by -typing ":" or in the rc.conf file. +typing "<M-x>" or in the rc.conf file. =item commands_full.py @@ -1326,15 +1309,17 @@ Plugins can be placed here. This file contains a list of bookmarks. The syntax is /^(.):(.*)$/. The first character is the bookmark key and the rest after the colon is the path to the -file. In ranger, bookmarks can be set by typing m<key>, accessed by typing -'<key> and deleted by typing um<key>. +file. In ranger, bookmarks can be set by typing +B<E<lt>C-xE<gt>rmE<lt>keyE<gt>>, accessed by typing +B<E<lt>C-xE<gt>rbE<lt>keyE<gt>> and deleted by typing +B<E<lt>C-xE<gt>ruE<lt>keyE<gt>>. =item copy_buffer -When running the command :save_copy_buffer, the paths of all currently copied -files are saved in this file. You can later run :load_copy_buffer to copy the -same files again, pass them to another ranger instance or process them in a -script. +When running the command <M-x>save_copy_buffer, the paths of all currently +copied files are saved in this file. You can later run <M-x>load_copy_buffer +to copy the same files again, pass them to another ranger instance or process +them in a script. =item history @@ -1344,8 +1329,8 @@ Contains a list of commands that have been previously typed in. Contains a list of tagged files. The syntax is /^(.:)?(.*)$/ where the first letter is the optional name of the tag and the rest after the optional colon is -the path to the file. In ranger, tags can be set by pressing t and removed -with T. To assign a named tag, type "<tagname>. +the path to the file. In ranger, tags can be set by pressing +B<E<lt>C-xE<gt>tE<lt>tagnameE<gt>> and removed with B<E<lt>C-_E<gt>t>. =back @@ -1372,17 +1357,13 @@ don't need the default one at all. =item EDITOR -Defines the editor to be used for the "E" key. Defaults to "nano". - -=item SHELL - -Defines the shell that ranger is going to use with the :shell command and -the "S" key. Defaults to "/bin/sh". +Defines the editor to be used for the B<E<lt>C-xE<gt>E<lt>C-fE<gt>> key. +Defaults to "emacs". =item TERMCMD Defines the terminal emulator command that ranger is going to use with the -:terminal command and the "t" run flag. Defaults to "xterm". +<M-x>terminal command and the "t" run flag. Defaults to "xterm". =item XDG_CONFIG_HOME diff --git a/doc/rifle.1 b/doc/rifle.1 index 999d56d6..f7e9df78 100644 --- a/doc/rifle.1 +++ b/doc/rifle.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "RIFLE 1" -.TH RIFLE 1 "rifle-1.6.1" "08/26/2014" "rifle manual" +.TH RIFLE 1 "rifle-1.6.1" "03/31/2015" "rifle manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/ranger/config/commands.py b/ranger/config/commands.py index 8797cb6b..a1bc7a76 100644 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -660,7 +660,7 @@ class touch(Command): class edit(Command): """:edit <filename> - Opens the specified file in vim + Opens the specified file in Emacs """ def execute(self): diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf index ca67c389..29ccdeb8 100644 --- a/ranger/config/rc.conf +++ b/ranger/config/rc.conf @@ -223,46 +223,33 @@ alias travel scout -aefiklst # =================================================================== # Basic -map Q quit! -map q quit -copymap q ZZ ZQ - -map R reload_cwd -map <C-r> reset -map <C-l> redraw_window -map <C-c> abort -map <esc> change_mode normal - -map i display_file -map ? help -map W display_log -map w taskview_open -map S shell $SHELL - -map : console -map ; console -map ! console shell -map @ console -p6 shell %%s -map # console shell -p -map s console shell -map r chain draw_possible_programs; console open_with -map f console find -map cd console cd +map <C-x><C-c> quit! +map <C-x>k quit + +map <C-x>R reload_cwd +map <C-x><C-r> reset +map <C-l> redraw_window +map <C-g> chain abort; change_mode normal; mark_files all=True val=False + +map <C-x>i display_file +map <C-h> help +map <C-x>W display_log +map <C-x>w taskview_open + +map <A-x> console +map <A-!> console shell +map <A-f> chain draw_possible_programs; console open_with # Change the line mode -map Mf linemode filename -map Mp linemode permissions -map Mt linemode metatitle +map <C-x>mf linemode filename +map <C-x>mp linemode permissions +map <C-x>mt linemode metatitle # Tagging / Marking -map t tag_toggle -map ut tag_remove -map "<any> tag_toggle tag=%any -map <Space> mark_files toggle=True -map v mark_files all=True toggle=True -map uv mark_files all=True val=False -map V toggle_visual_mode -map uV toggle_visual_mode reverse=True +map <C-x>t<any> tag_toggle tag=%any +map <C-_>t tag_remove +map <Space> mark_files toggle=True +map <C-Space> toggle_visual_mode # For the nostalgics: Midnight Commander bindings map <F1> help @@ -274,7 +261,7 @@ map <F7> console mkdir map <F8> console delete map <F10> exit -# In case you work on a keyboard with dvorak layout +# Direction keys map <UP> move up=1 map <DOWN> move down=1 map <LEFT> move left=1 @@ -287,112 +274,79 @@ map <CR> move right=1 #map <DELETE> console delete map <INSERT> console touch -# VIM-like -copymap <UP> k -copymap <DOWN> j -copymap <LEFT> h -copymap <RIGHT> l -copymap <HOME> gg -copymap <END> G -copymap <PAGEDOWN> <C-F> -copymap <PAGEUP> <C-B> - -map J move down=0.5 pages=True -map K move up=0.5 pages=True -copymap J <C-D> -copymap K <C-U> +copymap <UP> <C-p> +copymap <DOWN> <C-n> +copymap <LEFT> <C-b> +copymap <RIGHT> <C-f> +copymap <HOME> <A-LT> +copymap <END> <A-GT> +copymap <PAGEDOWN> <A-v> +copymap <PAGEUP> <C-v> # Jumping around -map H history_go -1 -map L history_go 1 -map ] move_parent 1 -map [ move_parent -1 -map } traverse - -map gh cd ~ -map ge cd /etc -map gu cd /usr -map gd cd /dev -map gl cd -r . -map gL cd -r %f -map go cd /opt -map gv cd /var -map gm cd /media -map gM cd /mnt -map gs cd /srv -map gr cd / -map gR eval fm.cd(ranger.RANGERDIR) -map g/ cd / -map g? cd /usr/share/doc/ranger +map <C-u><C-space> history_go -1 +map <A-}> move_parent 1 +map <A-{> move_parent -1 + +map <C-x>gh cd ~ +map <C-x>ge cd /etc +map <C-x>gu cd /usr +map <C-x>gd cd /dev +map <C-x>gl cd -r . +map <C-x>gL cd -r %f +map <C-x>go cd /opt +map <C-x>gv cd /var +map <C-x>gm cd /media +map <C-x>gM cd /mnt +map <C-x>gs cd /srv +map <C-x>gr cd / +map <C-x>gR eval fm.cd(ranger.RANGERDIR) +map <C-x>g/ cd / +map <C-x>g? cd /usr/share/doc/ranger # External Programs -map E edit -map du shell -p du --max-depth=1 -h --apparent-size -map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh -map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b -map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b -map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b +map <C-x><C-f> edit +map <C-x>du shell -p du --max-depth=1 -h --apparent-size +map <C-x>dU shell -p du --max-depth=1 -h --apparent-size | sort -rh +map <C-x>wp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b +map <C-x>wd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b +map <C-x>wn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b # Filesystem Operations -map = chmod - -map cw console rename -map a rename_append -map A eval fm.open_console('rename ' + fm.thisfile.basename) -map I eval fm.open_console('rename ' + fm.thisfile.basename, position=7) - -map pp paste -map po paste overwrite=True -map pl paste_symlink relative=False -map pL paste_symlink relative=True -map phl paste_hardlink -map pht paste_hardlinked_subtree - -map dD console delete - -map dd cut -map ud uncut -map da cut mode=add -map dr cut mode=remove - -map yy copy -map uy uncut -map ya copy mode=add -map yr copy mode=remove - -# Temporary workarounds -map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) -map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) -map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) -map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) -map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) -map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) -map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) -map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) +map <C-x>= chmod + +map <A-d> console rename +map <C-e> eval fm.open_console('rename ' + fm.thisfile.basename) +map <C-a> eval fm.open_console('rename ' + fm.thisfile.basename, position=7) + +map <C-y>y paste +map <C-y>o paste overwrite=True +map <C-y>l paste_symlink relative=False +map <C-y>L paste_symlink relative=True +map <C-y>hl paste_hardlink +map <C-y>ht paste_hardlinked_subtree + +map <C-w> cut +map <C-_>w uncut +map <C-x><C-w>a cut mode=add +map <C-x><C-w>r cut mode=remove + +map <A-w> copy +map <C-x><A-w>a copy mode=add +map <C-x><A-w>r copy mode=remove # Searching -map / console search -map n search_next -map N search_next forward=False -map ct search_next order=tag -map cs search_next order=size -map ci search_next order=mimetype -map cc search_next order=ctime -map cm search_next order=mtime -map ca search_next order=atime +map <C-x>s console search_inc +map <C-s> search_next +map <C-r> search_next forward=False # Tabs -map <C-n> tab_new ~ -map <C-w> tab_close -map <TAB> tab_move 1 -map <S-TAB> tab_move -1 +#map <C-n> tab_new ~ +map <C-x>b tab_move 1 map <A-Right> tab_move 1 map <A-Left> tab_move -1 -map gt tab_move 1 -map gT tab_move -1 -map gn tab_new ~ -map gc tab_close -map uq tab_restore +map <C-x>f tab_new ~ +map <C-_>k tab_restore map <a-1> tab_open 1 map <a-2> tab_open 2 map <a-3> tab_open 3 @@ -403,64 +357,67 @@ map <a-7> tab_open 7 map <a-8> tab_open 8 map <a-9> tab_open 9 + # Sorting -map or toggle_option sort_reverse -map oz set sort=random -map os chain set sort=size; set sort_reverse=False -map ob chain set sort=basename; set sort_reverse=False -map on chain set sort=natural; set sort_reverse=False -map om chain set sort=mtime; set sort_reverse=False -map oc chain set sort=ctime; set sort_reverse=False -map oa chain set sort=atime; set sort_reverse=False -map ot chain set sort=type; set sort_reverse=False -map oe chain set sort=extension; set sort_reverse=False - -map oS chain set sort=size; set sort_reverse=True -map oB chain set sort=basename; set sort_reverse=True -map oN chain set sort=natural; set sort_reverse=True -map oM chain set sort=mtime; set sort_reverse=True -map oC chain set sort=ctime; set sort_reverse=True -map oA chain set sort=atime; set sort_reverse=True -map oT chain set sort=type; set sort_reverse=True -map oE chain set sort=extension; set sort_reverse=True - -map dc get_cumulative_size +map <C-x>or toggle_option sort_reverse +map <C-x>oz set sort=random +map <C-x>os chain set sort=size; set sort_reverse=False +map <C-x>ob chain set sort=basename; set sort_reverse=False +map <C-x>on chain set sort=natural; set sort_reverse=False +map <C-x>om chain set sort=mtime; set sort_reverse=False +map <C-x>oc chain set sort=ctime; set sort_reverse=False +map <C-x>oa chain set sort=atime; set sort_reverse=False +map <C-x>ot chain set sort=type; set sort_reverse=False +map <C-x>oe chain set sort=extension; set sort_reverse=False + +map <C-x>oS chain set sort=size; set sort_reverse=True +map <C-x>oB chain set sort=basename; set sort_reverse=True +map <C-x>oN chain set sort=natural; set sort_reverse=True +map <C-x>oM chain set sort=mtime; set sort_reverse=True +map <C-x>oC chain set sort=ctime; set sort_reverse=True +map <C-x>oA chain set sort=atime; set sort_reverse=True +map <C-x>oT chain set sort=type; set sort_reverse=True +map <C-x>oE chain set sort=extension; set sort_reverse=True + +map <C-x>dc get_cumulative_size # Settings -map zc toggle_option collapse_preview -map zd toggle_option sort_directories_first -map zh toggle_option show_hidden -map <C-h> toggle_option show_hidden -map zi toggle_option flushinput -map zm toggle_option mouse_enabled -map zp toggle_option preview_files -map zP toggle_option preview_directories -map zs toggle_option sort_case_insensitive -map zu toggle_option autoupdate_cumulative_size -map zv toggle_option use_preview_script -map zf console filter +map <C-x>zc toggle_option collapse_preview +map <C-x>zd toggle_option sort_directories_first +map <C-x>zh toggle_option show_hidden +map <C-x>zi toggle_option flushinput +map <C-x>zm toggle_option mouse_enabled +map <C-x>zp toggle_option preview_files +map <C-x>zP toggle_option preview_directories +map <C-x>zs toggle_option sort_case_insensitive +map <C-x>zu toggle_option autoupdate_cumulative_size +map <C-x>zv toggle_option use_preview_script +map <C-x>zf console filter # Bookmarks -map `<any> enter_bookmark %any -map '<any> enter_bookmark %any -map m<any> set_bookmark %any -map um<any> unset_bookmark %any +map <C-x>rb<any> enter_bookmark %any +map <C-x>rm<any> set_bookmark %any +map <C-x>ru<any> unset_bookmark %any -map m<bg> draw_bookmarks -copymap m<bg> um<bg> `<bg> '<bg> +map <C-x>rb<bg> draw_bookmarks +copymap <C-x>rb<bg> <C-x>rm<bg> <C-x>ru<bg> # Generate all the chmod bindings with some python help: -eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) -eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) -eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) -eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) -eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) - -eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) -eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) -eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) -eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) -eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map <C-x>+u{0} shell -f chmod u+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map <C-x>+g{0} shell -f chmod g+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map <C-x>+o{0} shell -f chmod o+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map <C-x>+a{0} shell -f chmod a+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map <C-x>+{0} shell -f chmod u+{0} %s".format(arg)) + +eval for arg in "rwxXst": cmd("map <C-x>-u{0} shell -f chmod u-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map <C-x>-g{0} shell -f chmod g-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map <C-x>-o{0} shell -f chmod o-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map <C-x>-a{0} shell -f chmod a-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map <C-x>-{0} shell -f chmod u-{0} %s".format(arg)) + +# Search for letters as you type them +#eval for arg in "abcdefghijklmnopqrstuvwxyz": cmd("map {0} console search_inc {0}".format(arg)) +map <allow_quantifiers> false # =================================================================== # == Define keys for the console @@ -470,11 +427,11 @@ eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) # Basic cmap <tab> eval fm.ui.console.tab() cmap <s-tab> eval fm.ui.console.tab(-1) -cmap <ESC> eval fm.ui.console.close() +cmap <C-g> eval fm.ui.console.close() cmap <CR> eval fm.ui.console.execute() cmap <C-l> redraw_window -copycmap <ESC> <C-c> +copycmap <C-g> <esc> copycmap <CR> <C-j> # Move around @@ -523,24 +480,20 @@ pmap <home> pager_move to=0 pmap <end> pager_move to=-1 pmap <pagedown> pager_move down=1.0 pages=True pmap <pageup> pager_move up=1.0 pages=True -pmap <C-d> pager_move down=0.5 pages=True -pmap <C-u> pager_move up=0.5 pages=True - -copypmap <UP> k <C-p> -copypmap <DOWN> j <C-n> <CR> -copypmap <LEFT> h -copypmap <RIGHT> l -copypmap <HOME> g -copypmap <END> G -copypmap <C-d> d -copypmap <C-u> u -copypmap <PAGEDOWN> n f <C-F> <Space> -copypmap <PAGEUP> p b <C-B> + +copypmap <UP> <C-p> +copypmap <DOWN> <C-n> <CR> +copypmap <LEFT> <C-b> +copypmap <RIGHT> <C-f> +copypmap <HOME> <A-LT> +copypmap <END> <A-GT> +copypmap <PAGEDOWN> <C-F> <A-v> <Space> +copypmap <PAGEUP> <C-B> <C-v> # Basic pmap <C-l> redraw_window -pmap <ESC> pager_close -copypmap <ESC> q Q i <F3> +pmap <C-g> pager_close +copypmap <C-g> q Q i <F3> pmap E edit_file # =================================================================== @@ -566,14 +519,13 @@ copytmap <PAGEDOWN> n f <C-F> <Space> copytmap <PAGEUP> p b <C-B> # 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 <A-n> eval -q fm.ui.taskview.task_move(-1) +tmap <A-p> eval -q fm.ui.taskview.task_move(0) +tmap <C-d> 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() # Basic tmap <C-l> redraw_window -tmap <ESC> taskview_close -copytmap <ESC> q Q w <C-c> +tmap <C-g> taskview_close diff --git a/ranger/config/rifle.conf b/ranger/config/rifle.conf index f4b438c7..20727458 100644 --- a/ranger/config/rifle.conf +++ b/ranger/config/rifle.conf @@ -1,5 +1,3 @@ -# vim: ft=cfg -# # This is the configuration file of "rifle", ranger's file executor/opener. # Each line consists of conditions and a command. For each line the conditions # are checked and if they are met, the respective command is run. @@ -53,9 +51,8 @@ # Rarely installed browsers get higher priority; It is assumed that if you # install a rare browser, you probably use it. Firefox/konqueror/w3m on the # other hand are often only installed as fallback browsers. +ext x?html?, has conkeror, X, flag f = conkeror -- file://"$1" ext x?html?, has surf, X, flag f = surf -- file://"$1" -ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@" -ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@" ext x?html?, has dwb, X, flag f = dwb -- "$@" ext x?html?, has jumanji, X, flag f = jumanji -- "$@" ext x?html?, has luakit, X, flag f = luakit -- "$@" @@ -70,6 +67,8 @@ ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@" ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@" ext x?html?, has epiphany, X, flag f = epiphany -- "$@" ext x?html?, has konqueror, X, flag f = konqueror -- "$@" +ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@" +ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@" ext x?html?, has elinks, terminal = elinks "$@" ext x?html?, has links2, terminal = links2 "$@" ext x?html?, has links, terminal = links "$@" diff --git a/ranger/core/fm.py b/ranger/core/fm.py index 8ae1e753..c95ec905 100644 --- a/ranger/core/fm.py +++ b/ranger/core/fm.py @@ -311,6 +311,8 @@ class FM(Actions, SignalDispatcher): 5. after X loops: collecting unused directory objects """ + self.notify("Welcome to ranger, the file manager with Emacs keybindings! Press ^X^C to exit.") + self.enter_dir(self.thistab.path) gc_tick = 0 diff --git a/ranger/ext/keybinding_parser.py b/ranger/ext/keybinding_parser.py index 780359f5..8efb337f 100644 --- a/ranger/ext/keybinding_parser.py +++ b/ranger/ext/keybinding_parser.py @@ -34,6 +34,8 @@ special_keys = { 'end': curses.KEY_END, 'tab': ord('\t'), 's-tab': curses.KEY_BTAB, + 'lt': ord('<'), + 'gt': ord('>'), } very_special_keys = { @@ -46,12 +48,14 @@ very_special_keys = { for key, val in tuple(special_keys.items()): special_keys['a-' + key] = (ALT_KEY, val) -for char in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789': +for char in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_!{}': special_keys['a-' + char] = (ALT_KEY, ord(char)) -for char in 'abcdefghijklmnopqrstuvwxyz': +for char in 'abcdefghijklmnopqrstuvwxyz_': special_keys['c-' + char] = ord(char) - 96 +special_keys['c-space'] = 0 + for n in range(64): special_keys['f' + str(n)] = curses.KEY_F0 + n diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py index 640cb382..ddbfed07 100755 --- a/ranger/ext/rifle.py +++ b/ranger/ext/rifle.py @@ -23,7 +23,7 @@ __version__ = 'rifle 1.6.1' # Options and constants that a user might want to change: DEFAULT_PAGER = 'less' -DEFAULT_EDITOR = 'vim' +DEFAULT_EDITOR = 'emacs' ASK_COMMAND = 'ask' ENCODING = 'utf-8' diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py index 1d125acf..b006e671 100644 --- a/ranger/gui/ui.py +++ b/ranger/gui/ui.py @@ -199,7 +199,7 @@ class UI(DisplayableContainer): curses.flushinp() else: # Handle simple key presses, CTRL+X, etc here: - if key > 0: + if key >= 0: if self.settings.flushinput and not self.console.visible: curses.flushinp() if key == curses.KEY_MOUSE: diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index 5b9dbf3f..6771d023 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -17,7 +17,7 @@ class Console(Widget): visible = False last_cursor_mode = None history_search_pattern = None - prompt = ':' + prompt = 'M-x ' copy = '' tab_deque = None original_line = None |