Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add surrounding on visual selection? #220

Open
woshichuanqilz opened this issue Dec 29, 2016 · 12 comments
Open

How to add surrounding on visual selection? #220

woshichuanqilz opened this issue Dec 29, 2016 · 12 comments

Comments

@woshichuanqilz
Copy link

In visual mode I select Hello World and press ys", but nothing happened .
And I can't see related introduce to visual mode(except the linewise mode). Tnx ~

@peitalin
Copy link

peitalin commented Jan 9, 2017

You can make a selection, press 'S', then press '('.
See: https://github.com/tpope/vim-surround/blob/master/doc/surround.txt

@kubaugustyn
Copy link

kubaugustyn commented Jan 13, 2017

I'm pretty sure that 'S' is used for delete line + substitute text in vim. For me, vim-surround doesn't override it sorry for the confusion, it was actually other plugin fault

@sukovanej
Copy link

@zerozero7 What was the other plugin? I'm having the same problem. Thanks :)

@kubaugustyn
Copy link

@sukovanej Sorry, I can't remember. You can check binding by :vmap S command

@gierdo
Copy link

gierdo commented Sep 25, 2017

I have the same issue, and "S" is mapped to "x" by the plugin VSurround.

Weird..

@Huxpro
Copy link

Huxpro commented Feb 11, 2019

Anyone knows how can I remap back to use s in visual mode rather than S? I found spacemacs also use that convention. Out of curiosity, what're the problems ppl mentioned about using s in visual mode? I found I seldom used s and dominantly usesc.

@Huxpro
Copy link

Huxpro commented Feb 15, 2019

Anyone knows how can I remap back to use s in visual mode rather than S? I found spacemacs also use that convention. Out of curiosity, what're the problems ppl mentioned about using s in visual mode? I found I seldom used s and dominantly usesc.

Thanks #269.

@Migacz85
Copy link

This method is indeed working but unfortunately It cannot be repeated by .

@datshiropav
Copy link

for those who install vim-yankstack, please remove it

@dessalines
Copy link

This really needs to be on the README / tutorial. visual mode is the main way most vimmers select text.

@lroolle
Copy link

lroolle commented May 3, 2020

for those who install vim-yankstack, please remove it

Works

@Archie-2021
Copy link

Is there a way to add surroundings with more than one character? like adding [[ or more complicated stuff. it can be done with another command , and existing command could be used for one word surroundings like ", ', (, {, [

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests