Merge pull request #3157 from lyndsysimon/add-vim-filetype-config

Add instructions for setting filetype in Vim
pull/3161/head
Rich Harris 5 years ago committed by GitHub
commit df38a5da34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,3 +11,17 @@ draft: true
* eslint-plugin-svelte3
* svelte-vscode
* associating .svelte files with HTML in VSCode, Sublime, Atom, etc etc etc
## Vim/Neovim
To treat all `*.svelte` files as HTML, add the following line to your `init.vim`:
au! BufNewFile,BufRead *.svelte set ft=html
To temporarily turn on HTML syntax highlighting for the current buffer, use:
:set ft=html
To set the filetype for a single file, use a [modeline](https://vim.fandom.com/wiki/Modeline_magic):
<!-- vim: set ft=html :-->

Loading…
Cancel
Save