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

Issue with Vim Surround, C-R is broken in normal mode #15

Closed
aymericbeaumet opened this issue Jun 25, 2013 · 13 comments
Closed

Issue with Vim Surround, C-R is broken in normal mode #15

aymericbeaumet opened this issue Jun 25, 2013 · 13 comments

Comments

@aymericbeaumet
Copy link

After installing vim-repeat, when I perform a vim-surround action (like cs'" for example), the C-R bind is broken.

How to reproduce it (consider dots as spaces):

....'abc'

Type: cs'"

...."abc"

Type: C-R

.."abc"

Instead of redo, C-R deletes two spaces on the left.

The problem disappears when I uninstall vim-repeat.

@graywh
Copy link

graywh commented Jun 25, 2013

Your example doesn't make any sense. Ctrl-R "redo[es] changes which were undone." And you didn't undo anything. The fact that it does something makes me think you've got Ctrl-R mapped to something.

@aymericbeaumet
Copy link
Author

I know what C-R does. I just described a strange behaviour I noticed.

@graywh
Copy link

graywh commented Jun 25, 2013

I forgot that repeat.vim can map Ctrl-R. After that cs, it should be :<C-u>call repeat#wrap("\<C-R>",v:count)<CR>.

@aymericbeaumet
Copy link
Author

I found the source of the problem, see my answer on an other issue here.

@justrajdeep
Copy link

Hi aymericbeaumet,

Can you please explain how u fixed the issue? I am also seeing the same

@graywh
Copy link

graywh commented Jun 12, 2014

@justrajdeep it was a problem with his 'cpoptions'

@justrajdeep
Copy link

Hi graywh,
Mine has 'Aq' .What is the solution? what should 'cpoptions' be set to?

@graywh
Copy link

graywh commented Jun 12, 2014

@justrajdeep I think you'll need to add B. Do you have reasons for not using aBceFs?

@justrajdeep
Copy link

Hi grayhw
i copied the vimrc from my senior, not sure why this was set in his. I will remove it.

@graywh
Copy link

graywh commented Jun 12, 2014

@justrajdeep Yeah, gotta watch out for vimrc cargo culting.

@justrajdeep
Copy link

:)

@aymericbeaumet
Copy link
Author

@justrajdeep It seems you got your answer ;)

@justrajdeep
Copy link

Yes. Thanks :)

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

3 participants