Skip to content

Difference between nvim-surround and vim-surround #55

Answered by kylechui
perseoGI asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there! Here's a list of a few things that stand out to me (hopefully others will add to this list if I forget anything):

  • Inserting function-evaluated surrounds
    • This allows for processing to be done while the surround is being created, e.g. getting user input, calling into Tree-sitter, etc.
    • Some examples of this can be found in the showcase page
  • When changing/deleting, jumping can occur backwards if no surrounding pairs are found around the cursor nor after, so if the cursor is in the comment for the below example, then ds" will delete the quotes anyhow
local str = "some text" -- with a comment
  • Character "aliasing" allows you to let one char stand in for several other characters, …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@perseoGI
Comment options

@ariel-frischer
Comment options

@kylechui
Comment options

Answer selected by perseoGI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants