On 22-Jun-2010 04:22, Adrien "Pied" PiƩrard wrote: > Hello. > > I've registered to this ML a month ago or so, but I think that I > haven't written anything yet. > I've been a (mostly) happy vi/vim user for some 15 years now, so, I'd > like to thank all devs and bug reporters for helping make such great > and essential software. > > Now, for the content of the request/remark : > it looks like motions like i" or a' that work with quotations are > hard-coded. As I happen to write a lot of math in latex, I have many $ > signs everywhere that I would like to treat as quotations so that I > can do da$ or yi$. > I guess this could be implemented with vimscript, though this does not > explain why the aforementioned motions are hard-coded. > I believe that, at least for single characters bounds, the i/a motions > should be able to work on arbitrary chars, don't you think so? > The idea would be to have > :set sentence_delimiters='"`$^ > so that one can do di' ya$ or yi^ > > For more intricate patterns like > \[ math formula \] > scripts could (should?) be written. > > Also, I see no reason to limit the above motions to be restricted to > single lines. > > So, do you think that my extension suggestion is acceptable? Or that > current situation is inconsistent and that these hard-coded motions > should be removed and externalised to a script?
I think by mentioning the intricate patterns and limitations in your discussion you've somewhat answered your question yourself: It's good that Vim includes motions and text objects for very common things (i", at, etc.), and that this is hard-coded in the C sources for stability and performance reasons. On the other hand, you've illustrated that even your suggested 'sentence_delimiters' would only go so far to remove some, but not most of the limitations. Thus, anything special can and should be implemented in custom Vimscript. -- regards, ingo -- -- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ -- -- http://vim.sourceforge.net/account/profile.php?user_id=9713 -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
