stakeholders : Pimp up your old templates with dynamic place-holders
script karma |
Rating 12/3,
Downloaded by 2141 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Tom Link |
|
script type |
utility |
|
description |
Experimental.
Older templating plugins for VIM often used simple markup for placeholders (e.g. <+VARIABLE_NAME+>). A placeholder was simply a pattern you could easily search for. Some newer templating plugins support dynamic replacement of placeholders with the same name.
The stakeholders plugin turns your old templating system into a high potential overachiever. It provides dynamic replacement of placeholders with the same name/ID for older templating plugins. By default, it assumes placeholders match /<+\([[:alpha:]_]\+\)+>/ since this pattern is used in several templating systems (e.g., vimscript #1160). You can easily change that pattern by setting |g:stakeholders#def| or b:stakeholders_def.
Usage~
The tskeleton templating plugin provides a parameter (|g:tskeleton#enable_stakeholders|) that enables integration with the stakeholders plugin. For other templating plugins, you have to enable stakeholders by calling either |stakeholders#EnableBuffer()| or |stakeholders#EnableInRange()|.
Demo:
http://vimsomnia.blogspot.com/2010/11/tskeleton-and-stakeholders-vim-plugins.html
Also available via git: http://github.com/tomtom/stakeholders_vim/ |
|
install details |
In order to install the vba, open the vba file in VIM and type: >
:so %
See :help vimball for details. |
|
script versions (upload new version)
Click on the package to download.
stakeholders.vba |
0.03 |
2014-06-28 |
7.0 |
Tom Link |
- .gitignore - Support for tSkeleton's <+NAME/replacement+> syntax - Make s:CursorMoved() accessible as stakeholders#CursorMoved() . - s:Init(): run :g with :silent prefix - addon-info - Help template MD5 checksum: acb1eb60cee1c8d45b4f519fd0f3fa3e |
stakeholders.vba |
0.02 |
2010-11-22 |
7.0 |
Tom Link |
- Alternative, slightly more robust approach - g:stakeholders#undo_breaks: Break undo sequences - Globally enable, disable stakeholders; Replace* functions became methods of the stakeholders prototype - If b:stakeholders_range is defined (e.g. by #EnableInRange()), replace placeholder only in that range. MD5 checksum: 9878bd0328b2abd4a162f9efa45d3599 |
stakeholders.vba |
0.1 |
2010-11-15 |
7.0 |
Tom Link |
Initial upload |
ip used for rating: 142.132.191.50
|