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! |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.137.171.121
|