简体   繁体   English

Vim:SnipMate插件:如何更改.snippet并动态更新?

[英]Vim: SnipMate Plugin: how i can change a .snippet and update it on the fly?

does anyone know how to edit a dot snippet file and reload into (g)vim without closing and re-open the program? 有没有人知道如何编辑点片段文件并重新加载到(g)vim而不关闭并重新打开程序? it would be great to do that with this excellent plugin. 用这个优秀的插件做这件事会很棒。

greetings 问候

如果您有最新版本的snipmate,您可以使用vim中的以下命令重新加载所有片段:call ReloadAllSnippets()或更好,您可以将其映射到一个键

I am currently on a promoting tour for UltiSnips on StackOverflow. 我目前正在StackOverflow上推广UltiSnips 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. UltiSnips会监视您的代码段文件以进行更改,因此您只需保存.snippets文件,即可在Vim中立即进行更改。 There is also a handy :UltiSnipsEdit command that will open the correct snippets file right away. 还有一个方便的:UltiSnipsEdit命令可以立即打开正确的片段文件。

A conversion script for snipMate snippets is shipped with UltiSnips, so switching is easy. UltiSnips附带了snipMate片段的转换脚本,因此切换非常简单。

看看下面的讨论

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM