Turn your raw template into concated string
VimL
Latest commit c5d46aa Mar 4, 2014 Mike Li Merge pull request #2 from af/patch-1
Minor Readme changes
Permalink
Failed to load latest commit information.
plugin
LICENSE
README.md
vim-stringify.gif add screenshots Jan 29, 2014

README.md

screenshots

About

vim-stringify is a small plugin that turns your raw templates into concatenated strings.

Here is your raw template :

<div class="post">
  <h1>By {{fullName author}}</h1>
  <div class="body">{{body}}</div>

  <h1>Comments</h1>

  {{#each comments}}
  <h2>By {{fullName author}}</h2>
  <div class="body">{{body}}</div>
  {{/each}}
</div>

:call Stringify() will turn it into this:

'<div class="post">' +
  '<h1>By {{fullName author}}</h1>' +
  '<div class="body">{{body}}</div>' +

  '<h1>Comments</h1>' +

  '{{#each comments}}' +
  '<h2>By {{fullName author}}</h2>' +
  '<div class="body">{{body}}</div>' +
  '{{/each}}' +
'</div>'

Installation

Install using vundle

Bundle '29decibel/vim-stringify'

Key mapping

map <leader>g :call Stringify()<CR>

Enjoy!