sponsor Vim development Vim logo Vim Book Ad

cmaxx : Expands user defined templates for any filetype.

 script karma  Rating 5/2, Downloaded by 1081  Comments, bugs, improvements  Vim wiki

created by
Markus Trenkwalder
 
script type
utility
 
description
This script was inspired by Borland Delphis code template function.

Templates can be defined in text files. The filename (wihtout extension) is the template name. By entering the template name in the document and pressing the expasion key (predefined to <F6>) the template is expanded.

Templates can also use macros which will be replaced bei either a user defined or a predefined text during template expansion.
 
install details
The fastest way to install the script is to unpack the tarball to you local script folder, start vim and follow the instructions.

The best way to add this script to vim is to put it in the plugin directory in the user's vim folder (for Unix/Linux: ~/.vim/plugin; for Windows: ~/vimfiles/plugin, for more inforation see |.vimrc|).  Then the script will be sourced automatically at the startup.

The script relies on a folder where the defined templates reside.  The location of this folder is defined in the variable 'g:CMAxx_TemplateDir'.  The script does not define a default path so it does not work if the variable is not set.  A possible location would be ~/.vim/templates.

The script comes with a number of templates in the "templates" folder.  Move this folder to your preferred location and set 'g:CMAxx_TemplateDir' to this path.  The folder "templates" should be part of this path.  A good choice would be local scripts folder.

The script will create some mappings.  These mappings can be turned off by two variables.  If the variable 'g:CMAxx_NoExpansionKey' is defined, the mappings for |F6|, |i_F6| and |n_F6| will not be created.  If 'g:CMAxx_NoMappings' is set, all the leader-mappings will not be set.

Don't forget to run ":helptags" at the location where you have installed cmaxx.


Bug reports and feature requests are welcome!
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
cmaxx-1.1.0.tar.gz 1.1.0 2006-05-15 6.0 Markus Trenkwalder Added the possibility to select the value for a macro from a list (see ":help  macro-list-variables").
cmaxx-1.0.3.tar.gz 1.0.3 2006-04-27 6.0 Markus Trenkwalder Fixed another bug with buffer local variables found by Andreas Karpfen.
cmaxx-1.0.2.tar.gz 1.0.2 2006-04-26 6.0 Markus Trenkwalder - Fixed some bugs regarding buffer local variables (thanx to Igor Prischepoff)
- New feature: mappings can be tured off by two variables.
cmaxx-1.0.1.tar.gz 1.0.1 2006-04-25 6.0 Markus Trenkwalder Works with vim 6.x again.
cmaxx-1.0.0.tar.gz 1.0.0 2006-04-21 7.0 Markus Trenkwalder Initial upload
ip used for rating: 3.137.171.121

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github