summaryrefslogtreecommitdiff
path: root/doc/en/weechat_user.en.adoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-11-07 07:22:01 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-11-11 08:54:06 +0100
commitb83b428c5cc48043cb625844b87e94acbc194ba1 (patch)
tree4d8bb1ec0d2fa9e5f40425f4ed99d81a2d37be7c /doc/en/weechat_user.en.adoc
parentb2ce312e82614774e9861d50b9b62927ab767a2b (diff)
downloadweechat-b83b428c5cc48043cb625844b87e94acbc194ba1.zip
core: add incremental search in commands history (issue #2040)
Changes: - move key ctrl+r to ctrl+s - add key ctrl+r to search in commands history - add option `search_history` in command `/input` - add key context "histsearch" - add option weechat.look.buffer_search_history - add buffer variables "text_search_direction", "text_search_history" and "text_search_ptr_history"
Diffstat (limited to 'doc/en/weechat_user.en.adoc')
-rw-r--r--doc/en/weechat_user.en.adoc58
1 files changed, 51 insertions, 7 deletions
diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc
index 41dc69b73..a6f4a506c 100644
--- a/doc/en/weechat_user.en.adoc
+++ b/doc/en/weechat_user.en.adoc
@@ -914,11 +914,30 @@ Bar _input_ has following default items:
| Item | Example | Description
| input_prompt | `[@Flashy(i)]` | Input prompt, for irc: nick and modes (mode "+i" means invisible on libera).
| away | `(away)` | Away indicator.
-| input_search | `[Search (~ str,msg)]` | Search indicator ("`~`": case insensitive, "`==`": case sensitive, "`str`": search string, "`regex`": search regular expression, "`msg`": search in messages, "`pre`": search in prefixes, "`pre\|msg`": search in prefixes and messages).
+| input_search | `[Search lines (~ str,msg)]` | Search indicator (see below)
| input_paste | `[Paste 7 lines ? [ctrl-y] Yes [ctrl-n] No]` | Question to user for pasting lines.
| input_text | `hi peter!` | Input text.
|===
+There are two search modes:
+
+* search in lines, for example `[Search lines (~ str,msg)]`, with the following info:
+** `~`: case insensitive
+** `==`: case sensitive
+** `str`: search string
+** `regex`: search regular expression
+** `msg`: search in messages
+** `pre`: search in prefixes
+** `pre\|msg`: search in prefixes and messages.
+* search in commands history, for example `[Search command (~ str,local)]`,
+ with the following info:
+** `~`: case insensitive
+** `==`: case sensitive
+** `str`: search string
+** `regex`: search regular expression
+** `local`: search in buffer local history
+** `global`: search in global history.
+
Bar _nicklist_ has following default items:
[width="100%",cols="^3,^3,9",options="header"]
@@ -1613,7 +1632,8 @@ They can be changed and new ones can be added with the <<command_weechat_key,/ke
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|===
| Key | Description | Command
-| kbd:[Ctrl+r] | Search for text in buffer history (see <<key_bindings_search_context,keys for search context>>). | `+/input search_text_here+`
+| kbd:[Ctrl+r] | Search for text in commands history (see <<key_bindings_histsearch_context,keys for context "histsearch">>). | `+/input search_history+`
+| kbd:[Ctrl+s] | Search for text in buffer lines (see <<key_bindings_search_context,keys for context "search">>). | `+/input search_text_here+`
| kbd:[Ctrl+s], kbd:[Ctrl+u] | Set unread marker on all buffers. | `+/allbuf /buffer set unread+`
| kbd:[Ctrl+x] | Switch current buffer if buffers are merged with same number, for example switch to another IRC server buffer. | `+/buffer switch+`
| kbd:[Alt+x] | Zoom on merged buffer (kbd:[Alt+x] again: display all merged buffers). | `+/buffer zoom+`
@@ -1716,23 +1736,47 @@ They can be changed and new ones can be added with the <<command_weechat_key,/ke
[[key_bindings_search_context]]
=== Search context
-These keys are used in context "search" (when kbd:[Ctrl+r] is pressed to search
-text in buffer).
+These keys are used in context "search" (when kbd:[Ctrl+s] is pressed to search
+text in buffer lines).
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|===
| Key | Description | Command
-| kbd:[Ctrl+r] | Switch search type: string (default), regular expression. | `+/input search_switch_regex+`
+| kbd:[Ctrl+x] | Switch search type: string (default), regular expression. | `+/input search_switch_regex+`
| kbd:[Alt+c] | Switch exact case for search. | `+/input search_switch_case+`
| kbd:[Tab] | Switch search in: messages (default), prefixes, prefixes + messages. | `+/input search_switch_where+`
-| kbd:[↑] | Search previous line. | `+/input search_previous+`
-| kbd:[↓] | Search next line. | `+/input search_next+`
+| kbd:[Ctrl+r] +
+ kbd:[↑] | Search previous line. | `+/input search_previous+`
+| kbd:[Ctrl+s] +
+ kbd:[↓] | Search next line. | `+/input search_next+`
| kbd:[Enter] +
kbd:[Ctrl+j] +
kbd:[Ctrl+m] | Stop search at current position. | `+/input search_stop_here+`
| kbd:[Ctrl+q] | Stop search and reset scroll to pre-text search state. | `+/input search_stop+`
|===
+[[key_bindings_histsearch_context]]
+=== History search context
+
+These keys are used in context "histsearch" (when kbd:[Ctrl+r] is pressed to
+search text in commands history).
+
+[width="100%",cols="^.^3,.^8,.^5",options="header"]
+|===
+| Key | Description | Command
+| kbd:[Ctrl+x] | Switch search type: string (default), regular expression. | `+/input search_switch_regex+`
+| kbd:[Alt+c] | Switch exact case for search. | `+/input search_switch_case+`
+| kbd:[Tab] | Switch search in: buffer local history (default), global history. | `+/input search_switch_where+`
+| kbd:[Ctrl+r] +
+ kbd:[↑] | Search in previous (older) history entries. | `+/input search_previous+`
+| kbd:[Ctrl+s] +
+ kbd:[↓] | Search in next (newer) history entries. | `+/input search_next+`
+| kbd:[Enter] +
+ kbd:[Ctrl+j] +
+ kbd:[Ctrl+m] | Stop search and use matching input. | `+/input search_stop_here+`
+| kbd:[Ctrl+q] | Stop search and restore input to its initial value. | `+/input search_stop+`
+|===
+
[[key_bindings_cursor_context]]
=== Cursor context