简体   繁体   English

按下vim中的snipmate插件中的选项卡三倍输入

[英]pressing tab in snipmate plugin in vim triples the input

Snipmate triples my input. Snipmate使我的输入增加了三倍。 I do the following: 我做以下事情:

template[press tap here]

I get an expansion: 我得到扩展:

template <class T = >
class  {
public:
  () {}
  ~() {}
private:
};

which simply follows the definition in ~/.vim/vim-addons/snipmate-snippets/snippets/cpp.snippets 它只是遵循~/.vim/vim-addons/snipmate-snippets/snippets/cpp.snippets

# template
snippet template
    template <class ${1:T} = ${2}>
    class ${3:`Filename('$3', 'name')`} {
    public:
        $3() {}
        ~$3() {}
    private:
    };

I have no problem with inputting {$1} and {$2} tab stops but when I enter "lala " for {$3} , i get 我输入{$1}{$2}制表符没有问题,但是当我为{$3}输入“lala”时,我得到了

template <class T = int>
class lala lala  alal {
public:
  lala  alal() {}
  ~lala  alal() {}
private:
};

snipmate syntax is pretty simple. snipmate语法非常简单。 i'm confused on what i'm doing wrong. 我对自己做错了很困惑。

I installed snipmate through VAM 我通过VAM安装了snipmate

call vam#ActivateAddons(['snipmate-snippets'], {'auto_install' : 0})

What I write, might be a bit biased, but I don't see any reason for using snipMate, when there is UltiSnips by SirVer. 我写的,可能有点偏颇,但是当SirVerUltiSnips时,我没有看到使用snipMate的任何理由。 Don't get me wrong snipMate is great, or better say - was great, but now it's just so far behind the UltiSnips plugin. 不要误会我的意思snipMate很棒,或者更好说 - 很棒,但现在它远远落后于UltiSnips插件。

Be sure to see screencasts posted in the README of this project - to see the proof of what I said above. 请务必在本项目的README中看到截屏视频 - 以查看我上面所说的内容。

Good luck. 祝好运。

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

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