diff --git a/lua/astrocommunity/motion/nvim-surround/README.md b/lua/astrocommunity/motion/nvim-surround/README.md new file mode 100644 index 000000000..d90523987 --- /dev/null +++ b/lua/astrocommunity/motion/nvim-surround/README.md @@ -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 HTML t*ags dst remove HTML tags + 'change quot*es' cs'" "change quotes" + or tag* types csth1

or tag types

+ 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). diff --git a/lua/astrocommunity/motion/nvim-surround/nvim-surround.lua b/lua/astrocommunity/motion/nvim-surround/nvim-surround.lua new file mode 100644 index 000000000..077bbc4ee --- /dev/null +++ b/lua/astrocommunity/motion/nvim-surround/nvim-surround.lua @@ -0,0 +1,8 @@ +return { + { + "kylechui/nvim-surround", + version = "*", -- Use for stability; omit to use `main` branch for the latest features + event = "VeryLazy", + opts = {} + }, +}