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

turn \ into a prepended escape character like <space> #165

Closed
wants to merge 1 commit into from
Closed

turn \ into a prepended escape character like <space> #165

wants to merge 1 commit into from

Conversation

Konfekt
Copy link

@Konfekt Konfekt commented Mar 16, 2015

See #164 (comment)

turn \ into an additional escape character which precedes the surrround character that follows .

For example ysiw\B with the cursor at word gives {word}. That is, \ is analogous to .

This is useful in LaTeX where some surround characters such as {} must be escaped to be displayed.

@Konfekt
Copy link
Author

Konfekt commented Mar 16, 2015

Not thoroughly battle-tested to say the least.

@tpope
Copy link
Owner

tpope commented Mar 16, 2015

This can't be right. strpart(..., 0) is a no-op, and you're calling after stripping the desired character out of newchar.

@Konfekt
Copy link
Author

Konfekt commented Mar 18, 2015

Ok, I adjusted it but am at loss if this covers

the second portion on the input side [that needs fixing] too?

@Konfekt
Copy link
Author

Konfekt commented Mar 19, 2015

To my delight, even though the codebase is inscrutable to me, \ works like magic.

@Konfekt
Copy link
Author

Konfekt commented Apr 8, 2015

@tpope anything to remedy for this pull request being merged?

@Konfekt
Copy link
Author

Konfekt commented Feb 19, 2016

@tpope Sorry for the bugging, but is there anything that has yet to be fixed?

@tpope
Copy link
Owner

tpope commented Feb 19, 2016

You can start by following the contribution guidelines mentioned in the README.

@Konfekt
Copy link
Author

Konfekt commented Feb 19, 2016

I did and the Comitt Message Shows. So please speak out.

@tpope
Copy link
Owner

tpope commented Feb 20, 2016

The subject line isn't capitalized and the body isn't wrapped to 72 characters.

Turn \ into an additional escape character which precedes the surrround
character that follows \.

For example ysiw\B with the cursor at word gives \{word\}. That is, \ is
analogous to <space>.

This is useful in LaTeX where some surround characters such as {} must
be escaped to be displayed, and \( \) and \[ \] are used to display
math.
@Konfekt
Copy link
Author

Konfekt commented Feb 20, 2016

Thanks for clearing that up. It's all done now.

@shanesmith
Copy link
Contributor

shanesmith commented Feb 12, 2017

Unfortunately this patch doesn't apply the backslash properly on the left side, I end up with "\foo\".

I've created a pull request #225 to fix this, plus added support for deleting and changing backslash escaped characters

@Konfekt
Copy link
Author

Konfekt commented Feb 15, 2017

Great, thanks!

@Konfekt Konfekt closed this Feb 15, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants