Tuesday, July 18, 2017

Searching limited to syntax groups

My digging hasn't been able to turn up anything, but I was hoping for
something that would let me easily search just code or comments to
the exclusion of the other. Something like (imaging a sequence like
"\%syntax{SyntaxID}" but actual flavor/implementation is negotiable)

/\%syntax{Comment}customer\c

to only search my comments for "customer\c", excluding all of the
instances of "customer" in my codebase.

Anything obvious I overlooked, or does this require deeper scripting
with search() and then sniffing the resulting SynID value?

Thanks,

-tim



--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: