Skip to content

Vis plugin to easily modify surrounding quotes or brackets

License

Notifications You must be signed in to change notification settings

lutobler/vis-surround

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

vis-surround

vis-surround aims to port Tim Pope's vim-surround to Vis. It is not quite as powerful yet, see the TODO list below.

Installation

Clone the repo to your vis plugins directory (~/.config/vis/plugins) and add this to your visrc.lua:

require("plugins/vis-surround")

Usage

Use the cs ("change surrounding") prefix and two surrounding characters to change surroundings, use ds ("delete surrounding") and a surrounding character to delete a surrounding.

Examples:

Pressing cs"' inside

"Hello world!"

will give you:

'Hello world!'

Pressing cs{] (if you use opening or closing brackets doesn't matter) inside

{Hello world!}

will give you:

[Hello world!]

To delete the [, ] characters press ds[. This is the result:

Hello world!

TODO

  • XML tags
  • XML/HTML tags with attributes (i.e. <p class="foo">)
  • Adding tags with text objects

About

Vis plugin to easily modify surrounding quotes or brackets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages