From ce375dbf92cd89780138cff01deae6fbefb71cf6 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Mon, 18 Apr 2011 15:42:10 +0100 Subject: updated a whole bunch of README files. --- vim-mode/README.pod | 444 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 444 insertions(+) create mode 100644 vim-mode/README.pod (limited to 'vim-mode/README.pod') diff --git a/vim-mode/README.pod b/vim-mode/README.pod new file mode 100644 index 0000000..fc52701 --- /dev/null +++ b/vim-mode/README.pod @@ -0,0 +1,444 @@ +=pod + +=head1 NAME + +vim_mode.pl + +=head1 DESCRIPTION + +An Irssi script to emulate some of the vi(m) features for the Irssi inputline. + +=head1 INSTALLATION + +Copy into your F<~/.irssi/scripts/> directory and load with +C. You may wish to have it autoload in one of the +L. + +=head2 DEPENDENCIES + +For proper :ex mode support, vim-mode requires the installation of F +Uberprompt can be downloaded from: + +L + +and follow the instructions at the top of that file for installation. + +If you don't need Ex-mode, you can run vim_mode.pl without the +uberprompt.pl script, but it is strongly recommended that you use it. + +=head3 Irssi requirements + +0.8.12 and above should work fine. However the following features are +disabled in irssi < 0.8.13: + +=over 4 + +=item C C (only with count, they work fine without count in older versions) + +=item C, C + +=back + +It is intended to work with at Irssi 0.8.12 and later versions. However some +features are disabled in older versions (see below for details). + +Perl >= 5.8.1 is recommended for UTF-8 support (which can be disabled if +necessary). Please report bugs in older versions as well, we'll try to fix +them. Later versions of Perl are also faster, which is probably beneficial +to a script of this size and complexity. + +=head2 SETUP + +Run the following command to add a statusbar item that shows which mode +you're in. + +C + +And the following to let C<:b [str]> display a list of channels matching your +search string. + +C + +B Remember to C after adding these statusbar items to make them +permanent. + + +=head3 FILE-BASED CONFIGURATION + +Additionally to the irssi settings described in L, vim_mode +can be configured through an external configuration file named "vim_moderc" +located in F<~/.irssi/vim_moderc>. If available it's loaded on startup and every +supported ex-command is run. Its syntax is similar to "vimrc". To (re)load it +while vim_mode is running use C<:so[urce]>. + +Currently Supported ex-commands: + +=over 4 + +=item C<:map> + +=back + +=head1 USAGE + +The following section is divided into the different modes as supported by Vim itself: + +=head2 COMMAND MODE + +It supports most commonly used command mode features: + +=over 2 + +=item Insert/Command mode. C and C enter command mode. C allows to use C as Escape (any other character can be used as well). + +=item Cursor motion: CSpaceE EBSE f t F T> + +=item History motion: C C moves to the oldest (first) history +line. C without a count moves to the current input line, with a count it goes to the I history line (1 is the oldest). + +=item Cursor word motion: C + +=item Word objects (only the following work yet): C + +=item Yank and paste: C + +=item Change and delete: C + +=item Delete at cursor: C + +=item Replace at cursor: C + +=item Insert mode: C + +=item Switch case: C<~> + +=item Repeat change: C<.> + +=item Repeat C + +=item Registers: C<"a-"z "" "0 "* "+ "_> (black hole) + +=item Line-wise shortcuts: C
+ +=item Shortcuts: C + +=item Scroll the scrollback buffer: C + +=item Switch to last active window: C + +=item Switch split windows: + +=item Undo/Redo: C + +=back + +Counts and combinations work as well, e.g. C or C<3iabcEescE>. Counts also work with mapped ex-commands (see below), e.g. if you map C to do C<:bn>, then C<2gb> will switch to the second next buffer. Repeat also supports counts. + +=head3 REGISTERS + +=over 4 + +=item Appending to register with C<"A-"Z> + +=item C<""> is the default yank/delete register. + +=item C<"0> contains the last yank (if no register was specified). + +=item The special registers C<"* "+> both contain irssi's internal cut-buffer. + +=back + +=head2 INSERT MODE + +The following insert mode mappings are supported: + +=over 4 + +=item Insert register content: Ctrl-R x (where x is the register to insert) + +=back + +=head2 EX-MODE + +Ex-mode (activated by C<:> in command mode) supports the following commands: + +=over 4 + +=item Command History: + +CuparrowE> - cycle backwards through history + +CdownarrowE> - cycle forwards through history + +C<:eh> - show ex history + +=item Switching buffers: + +C<:[N]b [N]> - switch to channel number + +C<:b#> - switch to last channel + +C<:b> Epartial-channel-nameE + +C<:b> / + +C<:buffer {args}> (same as C<:b>) + +C<:[N]bn[ext] [N]> - switch to next window + +C<:[N]bp[rev] [N]> - switch to previous window + +=item Close window: + +C<:[N]bd[elete] [N]> + +=item Display windows: + +C<:ls>, C<:buffers> + +=item Display registers: + +<:reg[isters] {args}>, C<:di[splay] {args}> + +=item Display undolist: + +C<:undol[ist]> (mostly used for debugging) + +=item Source files: + +C<:so[urce]> - only sources vim_moderc at the moment, + F<{file}> not supported + +=item Mappings: + +C<:map> - display custom mappings + +=item Save mappings: + +C<:mkv[imrc][!]> - like in Vim, but [file] not supported + +=item Substitute: + +C<:s///> - I and I are supported as flags, only /// can be used as + separator, uses Perl regex instead of Vim regex + +=item Settings: + +C<:se[t]> - display all options + +C<:se[t] {option}> - display all matching options + +C<:se[t] {option} {value}> - change option to value + +=back + +=head3 MAPPINGS + +=head4 Commands + +=over 4 + +=item C<:map {lhs}> - display mappings starting with {lhs} + +=item C<:map {lhs} {rhs}> - add mapping + +=item C<:unm[ap] {lhs}> - remove custom mapping + +=back + +=head4 Parameters + +I<{lhs}> is the key combination to be mapped, I<{rhs}> the target. The +CE> notation is used + +(e.g. CC-FE> is I), case is ignored. + Supported CE> keys are: + +=over 4 + +=item CC-AE> - CC-ZE>, + +=item CC-^E>, CC-6E> + +=item CSpaceE> + +=item CCRE> - Enter + +=item CBSE> - Backspace + +=item CNopE> - No-op (Do Nothing). + +=back + +Mapping ex-mode and irssi commands is supported. When mapping ex-mode commands +the trailing CCrE> is not necessary. Only default mappings can be used +in I<{rhs}>. + +Examples: + +=over 4 + +=item C<:map w W> - to remap w to work like W + +=item C<:map gb :bnext> - to map gb to call :bnext + +=item C<:map gB :bprev> + +=item C<:map g1 :b 1> - to map g1 to switch to buffer 1 + +=item C<:map gb :b> - to map gb to :b, 1gb switches to buffer 1, 5gb to 5 + +=item C<:map EC-LE /clear> - map Ctrl-L to irssi command /clear + +=item C<:map EC-GE /window goto 1> + +=item C<:map EC-EE > - disable , it does nothing now + +=item C<:unmap EC-EE> - restore default behavior of CC-EE> +after disabling it + +=back + +Note that you must use C for irssi commands (like C), the current value +of Irssi's cmdchars does B work! This is necessary do differentiate between +ex-commands and irssi commands. + +=head2 SETTINGS + +The settings are stored as irssi settings and can be set using C as usual +(prepend C to setting name) or using the C<:set> ex-command. The +following settings are available: + +=over 4 + +=item utf8: support UTF-8 characters, boolean, default on + +=item debug: enable debug output, boolean, default off + +=item cmd_seq: char that when double-pressed simulates CEscE>, string, default '' (disabled) + +=item start_cmd: start every line in command mode, boolean, default off + +=item max_undo_lines: size of the undo buffer. Integer, default 50 items. + +=item ex_history_size: number of items stored in the ex-mode history. Integer, default 100. + +=item prompt_leading_space: determines whether ex mode prepends a space to the displayed input. Boolean, default on + +=back + +In contrast to irssi's settings, C<:set> accepts 0 and 1 as values for boolean +settings, but only vim_mode's settings can be set/displayed. + +Examples: + + :set cmd_seq=j # set cmd_seq to j + :set cmd_seq= # disable cmd_seq + :set debug=on # enable debug + :set debug=off # disable debug + +=head1 SUPPORT + +Any behavior different from Vim (unless explicitly documented) should be +considered a bug and reported. + +B This script is still under heavy development, and there may be bugs. +Please submit reproducible sequences to the bug-tracker at: +L + +or contact rudi_s or shabble on irc.freenode.net (#irssi and #irssi_vim) + +=head1 AUTHORS + +Copyright E 2010-2011 Tom Feist Cshabble+irssi@metavore.orgE> and +Copyright E 2010-2011 Simon Ruderich Csimon@ruderich.orgE> + +=head1 THANKS + +Particular thanks go to + +=over 4 + +=item estragib: a lot of testing and many bug reports and feature requests + +=item iaj: testing + +=item tmr: explaining how various bits of vim work + +=back + +as well as the rest of C<#irssi> and C<#irssi_vim> on Freenode IRC. + +=head1 LICENCE + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +=head1 BUGS + +=over 4 + +=item count before register doesn't work: e.g. 3"ap doesn't work, but "a3p does + +=item mapping an incomplete ex-command doesn't open the ex-mode with the partial + command (e.g. C<:map gb :b> causes an error instead of opening the ex-mode and + displaying C<:bEcursorE>) + +=item undo/redo cursor positions are mostly wrong + +=back + +=head1 TODO + +=over 4 + +=item History: + +=over 4 + +=item C< * /,?,n,N> to search through history (like rl_history_search.pl) + +=back + +=item Window switching (C<:b>) + +=over 4 + +=item Tab completion of window(-item) names + +=item non-sequential matches(?) + +=back + +=back + +See also the TODO file at +L for +many many more things. + +=head2 WONTFIX + +Things we're not ever likely to do: + +=over 4 + +=item Macros + +=back + -- cgit v1.2.3 From 23b75ab5c2aba863531eb9df34452ee979653180 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Mon, 18 Apr 2011 15:59:43 +0100 Subject: vim-mode/vim_mode: updated docs (only partially, to see how it looks) --- vim-mode/README.pod | 106 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 70 insertions(+), 36 deletions(-) (limited to 'vim-mode/README.pod') diff --git a/vim-mode/README.pod b/vim-mode/README.pod index fc52701..4783c23 100644 --- a/vim-mode/README.pod +++ b/vim-mode/README.pod @@ -239,11 +239,11 @@ C<:se[t] {option} {value}> - change option to value =over 4 -=item C<:map {lhs}> - display mappings starting with {lhs} +=item * C<:map {lhs}> - display mappings starting with {lhs} -=item C<:map {lhs} {rhs}> - add mapping +=item * C<:map {lhs} {rhs}> - add mapping -=item C<:unm[ap] {lhs}> - remove custom mapping +=item * C<:unm[ap] {lhs}> - remove custom mapping =back @@ -257,17 +257,17 @@ CE> notation is used =over 4 -=item CC-AE> - CC-ZE>, +=item * CC-AE> - CC-ZE>, -=item CC-^E>, CC-6E> +=item * CC-^E>, CC-6E> -=item CSpaceE> +=item * CSpaceE> -=item CCRE> - Enter +=item * CCRE> - Enter -=item CBSE> - Backspace +=item * CBSE> - Backspace -=item CNopE> - No-op (Do Nothing). +=item * CNopE> - No-op (Do Nothing). =back @@ -279,23 +279,23 @@ Examples: =over 4 -=item C<:map w W> - to remap w to work like W +=item * C<:map w W> - to remap w to work like W -=item C<:map gb :bnext> - to map gb to call :bnext +=item * C<:map gb :bnext> - to map gb to call :bnext -=item C<:map gB :bprev> +=item * C<:map gB :bprev> -=item C<:map g1 :b 1> - to map g1 to switch to buffer 1 +=item * C<:map g1 :b 1> - to map g1 to switch to buffer 1 -=item C<:map gb :b> - to map gb to :b, 1gb switches to buffer 1, 5gb to 5 +=item * C<:map gb :b> - to map gb to :b, 1gb switches to buffer 1, 5gb to 5 -=item C<:map EC-LE /clear> - map Ctrl-L to irssi command /clear +=item * C<:map EC-LE /clear> - map Ctrl-L to irssi command /clear -=item C<:map EC-GE /window goto 1> +=item * C<:map EC-GE /window goto 1> -=item C<:map EC-EE > - disable , it does nothing now +=item * C<:map EC-EE > - disable , it does nothing now -=item C<:unmap EC-EE> - restore default behavior of CC-EE> +=item * C<:unmap EC-EE> - restore default behavior of CC-EE> after disabling it =back @@ -312,19 +312,33 @@ following settings are available: =over 4 -=item utf8: support UTF-8 characters, boolean, default on +=item * utf8 -=item debug: enable debug output, boolean, default off +Support UTF-8 characters, boolean, default on -=item cmd_seq: char that when double-pressed simulates CEscE>, string, default '' (disabled) +=item debug -=item start_cmd: start every line in command mode, boolean, default off +Enable debug output, boolean, default off -=item max_undo_lines: size of the undo buffer. Integer, default 50 items. +=item cmd_seq -=item ex_history_size: number of items stored in the ex-mode history. Integer, default 100. +Char that when double-pressed simulates CEscE>, string, default '' (disabled) -=item prompt_leading_space: determines whether ex mode prepends a space to the displayed input. Boolean, default on +=item start_cmd + +Start every line in command mode, boolean, default off + +=item max_undo_lines + +Sze of the undo buffer. Integer, default 50 items. + +=item ex_history_size + +Number of items stored in the ex-mode history. Integer, default 100. + +=item prompt_leading_space + +Ddetermines whether ex mode prepends a space to the displayed input. Boolean, default on =back @@ -394,13 +408,19 @@ THE SOFTWARE. =over 4 -=item count before register doesn't work: e.g. 3"ap doesn't work, but "a3p does +=item * + +count before register doesn't work: e.g. 3"ap doesn't work, but "a3p does + +=item * -=item mapping an incomplete ex-command doesn't open the ex-mode with the partial - command (e.g. C<:map gb :b> causes an error instead of opening the ex-mode and - displaying C<:bEcursorE>) +mapping an incomplete ex-command doesn't open the ex-mode with the partial +command (e.g. C<:map gb :b> causes an error instead of opening the ex-mode and +displaying C<:bEcursorE>) -=item undo/redo cursor positions are mostly wrong +=item * + + undo/redo cursor positions are mostly wrong =back @@ -408,21 +428,31 @@ THE SOFTWARE. =over 4 -=item History: +=item * + +History: =over 4 -=item C< * /,?,n,N> to search through history (like rl_history_search.pl) +=item * + + C< * /,?,n,N> to search through history (like rl_history_search.pl) =back -=item Window switching (C<:b>) +=item * + +Window switching (C<:b>) =over 4 -=item Tab completion of window(-item) names +=item * + +Tab completion of window(-item) names -=item non-sequential matches(?) +=item * + +non-sequential matches(?) =back @@ -438,7 +468,11 @@ Things we're not ever likely to do: =over 4 -=item Macros +=item * Macros =back + + +=cut + -- cgit v1.2.3 From 283ae224e4dee7b2dce7a81d9554570675ab0d3a Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Mon, 18 Apr 2011 16:02:03 +0100 Subject: vim-mode/vim_mode: more docs update. Grar. --- vim-mode/README.pod | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) (limited to 'vim-mode/README.pod') diff --git a/vim-mode/README.pod b/vim-mode/README.pod index 4783c23..af6ddf2 100644 --- a/vim-mode/README.pod +++ b/vim-mode/README.pod @@ -199,7 +199,7 @@ C<:ls>, C<:buffers> =item Display registers: -<:reg[isters] {args}>, C<:di[splay] {args}> +C<:reg[isters] {args}>, C<:di[splay] {args}> =item Display undolist: @@ -312,33 +312,19 @@ following settings are available: =over 4 -=item * utf8 +=item * utf8 - Support UTF-8 characters, boolean, default on -Support UTF-8 characters, boolean, default on +=item * debug - Enable debug output, boolean, default off -=item debug +=item * cmd_seq - Char that when double-pressed simulates CEscE>, string, default '' (disabled) -Enable debug output, boolean, default off +=item * start_cmd - Start every line in command mode, boolean, default off -=item cmd_seq +=item * max_undo_lines - Sze of the undo buffer. Integer, default 50 items. -Char that when double-pressed simulates CEscE>, string, default '' (disabled) +=item * ex_history_size - Number of items stored in the ex-mode history. Integer, default 100. -=item start_cmd - -Start every line in command mode, boolean, default off - -=item max_undo_lines - -Sze of the undo buffer. Integer, default 50 items. - -=item ex_history_size - -Number of items stored in the ex-mode history. Integer, default 100. - -=item prompt_leading_space - -Ddetermines whether ex mode prepends a space to the displayed input. Boolean, default on +=item * prompt_leading_space - Ddetermines whether ex mode prepends a space to the displayed input. Boolean, default on =back -- cgit v1.2.3 From c967d19adca4d812d21cff3bef4f496697a30707 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Mon, 18 Apr 2011 16:08:31 +0100 Subject: vim-mode/vim_mode: all bullet points finally fired. I hope. --- vim-mode/README.pod | 134 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 88 insertions(+), 46 deletions(-) (limited to 'vim-mode/README.pod') diff --git a/vim-mode/README.pod b/vim-mode/README.pod index af6ddf2..c6de881 100644 --- a/vim-mode/README.pod +++ b/vim-mode/README.pod @@ -33,9 +33,9 @@ disabled in irssi < 0.8.13: =over 4 -=item C C (only with count, they work fine without count in older versions) +=item * C C (only with count, they work fine without count in older versions) -=item C, C +=item * C, C =back @@ -75,7 +75,7 @@ Currently Supported ex-commands: =over 4 -=item C<:map> +=item * C<:map> =back @@ -89,47 +89,88 @@ It supports most commonly used command mode features: =over 2 -=item Insert/Command mode. C and C enter command mode. C allows to use C as Escape (any other character can be used as well). +=item * Insert/Command mode. -=item Cursor motion: CSpaceE EBSE f t F T> +C and C enter command mode. C allows +to use C as Escape (any other character can be used as well). -=item History motion: C C moves to the oldest (first) history -line. C without a count moves to the current input line, with a count it goes to the I history line (1 is the oldest). +=item * Cursor motion: -=item Cursor word motion: C +CSpaceE EBSE f t F T> -=item Word objects (only the following work yet): C +=item * History motion: -=item Yank and paste: C +C C moves to the oldest (first) history line. C without a +count moves to the current input line, with a count it goes to the I +history line (1 is the oldest). -=item Change and delete: C +=item * Cursor word motion: -=item Delete at cursor: C +C -=item Replace at cursor: C +=item * Word objects (only the following work yet): -=item Insert mode: C +C -=item Switch case: C<~> +=item * Yank and paste: -=item Repeat change: C<.> + C -=item Repeat C +=item * Change and delete: -=item Registers: C<"a-"z "" "0 "* "+ "_> (black hole) +C -=item Line-wise shortcuts: C
+=item * Delete at cursor: -=item Shortcuts: C +C -=item Scroll the scrollback buffer: C +=item * Replace at cursor: -=item Switch to last active window: C +C -=item Switch split windows: +=item * Insert mode: -=item Undo/Redo: C +C + +=item * Switch case: + +C<~> + +=item * Repeat change: + +C<.> + +=item * Repeat + +C + +=item * Registers: + +C<"a-"z "" "0 "* "+ "_> (black hole) + +=item * Line-wise shortcuts: + +C
+ +=item * Shortcuts: + +C + +=item * Scroll the scrollback buffer: + +C + +=item * Switch to last active window: + +C + +=item * Switch split windows: + + + +=item * Undo/Redo: + +C =back @@ -139,13 +180,13 @@ Counts and combinations work as well, e.g. C or C<3iabcEescE>. Cou =over 4 -=item Appending to register with C<"A-"Z> +=item * Appending to register with C<"A-"Z> -=item C<""> is the default yank/delete register. +=item * C<""> is the default yank/delete register. -=item C<"0> contains the last yank (if no register was specified). +=item * C<"0> contains the last yank (if no register was specified). -=item The special registers C<"* "+> both contain irssi's internal cut-buffer. +=item * The special registers C<"* "+> both contain irssi's internal cut-buffer. =back @@ -155,7 +196,7 @@ The following insert mode mappings are supported: =over 4 -=item Insert register content: Ctrl-R x (where x is the register to insert) +=item * Insert register content: Ctrl-R x (where x is the register to insert) =back @@ -165,7 +206,7 @@ Ex-mode (activated by C<:> in command mode) supports the following commands: =over 4 -=item Command History: +=item * Command History: CuparrowE> - cycle backwards through history @@ -173,7 +214,7 @@ CdownarrowE> - cycle forwards through history C<:eh> - show ex history -=item Switching buffers: +=item * Switching buffers: C<:[N]b [N]> - switch to channel number @@ -189,41 +230,41 @@ C<:[N]bn[ext] [N]> - switch to next window C<:[N]bp[rev] [N]> - switch to previous window -=item Close window: +=item * Close window: C<:[N]bd[elete] [N]> -=item Display windows: +=item * Display windows: C<:ls>, C<:buffers> -=item Display registers: +=item * Display registers: C<:reg[isters] {args}>, C<:di[splay] {args}> -=item Display undolist: +=item * Display undolist: C<:undol[ist]> (mostly used for debugging) -=item Source files: +=item * Source files: C<:so[urce]> - only sources vim_moderc at the moment, F<{file}> not supported -=item Mappings: +=item * Mappings: C<:map> - display custom mappings -=item Save mappings: +=item * Saving mappings: C<:mkv[imrc][!]> - like in Vim, but [file] not supported -=item Substitute: +=item * Substitution: -C<:s///> - I and I are supported as flags, only /// can be used as - separator, uses Perl regex instead of Vim regex +C<:s///> - I and I are supported as flags, only C can be used as +eparator, and it uses Perl regex syntax instead of Vim syntax. -=item Settings: +=item * Settings: C<:se[t]> - display all options @@ -352,6 +393,7 @@ or contact rudi_s or shabble on irc.freenode.net (#irssi and #irssi_vim) =head1 AUTHORS Copyright E 2010-2011 Tom Feist Cshabble+irssi@metavore.orgE> and + Copyright E 2010-2011 Simon Ruderich Csimon@ruderich.orgE> =head1 THANKS @@ -360,11 +402,11 @@ Particular thanks go to =over 4 -=item estragib: a lot of testing and many bug reports and feature requests +=item * estragib: a lot of testing and many bug reports and feature requests -=item iaj: testing +=item * iaj: testing -=item tmr: explaining how various bits of vim work +=item * tmr: explaining how various bits of vim work =back -- cgit v1.2.3 From 5b03835bdda9b7580760c0a98261c64a66e302f6 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 22 Apr 2011 02:52:47 +0100 Subject: vim-mode/vim_mode: more documentation on how to use uberprompt hooks and expandos to get vim_mode sbar items or variables. --- vim-mode/README.pod | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) (limited to 'vim-mode/README.pod') diff --git a/vim-mode/README.pod b/vim-mode/README.pod index c6de881..dbb7d07 100644 --- a/vim-mode/README.pod +++ b/vim-mode/README.pod @@ -49,6 +49,15 @@ to a script of this size and complexity. =head2 SETUP +Vim Mode provides certain feedback to the user, such as the currently active +mode (command, insert, ex), and if switching buffers, which buffer(s) currently +match the search terms. + +There are two ways to go about displaying this information, as described in +the following sections: + +=head3 Statusbar Items + Run the following command to add a statusbar item that shows which mode you're in. @@ -62,6 +71,64 @@ C B Remember to C after adding these statusbar items to make them permanent. +B If you would rather have these statusbar items on your prompt +line rather than thte window statusbar, please follow these steps. + +For I items (that is, after the input field: + +=over 4 + +=item 1 C + +=item 2 C + +=item 3 C + +=item 4 C + +=back + +For I items (before the prompt): + +=over 4 + +=item 1 C + +=item 2 C + +=item 3 C + +=item 4 C + +=back + +If you wish to add both C and C items, replace steps 1 and 2 +with the following: + +=over 4 + +=item 1 C + +=item 2 C + +=back + +and then complete stages 3 and 4 as above. Replace the C<-after> and C<-alignment> +to suit your location preferences. + +=head3 Expando Variables + +Vim mode augments the existing Irssi expando (automatic variables) with two +additional ones: C<$vim_cmd_mode> and C<$vim_wins>. + +C<$vim_cmd_mode> is the equivalent of the C statusbar item, and +C<$vim_wins> is the counterpart of C. + +They can be added to your theme, or inserted into your uberprompt using +the + +"C" command. + =head3 FILE-BASED CONFIGURATION @@ -334,7 +401,7 @@ Examples: =item * C<:map EC-GE /window goto 1> -=item * C<:map EC-EE > - disable , it does nothing now +=item * C<:map EC-EE > - disable EC-EE, it does nothing now =item * C<:unmap EC-EE> - restore default behavior of CC-EE> after disabling it -- cgit v1.2.3 From 931b7cfecbd06c59936670ff1ed42f36c4464fdd Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 22 Apr 2011 03:03:38 +0100 Subject: vim-mode/vim_mode: more doc updates about hooks and sbar items. --- vim-mode/README.pod | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) (limited to 'vim-mode/README.pod') diff --git a/vim-mode/README.pod b/vim-mode/README.pod index dbb7d07..dd3b61a 100644 --- a/vim-mode/README.pod +++ b/vim-mode/README.pod @@ -74,7 +74,14 @@ permanent. B If you would rather have these statusbar items on your prompt line rather than thte window statusbar, please follow these steps. -For I items (that is, after the input field: +For technical reasons, I must occasionally call C, which will remove or deactivate any manually added items on the prompt +statusbar. To get around this, uberprompt provides two command hooks, +C and C. Both of these settings +can contain one (or more, using C commands to be executed when the prompt +is enabled and disabled, respectively. + +For I items (that is, after the input field: =over 4 @@ -88,7 +95,8 @@ For I items (that is, after the input field: =back -For I items (before the prompt): +For I items (before the prompt): + =over 4 @@ -116,6 +124,9 @@ with the following: and then complete stages 3 and 4 as above. Replace the C<-after> and C<-alignment> to suit your location preferences. +B It is also possible to place the items between the prompt and input field, +by specifying C<-after prompt> or C<-before input> as appropriate. + =head3 Expando Variables Vim mode augments the existing Irssi expando (automatic variables) with two @@ -171,11 +182,11 @@ C C moves to the oldest (first) history line. C without a count moves to the current input line, with a count it goes to the I history line (1 is the oldest). -=item * Cursor word motion: +=item * Cursor word motion: C -=item * Word objects (only the following work yet): +=item * Word objects (only the following work yet): C @@ -183,59 +194,59 @@ C C -=item * Change and delete: +=item * Change and delete: C -=item * Delete at cursor: +=item * Delete at cursor: C -=item * Replace at cursor: +=item * Replace at cursor: C -=item * Insert mode: +=item * Insert mode: C -=item * Switch case: +=item * Switch case: C<~> -=item * Repeat change: +=item * Repeat change: C<.> -=item * Repeat +=item * Repeat C -=item * Registers: +=item * Registers: C<"a-"z "" "0 "* "+ "_> (black hole) -=item * Line-wise shortcuts: +=item * Line-wise shortcuts: C
-=item * Shortcuts: +=item * Shortcuts: C -=item * Scroll the scrollback buffer: +=item * Scroll the scrollback buffer: C -=item * Switch to last active window: +=item * Switch to last active window: C -=item * Switch split windows: +=item * Switch split windows: -=item * Undo/Redo: +=item * Undo/Redo: C -- cgit v1.2.3 From ea5c61881c31ce7420ebb377888d56943dd40648 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 22 Apr 2011 03:05:55 +0100 Subject: vim-mode/vim_mode: docs: missed a bracket. --- vim-mode/README.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vim-mode/README.pod') diff --git a/vim-mode/README.pod b/vim-mode/README.pod index dd3b61a..e814e6d 100644 --- a/vim-mode/README.pod +++ b/vim-mode/README.pod @@ -78,7 +78,7 @@ For technical reasons, I must occasionally call C, which will remove or deactivate any manually added items on the prompt statusbar. To get around this, uberprompt provides two command hooks, C and C. Both of these settings -can contain one (or more, using C commands to be executed when the prompt +can contain one (or more, using C) commands to be executed when the prompt is enabled and disabled, respectively. For I items (that is, after the input field: -- cgit v1.2.3 From 9676393d054a2a1c9b047b166204f229f51cd8a4 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 22 Apr 2011 03:12:49 +0100 Subject: vim-mode/vim_mode: FINAL doc update for now. Or Else. --- vim-mode/README.pod | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vim-mode/README.pod') diff --git a/vim-mode/README.pod b/vim-mode/README.pod index e814e6d..83962ff 100644 --- a/vim-mode/README.pod +++ b/vim-mode/README.pod @@ -81,6 +81,8 @@ C and C. Both of these settings can contain one (or more, using C) commands to be executed when the prompt is enabled and disabled, respectively. +See the L for further details. + For I items (that is, after the input field: =over 4 @@ -97,7 +99,6 @@ For I items (that is, after the input field: For I items (before the prompt): - =over 4 =item 1 C @@ -111,7 +112,7 @@ For I items (before the prompt): =back If you wish to add both C and C items, replace steps 1 and 2 -with the following: +above with the following (right-aligned): =over 4 @@ -136,10 +137,9 @@ C<$vim_cmd_mode> is the equivalent of the C statusbar item, and C<$vim_wins> is the counterpart of C. They can be added to your theme, or inserted into your uberprompt using -the - -"C" command. +a command such as: +"C" =head3 FILE-BASED CONFIGURATION -- cgit v1.2.3