| [Top] | [Contents] | [Index] | [ ? ] |
Under certain circumstances you will find yourself typing similar things over and over again. This is especially true of form letters and programming language constructs. Project-specific header comments, flow-control constructs or magic numbers are essentially the same every time. Emacs has various features for doing tedious and repetitive typing chores for you in addition to the Abbrev features (@xref{(emacs)Abbrevs}).
One solution is using skeletons, flexible rules that say what to insert, and how to do it. Various programming language modes offer some ready-to-use skeletons, and you can adapt them to suit your needs or taste, or define new ones.
Another feature is automatic insertion of what you want into empty files, depending on the file-name or the mode as appropriate. You can have a file or a skeleton inserted, or you can call a function. Then there is the possibility to have Un*x interpreter scripts automatically take on a magic number and be executable as soon as they are saved. Or you can have a copyright notice's year updated, if necessary, every time you save a file. Similarly for time stamps in the file.
URLs can be inserted based on a word at point. Flexible templates can be defined for inserting and navigating between text more generally. A sort of meta-expansion facility can be used to try a set of alternative completions and expansions of text at point.
1. Using Skeletons How to insert a skeleton into your text. 2. Wrapping Skeletons Around Existing Text Putting existing text within a skeleton. 3. Skeletons as Abbrev Expansions An alternative for issuing skeleton commands. 4. Skeleton Language Making skeleton commands insert what you want. 5. Inserting Matching Pairs of Characters Typing one character and getting another after point. 6. Autoinserting Text in Empty Files Filling up empty files as soon as you visit them. 7. Inserting and Updating Copyrights Inserting and updating copyrights. 8. Making Interpreter Scripts Executable Turning interpreter scripts into executables. 9. Maintaining Timestamps in Modified Files Updating dates and times in modified files. 10. QuickURL: Inserting URLs Based on Text at Point Inserting URLs based on text at point. 11. Tempo: Flexible Template Insertion Flexible template insertion. 12. `Hippie' Expansion Expansion of text trying various methods.
Concept Index Command Index Variable Index