Skip to content

Commit 4f981b6

Browse files
committed
chore: docs
1 parent 4227bd3 commit 4f981b6

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

doc/search-and-replace.txt

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
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:

doc/tags

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
SearchAndReplace.disable() search-and-replace.txt /*SearchAndReplace.disable()*
2-
SearchAndReplace.enable() search-and-replace.txt /*SearchAndReplace.enable()*
31
SearchAndReplace.options search-and-replace.txt /*SearchAndReplace.options*
42
SearchAndReplace.setup() search-and-replace.txt /*SearchAndReplace.setup()*
5-
SearchAndReplace.toggle() search-and-replace.txt /*SearchAndReplace.toggle()*

0 commit comments

Comments
 (0)