141

GitHub - jwalton512/vim-blade: Vim syntax highlighting for Blade templates.

 6 years ago
source link: https://github.com/jwalton512/vim-blade
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

vim-blade

Vim syntax highlighting for Blade templates (Laravel 4+).

This plugin contributes to vim-polyglot language pack.

Installation

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

Configuration

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',
      \ }

Contributing

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.

Want to buy me a coffee?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK