WolfgangMehner/vim-plugins

c-support: Modified class template ignores filename

AndreasAZiegler opened this issue · 2 comments

I adjusted the c++ class template to the following

== C++.class == map:+c, shortcut:c ==
class |CLASSNAME| {
 public:
  |CLASSNAME| ();

 protected:

 private:

}; /* -----  end of class |CLASSNAME|  ----- */

When I now press \+c the template is inserted without asking for the CLASSNAME and the CLASSNAME results in an empty string.

Add a ? to the first macro:

== C++.class == map:+c, shortcut:c ==
class |?CLASSNAME| {
 public:
  |CLASSNAME| ();

 protected:

 private:

}; /* -----  end of class |CLASSNAME|  ----- */

Compare the template help on macros.

Thanks, that indeed worked.