To find which syntax group is assigned to the character under the
cursor, plug line(".") and col(".") into the synId() function, then plug
the result into either synIdattr() or synIdtrans().

Thanks, I was using this

map <M-i> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name")
. '> trans<' . synIDattr(synID(line("."),col("."),0),"name") ."> lo<"
. synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>

in order to find color, but for the search it was a problem as synId()
returned the syntax that was under the search highlight (eg: a string
if the search match was over a string)

Anyway, I'm sorry I didn't thought the answer (as Jurgen pointed out)
is "Search" and it was just as logic as it should be. My two neurons
didn't met yet today.

Reply via email to