Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,我index.html or index.php在 VIM 中进行编辑,其中有以下代码:
index.html or index.php
<div id="header"> // some code </div>
当我将光标移动到单词时,header我想跳转到我的 CSS 文件中定义标签(id/class)的位置。ctags 不适用于此。谢谢指教!
header
您可以尝试修补 ctags 以使其支持 CSS。这个人解释了如何,但我不知道它是否有效。我可能会很快尝试这个解决方案,因为我认为这个功能会很重要。
另外,我应该补充一点,我没有从我的魔法书签帽子中提取这篇旧博客文章。这是一个非常简单的谷歌查询的第一个结果之一,你在问这里之前有没有环顾四周?而且,如果你这样做了,你发现/尝试了什么?
另见那里和那里。
编辑
该解决方案不需要修补/编译并且效果很好。