我有一个正则表达式,^ \{3,}/,想要在3的位置上使用设置或变量的值。以下是上下文: match LeadingSpaces /^ \{3,}/ highlight LeadingSpaces ctermbg=red guibg=red 我希望能用tabstop的值替代3。另外,我可以设置一个新变量来使用。
'/^ \{'.&tabstop.',}/'
? - xn.'/^ \{'.&tabstop.',}/'
保存到一个变量中,然后执行类似于execute 'match LeadingSpaces '.regex
这样的操作。 - Andrew Clark