简体   繁体   中英

pressing tab in snipmate plugin in vim triples the input

Snipmate triples my input. 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

# 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

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

snipmate syntax is pretty simple. i'm confused on what i'm doing wrong.

I installed snipmate through VAM

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. Don't get me wrong snipMate is great, or better say - was great, but now it's just so far behind the UltiSnips plugin.

Be sure to see screencasts posted in the README of this project - to see the proof of what I said above.

Good luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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