samsonw / vim-stringify

Turn your raw template into concated string

Repository from Github https://github.comsamsonw/vim-stringifyRepository from Github https://github.comsamsonw/vim-stringify

screenshots

About

vim-stringify is a small plugin help turning your raw template into concated string.

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 Strigify() 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!

About

Turn your raw template into concated string

License:GNU General Public License v2.0