vim中的tags功能能够帮你快速定位函数和变量
如果你需要使用vim编程或读代码,却又没有接触过类似工具
相信这期视频能为你提高不少效率
补充说明
强调一下jump list 和 tag stack的区别
tag stack可以理解为tags相关跳转的历史记录
而jump list是所有跳转动作(比如翻页,查询)的历史记录
所以tag stack是jump list的一部分
有时候,两次tags跳转中间,可能会有几十条其他类别的跳转记录,这个时候用ctrl-t在tag stack中跳转就会显得很方便
但如果觉得不好理解的话,只学jump list的跳转(ctrl-o和ctrl-i)也完全够用
table of contents
0:00 Introduction
1:22 Step 1: Install ctags
2:03 Step 2: How to use ctags
2:18 file: tags
4:01 flags for ctags
5:42 Step 3: Go to the definition: ctrl-]
6:04 Difference between ctrl-o and ctrl-t
7:30 Q1: Error 'E433: No tags file'
8:58 Q2: Several tags have the same name
9:57 Q3: Update tags
11:30 Q4: Methods other than ctrl-]
12:10 Q5: Autocompletion with tags
12:40 Q6: Open in other windows
References
Introduction: https://ricostacruz.com/til/navigate-...
Use vim with ctags: https://kulkarniamit.github.io/whatwh...
tagsrc Documentation: http://vimdoc.sourceforge.net/htmldoc...
Tricks: https://stackoverflow.com/questions/5...
The semicolon in a path: https://vi.stackexchange.com/question...
writing file updates tags: https://stackoverflow.com/questions/1...
git hook updates tags: https://iampankaj.com/post/exuberant-...
Plugin Indexer: https://www.vim.org/scripts/script.ph...
希望您喜欢这期视频
您的订阅、点赞、评论是小狼更新的动力