Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does a programmer's "document template" with tags exist for Windows?

I was wondering (if possible) if there was a program/tool/utility that when I create a new file and provide it with an extension that it creates the appropriate tags automatically?

For example, a new file I create called index.php would have the appropriate tags auto-generated inside:

<?php    
?>

I hope you get the idea.

Any information regarding this would be helpful.

like image 761
Anthony Forloney Avatar asked Mar 19 '10 03:03

Anthony Forloney


People also ask

What happens when you attach a template to a document?

When you attach a new template to a Word document, nothing happens. The new template makes four things available to the document: macros, AutoTexts/Building Blocks, toolbars and keyboard shortcuts. Every Word document is based on a template, whether you choose a template explicitly or not.

What is a SDD system design document?

The System Design Document (SDD) describes how the functional and nonfunctional requirements recorded in the Requirements Document, the preliminary user-oriented functional design recorded in the High Level Technical Design Concept/Alternatives document, and the preliminary data design documented in the Logical Data ...


2 Answers

I don't know about a portable utility, but on Windows, there's a built-in feature that does it.

From regedit, go to your HKCR/.your-extension (e.g. HKCR/.php). the (Default) value will contain the filetype class - go to either HKCR/.your-extension/the-filetype-class or HKCR/the-filetype-class (either will do), then inside create a key named ShellNew. In the key, create a string value called FileName and assign to it the file path of your template file.

Now all new files with this particular extension will be created containing the contents of your template.

Here's a more detailed tutorial.

like image 130
Max Shawabkeh Avatar answered Sep 28 '22 06:09

Max Shawabkeh


If you run Linux with GNOME, maybe http://tombuntu.com/index.php/2008/02/13/add-your-document-templates-to-gnome/ is what you need.

There is probably something similar in other environments.

like image 27
Emil Avatar answered Sep 28 '22 06:09

Emil