Vim:SnipMate 插件:如何更改 .snippet 并即时更新?
有谁知道如何编辑点片段文件并重新加载到 (g)vim 中,而无需关闭并重新打开程序?如果能用这个优秀的插件来做到这一点那就太好了。
问候
does anyone know how to edit a dot snippet file and reload into (g)vim without closing and re-open the program? it would be great to do that with this excellent plugin.
greetings
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您有最新版本的 snipmate,您可以使用 vim 中的以下命令重新加载所有片段
:call ReloadAllSnippets()
或更好,您可以将其映射到一个键If you have the latest version of snipmate you can use the following command from vim to reload all the snippets
:call ReloadAllSnippets()
or better you can map it to a key我目前正在 StackOverflow 上进行 UltiSnips 的推广之旅。 UltiSnips 将监视您的代码片段文件的更改,因此您所要做的就是保存您的 .snippets 文件,所做的更改将立即在 Vim 中可用。还有一个方便的 :UltiSnipsEdit 命令,可以立即打开正确的片段文件。
UltiSnips 附带了用于 snipMate 片段的转换脚本,因此切换很容易。
I am currently on a promoting tour for UltiSnips on StackOverflow. UltiSnips will watch your snippet files for change, so all you have to do is save your .snippets file and the changes are immediately available in Vim. There is also a handy :UltiSnipsEdit command that will open the correct snippets file right away.
A conversion script for snipMate snippets is shipped with UltiSnips, so switching is easy.
查看以下讨论
Have a look at the following discussion