tpope / vim-repeat

repeat.vim: enable repeating supported plugin maps with "."
http://www.vim.org/scripts/script.php?script_id=2136
2.59k stars 81 forks source link

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

Closed aymericbeaumet closed 11 years ago

aymericbeaumet commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

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

graywh commented 11 years ago

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 commented 11 years ago

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

justrajdeep commented 10 years ago

Hi aymericbeaumet,

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

graywh commented 10 years ago

@justrajdeep it was a problem with his 'cpoptions'

justrajdeep commented 10 years ago

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

graywh commented 10 years ago

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

justrajdeep commented 10 years ago

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

graywh commented 10 years ago

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

justrajdeep commented 10 years ago

:)

aymericbeaumet commented 10 years ago

@justrajdeep It seems you got your answer ;)

justrajdeep commented 10 years ago

Yes. Thanks :)