vim-svelte


Ⅰ. 插件描述

Vim syntax highlighting and indentation for Svelte 3 components.

Ⅱ. 基本信息

创建日期:  2019-05-27
使用用户:  24
Github星:  83
插件作者:  Evan Lecklider

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'evanleck/vim-svelte-left-unsaid'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'evanleck/vim-svelte-left-unsaid'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'evanleck/vim-svelte-left-unsaid'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/evanleck/vim-svelte

Ⅳ. 文档说明

# 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.

  1. Use this repository as submodule or package.

For example when using Plug:

Plug 'evanleck/vim-svelte'

Options

To disable indentation within <script> and <style> tags, set one of these
variables in your vimrc:

let g:svelte_indent_script = 0
let g:svelte_indent_style = 0

Tests

Indentation tests are provided and any contributions would be much appreciated.
They can be run with make test which will clone
vader.vim into the current working
directory and run the test suite.

Alternatives

  1. burner/vim-svelte

添加新评论