stakeholders : Pimp up your old templates with dynamic place-holders
| script karma
Downloaded by 523
Comments, bugs, improvements
script versions (upload new version)
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.
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()|.
Also available via git: http://github.com/tomtom/stakeholders_vim/
|In order to install the vba, open the vba file in VIM and type: >
See :help vimball for details.
Click on the package to download.
ip used for rating: 220.127.116.11
- Support for tSkeleton's <+NAME/replacement+> syntax
- Make s:CursorMoved() accessible as stakeholders#CursorMoved() .
- s:Init(): run :g with :silent prefix
- Help template
MD5 checksum: acb1eb60cee1c8d45b4f519fd0f3fa3e
||- 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