Just like "ci(" changes everything between parentheses, I want "ci$" to change everything between dollar signs (for editing LaTeX.) Is this possible?
- 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– Robert S Ciaccio2010-12-18 20:41:18 +00:00Commented Dec 18, 2010 at 20:41
- 1@calavera: ":help c" and then ":help object-select"Neil G– Neil G2010-12-19 01:36:24 +00:00Commented Dec 19, 2010 at 1:36
2 Answers
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.
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.
- That's possible. See the related vim tip for the implementation principles: vim.wikia.com/wiki/Indent_text_objectLuc Hermitte– Luc Hermitte2010-12-20 23:03:04 +00:00Commented Dec 20, 2010 at 23:03
- 1
ct$orcT$otherwise you also delete the dollar signThree Diag– Three Diag2016-05-01 14:06:51 +00:00Commented May 1, 2016 at 14:06