vim:是否有一个插件可以在源代码中显示所有 TODO 标签?
和你们大多数人一样,我每天都在几个源代码文件中工作。很多时候,我疯狂的工作流程让我做这样的事情:
# TODO
# clean up this code
# do something else with this code
当前是否有一个可用的 vim 插件可以搜索 TODO 或类似的助记符并打印我当前正在进行的任务以及在哪个源文件中的列表需要做吗?与不断使用 grep 相比,这将节省大量时间。另外,使用 vim ctags,您可以直接跳到您离开 TODO 的代码中。
Like most of you, I work in several source files of code every day. A lot of the time, my insane work flow has me doing stuff like:
# TODO
# clean up this code
# do something else with this code
Is there currently a vim plugin available that will search for TODO or a similar mnemonic and print a list of my current tasks that are on-going and in what source file it needs to be done? It would be a huge time saver instead of using grep constantly. Also with vim ctags, you can jump right in the code where you left the TODO off at.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我还没有尝试过,但是这个插件看起来很有前途。
编辑:我刚刚尝试过这个插件。我会保留它。当您浏览任务列表时,它非常方便并且可以交互式地在缓冲区中移动。
另外,如果您使用 Pathogen 或 git 子模块的其他方法,则 github 上有一个 mirror你的 vim 目录。
I've not tried it (yet), but this plugin looks promising.
Edit: I've just tried this plugin out. I will be keeping it around. It's very handy and interactively moves you around the buffer while you navigate the task list.
Also, there is a mirror on github if you use pathogen or another means of git submodules for your vim directory.
当你说
grep
时,你是在谈论命令行中的 grep 还是 vim 中的:grep
?后者允许您查看匹配的快速修复列表并跳转到它们。如果输入:grep TODO -r .
变得很麻烦,您可以轻松将该操作映射到热键。When you say
grep
, are you talking about grep from the command line, or:grep
in vim? The latter allows you to view a quickfix list of matches and jump to them. If typing out:grep TODO -r .
becomes cumbersome you could easily map that operation to a hotkey.