1- ==============================================================================
2- ------------------------------------------------------------------------------
3- *SearchAndReplace.toggle()*
4- `SearchAndReplace.toggle` ()
5- Toggle the plugin by calling the `enable ` /`disable` methods respectively.
6-
7- ------------------------------------------------------------------------------
8- *SearchAndReplace.enable()*
9- `SearchAndReplace.enable ` ({scope} )
10- Initializes the plugin, sets event listeners and o state.
11-
12- ------------------------------------------------------------------------------
13- *SearchAndReplace.disable()*
14- `SearchAndReplace.disable` ()
15- Disables the plugin, clear highlight groups and autocmds, closes side buffers and resets the o state.
16-
17-
181==============================================================================
192------------------------------------------------------------------------------
203 *SearchAndReplace.options*
@@ -28,6 +11,25 @@ Default values:
2811 SearchAndReplace.options = {
2912 -- Prints useful logs about what event are triggered, and reasons actions are executed.
3013 debug = false,
14+ -- Creates mappings for you to easily interact with the exposed commands.
15+ ---@type table
16+ mappings = {
17+ -- When `true` , creates all the mappings that are not set to `false` .
18+ ---@type boolean
19+ enabled = false,
20+ -- Sets a global mapping to Neovim, which will trigger the "by pattern" replace function.
21+ -- When `false` , the mapping is not created.
22+ ---@type string
23+ search_and_replace_by_pattern = "<Leader> srp",
24+ -- Sets a global mapping to Neovim, which will trigger the "by reference" replace function.
25+ -- When `false` , the mapping is not created.
26+ ---@type string
27+ search_and_replace_by_reference = "<Leader> srr",
28+ -- Sets a global mapping to Neovim, which will trigger the "undo" function.
29+ -- When `false` , the mapping is not created.
30+ ---@type string
31+ undo = "<Leader> sru",
32+ },
3133 }
3234
3335<
@@ -43,4 +45,4 @@ Usage ~
4345`require (" search-and-replace" ).setup ()` (add `{}` with your | SearchAndReplace.options | table)
4446
4547
46- vim:tw=78:ts=8:noet:ft=help:norl:
48+ vim:tw=78:ts=8:noet:ft=help:norl:
0 commit comments