Skip to content

I get an extra space at the end of a word for single character surrounds #188

Answered by echasnovski
grimm26 asked this question in Q&A
Discussion options

You must be logged in to vote

saw" turns word into "word " I don't know why I am getting that extra space at the end and would like not to :) I am just using a black setup for mini.surround.

Here is a breakdown of saw":

  • sa initiates adding surrounding. Waits for user to input any kind of motion/textobject (on which surrounding will be added).
  • w serves as that motion/textobject. It is a word motion (see :h w) which moves cursor at the start of next word. Which means that surrounding will be added at the region between current cursor position (included) and up until start of next word (excluded). This means including whitespace after current word.
  • " indicates which surrounding you want to add (pair " in this case).

S…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@grimm26
Comment options

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