From: Simon Ruderich Date: Sun, 24 Jan 2016 19:40:25 +0000 (+0100) Subject: document modes X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=ca3226462a913d57321b09ba7a13a955f39fc1c4;p=fcscs%2Ffcscs.git document modes --- diff --git a/bin/fcscs b/bin/fcscs index 95a769a..e0a34f9 100755 --- a/bin/fcscs +++ b/bin/fcscs @@ -97,6 +97,9 @@ and please report the bug: fcscs /path/to/screen-or-tmux-fcscs-file + +=head1 MODES + =cut @@ -661,6 +664,22 @@ sub mapping_yank { } +=head2 NORMAL MODES + +Normal modes select matches by calling a function which returns them, e.g. by +using a regex. + +The following normal modes are available: + +=over 4 + +=item B select relative/absolute paths + +=item B select URLs + +=back + +=cut sub mapping_mode_path { my ($key, $screen, $config, $input) = @_; @@ -686,6 +705,40 @@ sub mapping_mode_url { }; } +=head2 SEARCH MODE (AND EXTEND MODE) + +Search mode is a special mode which lets you type a search string (a Perl +regex) and then select one of the matches. Afterwards you can extend the +match. For example select the complete word or to the end of the line. This +allows quick selection of arbitrary text. + +The following mappings are available during the extension mode (not +configurable at the moment): + +=over 4 + +=item B select current word + +=item B extend word to the left + +=item B extend word to the right + +=item B select current WORD + +=item B extend WORD to the left + +=item B extend WORD to the right + +=item B<^> extend to beginning of line + +=item B<$> extend to end of line + +=back + +C includes any characters matching C<\w+>, C any non-whitespace +characters (C<\S+>), just like in Vim. + +=cut sub mapping_mode_search { my ($key, $screen, $config, $input) = @_;