A simple way to surround text in neovim.
tuck.mov
Using your preferred package manager import the repo:
Commonly either joshjkns/tuck.nvim or https://github.com/joshjkns/tuck.nvim
Then just require tuck in your configuration file:
require("tuck")Allows you to 'tuck' text, basically surround text with a symbol from the following: { ( [ < " ' `
Example:
int main(void) return 0;Highlighting return 0; in the example above and typing :Tuck { will create:
int main(void) {return 0;}:Tuck also supports swapping, for example:
func main() { fmt.Println("Hello World") }Highlighting { fmt.Println("Hello World") } in the example avove and typing :Tuck -s ( will create:
func main() ( fmt.Println("Hello World") )Opposite of :Tuck, so just removes the surrounding characters.
int main(void) {return 0;}Highlighting {return 0;} in the example above and typing :Untuck will create:
int main(void) return 0;