Vim 片段插件

发布于 2024-12-06 02:39:05 字数 210 浏览 0 评论 0原文

我知道有一些 vim 插件可以实现类似 TextMate 的片段功能。流行的有:snipMate、snippetsEmu、neocomplcache、UltiSnips 和 xptemplate。
什么是最好的以及为什么?考虑将其与其他插件(例如 SuperTab、AutoComplPop 和 Pathogen)一起使用。您尝试过这些插件吗?你更喜欢什么?

I know there is some vim plugins that implements TextMate-like snippets feature. The popular are: snipMate, snippetsEmu, neocomplcache, UltiSnips and xptemplate.
What is the best and why? Consider using this with others plugins like SuperTab, AutoComplPop and pathogen. Have you ever tried those plugins? What do you prefer?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一江春梦 2024-12-13 02:39:05

与许多事情一样,您会发现个人喜好最终胜出。就我个人而言,我更喜欢snippentsEmu,原因之一是:它支持动态片段。例如,Python 格式字符串 "foo %s %s" 将为每个 %s 动态添加占位符。

snippetsEmu 当然并不完美 - 我遇到了一些错误和烦恼 - 但它与 superTab 配合得很好。老实说,我对提到的其他插件没有太多经验(尽管我相信我已经尝试过所有这些插件),所以我无法真正给出公平的比较。

As with many things, you'll find that personal preference wins out at the end of the day. Personally, I prefer snippentsEmu for one reason: it supports dynamic snippets. For example a Python formatting string "foo %s %s" will (can) dynamically add a placeholder for each %s.

snippetsEmu is certainly not perfect - I have come across a few bugs and annoyances - but it works well with superTab. I honestly don't have much experience with the other plug-ins mentioned (although I believe I've tried them all), so I can't really give a fair comparison.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文