-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(motion): add nvim-surround (#110)
* Add nvim-surround * Update lua/astrocommunity/motion/nvim-surround/nvim-surround.lua --------- Co-authored-by: Micah Halter <[email protected]>
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# nvim-surround | ||
|
||
**Repository:** https://github.com/kylechui/nvim-surround | ||
|
||
Surround selections, stylishly. | ||
|
||
## Usage | ||
|
||
The three "core" operations of `add`/`delete`/`change` can be done with the | ||
keymaps `ys{motion}{char}`, `ds{char}`, and `cs{target}{replacement}`, | ||
respectively. For the following examples, `*` will denote the cursor position: | ||
|
||
```help | ||
Old text Command New text | ||
-------------------------------------------------------------------------------- | ||
surr*ound_words ysiw) (surround_words) | ||
*make strings ys$" "make strings" | ||
[delete ar*ound me!] ds] delete around me! | ||
remove <b>HTML t*ags</b> dst remove HTML tags | ||
'change quot*es' cs'" "change quotes" | ||
<b>or tag* types</b> csth1<CR> <h1>or tag types</h1> | ||
delete(functi*on calls) dsf function calls | ||
``` | ||
|
||
Detailed information on how to use this plugin can be found in | ||
[`:h nvim-surround.usage`](https://github.com/kylechui/nvim-surround/blob/main/doc/nvim-surround.txt). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
return { | ||
{ | ||
"kylechui/nvim-surround", | ||
version = "*", -- Use for stability; omit to use `main` branch for the latest features | ||
event = "VeryLazy", | ||
opts = {} | ||
}, | ||
} |