sponsor Vim development Vim logo Vim Book Ad

bashizzle.vim : deadsimple snippet/templating using bash

 script karma  Rating 9/3, Downloaded by 1849  Comments, bugs, improvements  Vim wiki

created by
Leon van Kammen
 
script type
utility
 
description
This plugin enables bash templates / filtering, aka the macgyver-style of using snippets.
Shellintegration is already possible using '!' and '.!' and such, but I wanted a faster / more templated way of doing things.

SEE VIDEODEMO HERE: http://playterm.org/r/bashizzle-and-vim-1385374364

FEATURES
=========

* full bashification of vim, if you are better at bashscripting compared to vimscript: this is for you
* write a filename '/etc/motd'..and press CTRL-B, it'll just include that file in the current document
* write 'snippet' and it will list the contents of ~/.vim/snippet   (snippet.vim compatible)
* single-word-executables: write 'date' in vim..press CTRL-B, then it turns into 'Mon Nov 25 10:47:40 CET 2013' (it just ran '/usr/bin/date' :)
* UPDATE: filters! you can now postprocess your snippets or current vimdocument with easy bashscripts (extension .filter)
* UPDATE: $CLASSNAME and $FILE are now passed to snippets
* UPDATE: configurationfile ~/.bashizzle for global search/replace on every included snippet

EXAMPLE
========
Enough featureboasting, show me something!
Ok, bashizzle can easily turn something like this: http://pastie.org/8509238
into this: http://pastie.org/8509252
and optionally filter it with this: http://pastie.org/8509293

given that you properly configured your global search/replace keywords in ~/.bashizzle

Make sure you watch the screencat above
 
install details
tested on only textmode..just unzip it in your homefolder:

cd ~
unzip bashizzle.zip
  inflating: .vim/bashizzle          
  inflating: .vim/plugin/bashizzle.vim  
  inflating: .vim/snippets/companyx.filter  
  inflating: .vim/snippets/php/class
thats it
 

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
bashizzle.zip 0.66 2013-11-26 7.0 Leon van Kammen * bugfix: indentation fix
* bugfix: remove filterline after filtering
bashizzle.zip 0.6 2013-11-26 7.0 Leon van Kammen * added configurationfile
* added filters (.filter files)
* added example snippet + filter
bashizzle.zip 0.5 2013-11-25 7.0 Leon van Kammen Initial upload
ip used for rating: 3.236.112.101

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