nvim-surround

Add/change/delete surrounding delimiter pairs with ease. Written with in Lua.

MIT License

Stars
3.1K
Committers
33

Bot releases are hidden (Show)

nvim-surround - v1.0.0

Published by kylechui about 2 years ago

This marks the first official release of nvim-surround! 🎉

Features

  • Add/delete/change surrounding delimiter pairs
    • Function calls and HTML tags have built-in support
  • Use functions to define what pairs to add to the buffer
  • Use functions to define what selections to modify
    • Vim text-objects and Lua patterns have first-class support
  • Dot-repeat previous surround actions
  • Jump to the "nearest" surrounding pair for modification
  • Alias characters to represent other keys
  • Highlight selections to be surrounded or modified

Future Goals

As of right now, nvim-surround uses built-in Vim text-objects or Lua patterns to find the "parent selection" that contains a surrounding pair. I intend on expanding this ideology to Tree-sitter nodes as well, so things can be run properly, even if nvim-treesitter-textobjects is not installed.

Thanks

Massive thanks goes out to everybody that's helped me out with feedback and ideas on how to design this plugin, especially those that have submitted PRs. Also thanks to everybody that's filed a feature request or bug report.

Thanks for using nvim-surround, I hope it's as much of a joy to use as it is for me to write 💖