Golevka / emacs-clang-complete-async

An emacs plugin to complete C and C++ code using libclang
360 stars 71 forks source link

[Feature Request] Create Variable on heap using `clang` constructor completion #42

Open elemakil opened 11 years ago

elemakil commented 11 years ago

Hi,

Maybe this is more a request for a yasnippet snippet, however, I don't know where else to ask.

When creating a Heap variable using clang you need to do a lot of manual work. You write the variable's type (Without completion because otherwise it becomes the constructor), then its name, then the string = new, again the type and finally can use clang to auto-complete the constructor. I think it would be useful to have a yasnippet (conveniently using the "N" key) which asks for a type (maybe with namespace), a name and which constructor to use and expands this to

$VarType$ * $VarName$ = new $Namespace$::$VarType$( $ConstructorArgs$ );