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

Replacing backslash #198

Open
deafwood opened this issue Sep 21, 2017 · 4 comments
Open

Replacing backslash #198

deafwood opened this issue Sep 21, 2017 · 4 comments

Comments

@deafwood
Copy link

deafwood commented Sep 21, 2017

I frequently run the following command in vi: 'a,'bs/^/\\/\\// to insert a comment notation "//" at the beginning of a block of lines but am unable to do this. I get an error that says "Command error: trailing characters".

Please advise if there is a work around, thanks!

@hultberg
Copy link
Collaborator

hultberg commented Oct 1, 2017

@deafwood Exactly how do you type the command in ex-mode command line, like this? %s/'a,'bs/^/\\/\\//

@deafwood
Copy link
Author

deafwood commented Oct 4, 2017

After marking the first ('a) and last ('b) lines, I enter the following command: 'a,'bs/^/\\/\\//

@socketbox
Copy link

socketbox commented Mar 24, 2018

Something similar that produces the same error, but works in vim (v7.4):

:%s/:\/\/bar/:\/\/foo.bar/g

@baccione
Copy link

Dear all,
I also have the same problem.
For example:

:1,2s/^////

puts // at the beginning of lines 1 and 2 in vim.

In atom with Ex-mode, this throws the error:
"Command error. Trailing characters"

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

4 participants