From 4201627fc6b05967a5e7d798f452c71713928f23 Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Sun, 26 Aug 2018 09:51:08 +0200 Subject: Add support for default terminal word-movement commands to console - Alt-b for moving backwards by words, - Alt-f for moving forwards by words. --- ranger/config/rc.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf index 0228725e..f25589e3 100644 --- a/ranger/config/rc.conf +++ b/ranger/config/rc.conf @@ -617,6 +617,8 @@ cmap eval fm.ui.console.move(right=0, absolute=True) cmap eval fm.ui.console.move(right=-1, absolute=True) cmap eval fm.ui.console.move_word(left=1) cmap eval fm.ui.console.move_word(right=1) +cmap eval fm.ui.console.move_word(left=1) +cmap eval fm.ui.console.move_word(right=1) # Line Editing cmap eval fm.ui.console.delete(-1) -- cgit 1.4.1-2-gfad0 From 66b8e2740c53c21839a08dc2b36cd3289cf12f1f Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Sun, 26 Aug 2018 10:08:26 +0200 Subject: Add word-movement commands in console to man-page --- doc/ranger.1 | 30 ++++++++++++++++++++---------- doc/ranger.pod | 8 ++++++++ 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/doc/ranger.1 b/doc/ranger.1 index 060686b8..380a48dc 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) +.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -54,16 +54,20 @@ .\" Avoid warning from groff about undefined register 'F'. .de IX .. -.if !\nF .nr F 0 -.if \nF>0 \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. -. if !\nF==2 \{\ -. nr % 0 -. nr F 2 +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} . \} .\} +.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -169,7 +173,7 @@ plugins, sample configuration files and some programs for integrating ranger with other software. They are usually installed to \&\fI/usr/share/doc/ranger/examples\fR. .PP -The man page of \fIrifle\fR\|(1) describes the functions of the file opener +The man page of \fBrifle\fR\|(1) describes the functions of the file opener .PP The section \fI\s-1LINKS\s0\fR of this man page contains further resources. .SH "POSITIONAL ARGUMENTS" @@ -703,6 +707,12 @@ Move up and down (P for previous, N for Next) .IP "^A, ^E" 14 .IX Item "^A, ^E" Move to the start or to the end +.IP "Alt-B" 14 +.IX Item "Alt-B" +Move backwards by words. +.IP "Alt-F" 14 +.IX Item "Alt-F" +Move forwards by words. .IP "^D" 14 .IX Item "^D" Delete the current character. @@ -1632,7 +1642,7 @@ copy, run: .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" -\&\fIrifle\fR\|(1) +\&\fBrifle\fR\|(1) .SH "BUGS" .IX Header "BUGS" Report bugs here: diff --git a/doc/ranger.pod b/doc/ranger.pod index 48e6a41e..1b1af68e 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -690,6 +690,14 @@ Move up and down (P for previous, N for Next) Move to the start or to the end +=item Alt-B + +Move backwards by words. + +=item Alt-F + +Move forwards by words. + =item ^D Delete the current character. -- cgit 1.4.1-2-gfad0 From e10321b9f8020bdf4c05a1cddc9f989154de8adf Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Sun, 26 Aug 2018 10:09:22 +0200 Subject: Fix punctuation in READLINE-LIKE BINDINGS IN THE CONSOLE Adds full-stops at the end of every entry. --- doc/ranger.1 | 6 +++--- doc/ranger.pod | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/ranger.1 b/doc/ranger.1 index 380a48dc..936b10bd 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -700,13 +700,13 @@ Show the current filter stack state. .IX Subsection "READLINE-LIKE BINDINGS IN THE CONSOLE" .IP "^B, ^F" 14 .IX Item "^B, ^F" -Move left and right (B for back, F for forward) +Move left and right (B for back, F for forward). .IP "^P, ^N" 14 .IX Item "^P, ^N" -Move up and down (P for previous, N for Next) +Move up and down (P for previous, N for Next). .IP "^A, ^E" 14 .IX Item "^A, ^E" -Move to the start or to the end +Move to the start or to the end. .IP "Alt-B" 14 .IX Item "Alt-B" Move backwards by words. diff --git a/doc/ranger.pod b/doc/ranger.pod index 1b1af68e..6411292c 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -680,15 +680,15 @@ Show the current filter stack state. =item ^B, ^F -Move left and right (B for back, F for forward) +Move left and right (B for back, F for forward). =item ^P, ^N -Move up and down (P for previous, N for Next) +Move up and down (P for previous, N for Next). =item ^A, ^E -Move to the start or to the end +Move to the start or to the end. =item Alt-B -- cgit 1.4.1-2-gfad0 From 499fb0421b0af276a4c971c0e73f4eb0024a7379 Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Sun, 26 Aug 2018 13:05:57 +0200 Subject: Revert "Fix punctuation in READLINE-LIKE BINDINGS IN THE CONSOLE" This reverts commit dedbabb8eb6035bcbd44c6163834247f1a0415cd. --- doc/ranger.1 | 6 +++--- doc/ranger.pod | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/ranger.1 b/doc/ranger.1 index 936b10bd..380a48dc 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -700,13 +700,13 @@ Show the current filter stack state. .IX Subsection "READLINE-LIKE BINDINGS IN THE CONSOLE" .IP "^B, ^F" 14 .IX Item "^B, ^F" -Move left and right (B for back, F for forward). +Move left and right (B for back, F for forward) .IP "^P, ^N" 14 .IX Item "^P, ^N" -Move up and down (P for previous, N for Next). +Move up and down (P for previous, N for Next) .IP "^A, ^E" 14 .IX Item "^A, ^E" -Move to the start or to the end. +Move to the start or to the end .IP "Alt-B" 14 .IX Item "Alt-B" Move backwards by words. diff --git a/doc/ranger.pod b/doc/ranger.pod index 6411292c..1b1af68e 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -680,15 +680,15 @@ Show the current filter stack state. =item ^B, ^F -Move left and right (B for back, F for forward). +Move left and right (B for back, F for forward) =item ^P, ^N -Move up and down (P for previous, N for Next). +Move up and down (P for previous, N for Next) =item ^A, ^E -Move to the start or to the end. +Move to the start or to the end =item Alt-B -- cgit 1.4.1-2-gfad0 From 442c846f1c4f2f1c1e012008eb15ad57e01d765e Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Sat, 1 Sep 2018 10:49:23 +0200 Subject: Add Alt-LEFT and Alt-RIGHT for moving between words in man --- doc/ranger.1 | 8 ++++---- doc/ranger.pod | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/ranger.1 b/doc/ranger.1 index 380a48dc..0c55638a 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -707,11 +707,11 @@ Move up and down (P for previous, N for Next) .IP "^A, ^E" 14 .IX Item "^A, ^E" Move to the start or to the end -.IP "Alt-B" 14 -.IX Item "Alt-B" +.IP "Alt-B, Alt-LEFT" 14 +.IX Item "Alt-B, Alt-LEFT" Move backwards by words. -.IP "Alt-F" 14 -.IX Item "Alt-F" +.IP "Alt-F, Alt-RIGHT" 14 +.IX Item "Alt-F, Alt-RIGHT" Move forwards by words. .IP "^D" 14 .IX Item "^D" diff --git a/doc/ranger.pod b/doc/ranger.pod index 1b1af68e..3e269261 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -690,11 +690,11 @@ Move up and down (P for previous, N for Next) Move to the start or to the end -=item Alt-B +=item Alt-B, Alt-LEFT Move backwards by words. -=item Alt-F +=item Alt-F, Alt-RIGHT Move forwards by words. -- cgit 1.4.1-2-gfad0 From 565110840d6a0a54e99b77f797279ccb8e490f94 Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Sat, 1 Sep 2018 11:01:37 +0200 Subject: Set default and alternative bindings for word-movements - Alt-B and Alt-F are set as the default bindings (cmap), - Alt-LEFT and Alt-RIGHT are set as alternative bindings (copycmap). --- ranger/config/rc.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf index f25589e3..59c52084 100644 --- a/ranger/config/rc.conf +++ b/ranger/config/rc.conf @@ -615,11 +615,12 @@ cmap eval fm.ui.console.move(left=1) cmap eval fm.ui.console.move(right=1) cmap eval fm.ui.console.move(right=0, absolute=True) cmap eval fm.ui.console.move(right=-1, absolute=True) -cmap eval fm.ui.console.move_word(left=1) -cmap eval fm.ui.console.move_word(right=1) cmap eval fm.ui.console.move_word(left=1) cmap eval fm.ui.console.move_word(right=1) +copycmap +copycmap + # Line Editing cmap eval fm.ui.console.delete(-1) cmap eval fm.ui.console.delete(0) -- cgit 1.4.1-2-gfad0 From 2c3beb6a8aab819f165956818236892500b13c1a Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Sat, 1 Sep 2018 12:07:27 +0200 Subject: Map C-p to `console` for faster history access Allows user to press C-p to open the console from the main view and to press C-p again to go up in the history of previous commands. --- ranger/config/rc.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf index 59c52084..5ac7cc70 100644 --- a/ranger/config/rc.conf +++ b/ranger/config/rc.conf @@ -349,6 +349,8 @@ map r chain draw_possible_programs; console open_with%%space map f console find%space map cd console cd%space +map console + # Change the line mode map Mf linemode filename map Mi linemode fileinfo -- cgit 1.4.1-2-gfad0