10

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

2
  • 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. Commented Dec 18, 2010 at 20:41
  • 1
    @calavera: ":help c" and then ":help object-select" Commented Dec 19, 2010 at 1:36

2 Answers 2

6

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.

2

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.

2
  • That's possible. See the related vim tip for the implementation principles: vim.wikia.com/wiki/Indent_text_object Commented Dec 20, 2010 at 23:03
  • 1
    ct$ or cT$ otherwise you also delete the dollar sign Commented May 1, 2016 at 14:06

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.