我在高亮顯示的複雜語法元素上並希望獲取它的內容。你可以想辦法做到這一點?Vim:獲取光標下語法元素的內容
也許有一些方法可以搜索正則表達式,以便它包含光標?
EDIT
好的,例如。遊標位於一個字符串中,我想獲取文本,這個語法元素的內容。請看下面一行:
String myString = "Foobar, [CURSOR]cool \"string\""; // And some other "rubbish"
我想寫一個返回
"Foobar, cool \"string\""
要簡單地在一個位置找到語法組,請參閱:http://stackoverflow.com/questions/1467438/find-out-to-which-highlight-group-a-particular-keyword-symbol-belongs-in- vim – 2014-06-04 19:01:44