generic comment text-objects?

Gabriel Lazar gabi_laser at
Thu May 12 16:58:50 CEST 2016

I am a somewhat experienced Vim user that jumped the Emacs Evil bandwagon - still learning the ropes (emacs, elisp, evil).First, I'd like to offer my thanks to the authors for this beautiful emacs plugin that is called evil - it is a great plugin!
Now, to the question: is there any implementation for *generic* comment text-objects ("ic", "ac") ? I mean, something that can deal with comments such as multi-line blocks in C, that can also have " *"  at the beginning of intermediate lines, and can even select the block of text "inside" such comment blocks (without end, skip or intermediate delimiters).
 - I searched this mailing list and the only mention to something like this was in 2011, but those functions are no more available in Evil, and there was also a reply indicating that it didn't work too good anyway.
- One method, based on syntax, is available using 'smartparens' with the 'evil-cleverparens' plugin, but - with C multiblocks, it fails to stop before the comment-end separator.
- I also tried to define such a text-object, looking through Evil's source code, by using the defined "evil-comment" *thing* with "evil-select-inner-object" (or similar, I'm don't have an Emacs at hand), but in my tests, the inner version selected the comments including separators, while the 'an-object' version had errors such as "don't know how to compute bounds" or something like that.
I did "some" digging and found out that one can use syntax, font-locking *and* (or) `newcomment.el` (comment-start, comment-end etc. ...) as methods of searching for comment bounds. 
So, to put the question more clearly: is there anybody working on this (or a more general framework, for more "things", not only comments), but something that deals with the above methods (syntax, newcomment.el, font-locking) in the most generic (i.e., in my book, the most reliable) way?

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the implementations-list mailing list