Vim syntax highlighting for Blade templates (Laravel 4+).
This plugin contributes to vim-polyglot language pack.
Using vim-plug vim-plug.
Plug 'jwalton512/vim-blade'
Using pathogen pathogen.vim.
cd ~/.vim/bundle
git clone git://github.com/jwalton512/vim-blade.git
Because Blade allows you to define your own directives, you can let the plugin know about them through some variables. Examples:
" Define some single Blade directives. This variable is used for highlighting only.
let g:blade_custom_directives = ['datetime', 'javascript']
" Define pairs of Blade directives. This variable is used for highlighting and indentation.
let g:blade_custom_directives_pairs = {
\ 'markdown': 'endmarkdown',
\ 'cache': 'endcache',
\ }
Pull requests are greatly appreciated. Please be certain to include a test where applicable (test.blade.php
). You may test locally by using vim -u vimrc
.