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

s/a/b/g does not work in visual block mode #762

Closed
xconverge opened this issue Sep 13, 2016 · 9 comments
Closed

s/a/b/g does not work in visual block mode #762

xconverge opened this issue Sep 13, 2016 · 9 comments

Comments

@xconverge
Copy link
Member


Please thumbs-up 👍 this issue if it personally affects you! You can do this by clicking on the emoji-face on the top right of this post. Issues with more thumbs-up will be prioritized.


What did you do?

Enter visual block and select a section
Cant even enter :

I made the change to allow : when in visual block and then tried to replace a term globally for selection: :s/a/b/g and it did not work

What did you expect to happen?

Substitute matching selection within block

What happened instead?

Only substituted on first line once I made the change to even allow : while in visualBlock

@xconverge
Copy link
Member Author

What do you mean "i" command. For visual block it is "I" or "A" not "i" and "a"

@nati
Copy link

nati commented Sep 13, 2016

Thanks.. "I" works fine (deleted previous comment)

@rebornix
Copy link
Member

@xconverge sorry for revisiting this issue so late. I just tried Vim again and :s/a/b/g will only work in the first line in whatever mode. If you want to work the visually selected lines, you should keep :'<,'>s as prefix. The catch is '<,'> are selected when you run : so you might override it.

@xconverge
Copy link
Member Author

I thought I tried that, I will try again..

@xconverge
Copy link
Member Author

@rebornix did you try visual block mode? ":" is not even handled in visual block mode in the extension so I can't even get to the point where it would give the <,> prefix...

@rebornix
Copy link
Member

@xconverge we didn't add visualblock mode to : command's supporting list. Now I added it, give it a try :)

@xconverge
Copy link
Member Author

xconverge commented Sep 20, 2016

Did you try it? I couldn't get it to work even after I made the change you made

I am unable to test this build right now though

@rebornix
Copy link
Member

I pushed two commits to fix this issue and the following one is
e670d29
.
Not sure if you applied both of them.

Sean Kelly [email protected]于2016年9月20日周二 下午4:18写道:

Did you try it? I couldn't get it to work even after I made the change you
made


You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
#762 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA1heMVxfO6FIQxHloLZwGaMwaeVZh20ks5qsGm3gaJpZM4J783u
.

@xconverge
Copy link
Member Author

xconverge commented Sep 21, 2016

Ah perfect! Sorry I only saw the one that referenced this ticket, nice!

tested it, looks good!

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