Skip to content
Svelte JavaScript syntax highlighting for vim.
Branch: master
Clone or download
Latest commit 4492c67 Jun 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ftdetect Initial commit: vim-svelte May 29, 2019
indent Add Indentation Test (#3) Jun 6, 2019
syntax Add @debug keyword Jun 18, 2019
test Add Indentation Test (#3) Jun 6, 2019
README.md Initial commit: vim-svelte May 29, 2019
test.sh Add Indentation Test (#3) Jun 6, 2019

README.md

vim-svelte

Vim syntax highlighting and indentation for Svelte 3 components.

This is mostly just HTML syntax highlighting with some keywords added and all expressions inside of { and } highlighted as JavaScript.

Highlighting includes:

  • HTML attributes with a colon like on:click or transition:fade highlighted as Keyword.
  • #if, /if, :else, and :else if highlighted as Conditional.
  • #await, /await, :catch, :then, and @html highlighted as Keyword.
  • #each and /each highlighted as Repeat.

Dependencies

The JavaScript highlighting depends on pangloss/vim-javascript. That ships with sheerun/vim-polyglot so if you're already using that then you should be set.

Installation

  1. Install Pathogen, Vundle, NeoBundle, or Plug package manager for Vim.
  2. Use this repository as submodule or package.

For example when using Plug:

Plug 'evanleck/vim-svelte'

Alternatives

  1. burner/vim-svelte

Todo

  1. Write some tests using Vader.
You can’t perform that action at this time.