简体   繁体   English

将片段片段添加到片段

[英]Adding folder of snippets to snipmate

snipmate comes with a ton of snippet files. 片段附带了大量的片段文件。 This covers most of the bases. 这涵盖了大多数基础。 However I would like to add some snippet collections created by other users. 但是,我想添加一些其他用户创建的片段集合。 When I download these the snippets are broken down into and placed in folders instead. 当我下载这些片段时,这些片段被分解并放置在文件夹中。 I tried adding one of these folders to the location of the other snippet files (snipmate/snippets/) but it doesn't appear that VIM detected them. 我尝试将这些文件夹之一添加到其他代码段文件(snipmate / snippets /)的位置,但似乎VIM并未检测到它们。

I don't see much documentation on adding additional snippets so I must have overlooked something. 我没有看到太多有关添加其他代码片段的文档,因此我一定忽略了某些内容。

Any suggestions? 有什么建议么?

Given that you are probably looking for rails snippets, I'd suggest you the ones that Mike Farmer wrote. 考虑到您可能正在寻找Rails片段,建议您使用Mike Farmer编写的片段。 You can find them here . 您可以在这里找到它们。

You can install them easily by doing: 您可以通过以下操作轻松安装它们:

git clone https://github.com/scrooloose/snipmate-snippets.git

rake deploy_local

As you can see he wrote a rake task for it and it worked very well for me! 如您所见,他为此编写了一个rake任务,对我来说效果很好!

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

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