Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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