GitHub - leafOfTree/vim-svelte-plugin: Vim syntax and indent plugin for .svelte files (original) (raw)
vim-svelte-plugin
Vim syntax and indent plugin for .svelte
files. Forked from vim-vue-plugin.
Installation
How to install
Plugin 'leafOfTree/vim-svelte-plugin'
cd ~/.vim/bundle && \
git clone https://github.com/leafOfTree/vim-svelte-plugin --depth 1
Plug 'leafOfTree/vim-svelte-plugin'
:PlugInstall
- Or manually, clone this plugin to
path/to/this_plugin
, and add it tortp
in vimrc
set rtp+=path/to/this_plugin
This plugin works if it has set filetype
to svelte
. Please stay up to date. Feel free to open an issue or pull request.
How it works
It combines HTML, CSS and JavaScript syntax and indent in one file.
Supports
- Svelte directives.
- Less/Sass/Scss, Pug with vim-pug, Coffee with vim-coffee-script, TypeScript with typescript-vim or yats.vim.^
Relative plugins need to be installed. - A builtin
foldexpr
foldmethod.^ - emmet-vim HTML/CSS/JavaScript filetype detection.
^: see Configuration for details.
Configuration
Set global variable to 1
to enable or 0
to disable. Ex:
let g:vim_svelte_plugin_load_full_syntax = 1
variable | description | default |
---|---|---|
g:vim_svelte_plugin_load_full_syntax * | Enable: load all syntax files in runtimepath to enable related syntax plugins. Disable: only in VIMRUNTIME/syntax,/˜.vim/syntaxandVIMRUNTIME/syntax, ~/.vim/syntax and VIMRUNTIME/syntax,/˜.vim/syntaxandVIM/vimfiles/syntax | 0 |
g:vim_svelte_plugin_use_pug * | Enable pug syntax for . | 0 |
g:vim_svelte_plugin_use_coffee | Enable coffee syntax for |