A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/mustache/vim-mustache-handlebars below:

mustache/vim-mustache-handlebars: mustache and handlebars mode for vim

mustache and handlebars mode for vim

A vim plugin for working with mustache and handlebars templates. It has:

This plugin contributes to vim-polyglot language pack.

Note: for compatibility reason #7, we've renamed the repo name from vim-mode to vim-mustache-handlebars.

cd ~/.vim/
git clone git://github.com/mustache/vim-mustache-handlebars.git bundle/mustache
vim bundle/mustache/example.mustache

Get pathogen.

Add Plugin 'mustache/vim-mustache-handlebars' to your .vimrc and do a :PluginInstall.

Built-in Vim Package Manager

Heads up! Only available for Vim 8+

mkdir -p ~/.vim/pack/mustache/start
cd ~/.vim/pack/mustache/start
git clone https://github.com/mustache/vim-mustache-handlebars.git

To learn more about Vim's built-in package manager: :help packages.

cd ~/.local/src
git clone git://github.com/mustache/vim-mustache-handlebars.git mustache.vim
cp -R mustache.vim/syntax/* ~/.vim/syntax/
cp -R mustache.vim/ftdetect/* ~/.vim/ftdetect/
cp -R mustache.vim/ftplugin/* ~/.vim/ftplugin/
vim mustache.vim/example.mustache

You can activate mustache abbreviations by putting this line in your .vimrc: let g:mustache_abbreviations = 1

Now you get a set of convenient abbreviations. Underscore _ indicates where your cursor ends up after typing an abbreviation:

Section movement mappings

Following the vim convention of jumping from section to section, [[ and ]] mappings are implemented for easier movement between mustache tags.

Count with section movements is supported:

Vim has a very powerful concept of "text objects". If you aren't using text objects, you can get familiar with it on this vim help link. Learning text objects really speeds up the vim workflow.

In that spirit, this plugin defines 2 text objects:

Here are other usage examples:

ie and ae text objects are enabled by default. To disable them, put the following in your .vimrc:

let g:mustache_operators = 0

This is combined work from juvenn/mustache.vim and nono/vim-handlebars.

Thanks @5long for adding matchit support.

You're encouraged to propose ideas or have discussions via github issues.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4