Skip to content

Commit

Permalink
feat(motion): add nvim-surround (#110)
Browse files Browse the repository at this point in the history
* Add nvim-surround

* Update lua/astrocommunity/motion/nvim-surround/nvim-surround.lua

---------

Co-authored-by: Micah Halter <[email protected]>
  • Loading branch information
Cretezy and mehalter authored Mar 30, 2023
1 parent 2005cf2 commit cfcf2a9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
26 changes: 26 additions & 0 deletions lua/astrocommunity/motion/nvim-surround/README.md
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).
8 changes: 8 additions & 0 deletions lua/astrocommunity/motion/nvim-surround/nvim-surround.lua
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 = {}
},
}

0 comments on commit cfcf2a9

Please sign in to comment.