Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Just like "ci(" changes everything between parentheses, I want "ci$" to change everything between dollar signs (for editing LaTeX.) Is this possible?

share|improve this question
    
I didn't know about this command... do you know where I can read about it in the manual? I couldn't find it for some reason. –  Robert S Ciaccio Dec 18 '10 at 20:41
1  
@calavera: ":help c" and then ":help object-select" –  Neil G Dec 19 '10 at 1:36
    
found it, thanks! –  Robert S Ciaccio Dec 19 '10 at 1:49

2 Answers 2

up vote 5 down vote accepted

The vim LaTeX box plugin adds this feature. If you didn't want to use the rest of the plugin, you could just look at the source and see how it is done.

I think some of the other LaTeX plugins for vim probably have that feature too. There are at least four major ones, the LaTeX box one is the one I'm most familiar with.

share|improve this answer

I don't think so; you'll have to have some way of telling vim whether you want to change between the dollar sign forward or back, and I don't think that it can be programatically determined.

You can, however, do a "cf$" to change everything from where you are on the line until the next dollar sign, or "cF$" if you want to go to the previous dollar sign.

share|improve this answer
    
That's possible. See the related vim tip for the implementation principles: vim.wikia.com/wiki/Indent_text_object –  Luc Hermitte Dec 20 '10 at 23:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.