3

I would like to create a "C++ Class" document template, I know you can make static ones by putting them into ~/Templates, but I would like to be able for the content to change according to the file name on creation, for example, using a template like such (pseudocode):

#ifndef $(filename)_HPP_INCLUDED
#define $(filename)_HPP_INCLUDED

class $(filename) {
   public:
}

#endif $(filename)_HPP_INCLUDED

Is this possible? If so, how can I do it? Thanks in advance, ell.

1

There is possible way to do that. Look at "Nautilus Actions". You can write your bash script which reads class name from stdin creates .h and .cpp files. Add it to nautilus actions. Allow this script to be executed from directories you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.