vim-polyglot

A solid language pack for Vim.

Github星跟蹤圖

vim-polyglot

Build Status Maintenance

A collection of language packs for Vim.

One to rule them all, one to find them, one to bring them all and in the darkness bind them.

  • It won't affect your startup time, as scripts are loaded only on demand*.
  • It installs and updates 120+ times faster than the 147 packages it consists of.
  • Solid syntax and indentation support (other features skipped). Only the best language packs.
  • All unnecessary files are ignored (like enormous documentation from php support).
  • No support for esoteric languages, only most popular ones (modern too, like slim).
  • Each build is tested by automated vimrunner script on CI. See spec directory.

*To be completely honest, concatenated ftdetect script takes up to 17ms to load.

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 'sheerun/vim-polyglot'

Optionally download one of the releases and unpack it directly under ~/.vim directory.

You can also use Vim 8 built-in package manager:

mkdir -p ~/.vim/pack/default/start
git clone https://github.com/sheerun/vim-polyglot ~/.vim/pack/default/start/vim-polyglot

NOTE: Not all features of listed language packs are available. We strip them from functionality slowing vim startup in general (for example we ignore plugins folder that is loaded regardless of file type, use ftplugin instead).

If you need full functionality of any plugin, please use it directly with your plugin manager.

Language packs

  • acpiasl (syntax)
  • ansible (syntax, indent, ftplugin)
  • apiblueprint (syntax)
  • applescript (syntax, indent)
  • arduino (syntax, indent)
  • asciidoc (syntax)
  • autohotkey (indent)
  • blade (syntax, indent, ftplugin)
  • c++11 (syntax)
  • c/c++ (syntax)
  • caddyfile (syntax, indent, ftplugin)
  • carp (syntax)
  • cjsx (syntax, ftplugin)
  • clojure (syntax, indent, autoload, ftplugin)
  • cmake (syntax, indent)
  • coffee-script (syntax, compiler, indent, autoload, ftplugin)
  • cql (syntax)
  • cryptol (syntax, compiler, ftplugin)
  • crystal (syntax, indent, autoload, ftplugin)
  • csv (syntax, autoload, ftplugin)
  • cucumber (syntax, indent, compiler, ftplugin)
  • cue (syntax)
  • dart (syntax, indent, autoload, ftplugin)
  • dhall (syntax, ftplugin)
  • dlang (syntax, indent)
  • dockerfile (syntax, indent, ftplugin)
  • elixir (syntax, indent, compiler, autoload, ftplugin)
  • elm (syntax, indent, autoload, ftplugin)
  • emberscript (syntax, indent, ftplugin)
  • emblem (syntax, indent, ftplugin)
  • erlang (syntax, indent)
  • ferm (syntax)
  • fish (syntax, indent, compiler, autoload, ftplugin)
  • flatbuffers (syntax)
  • fsharp (syntax, indent)
  • git (syntax, indent, ftplugin)
  • glsl (syntax, indent)
  • gmpl (syntax)
  • gnuplot (syntax)
  • go (syntax, compiler, indent)
  • gradle (compiler)
  • graphql (syntax, indent, autoload, ftplugin, after)
  • groovy-indent (indent)
  • groovy (syntax)
  • haml (syntax, indent, compiler, ftplugin)
  • handlebars (syntax, indent, ftplugin)
  • haproxy (syntax)
  • haskell (syntax, indent, ftplugin)
  • haxe (syntax)
  • hcl (syntax, indent, ftplugin)
  • helm (syntax)
  • hive (syntax, ftplugin)
  • html5 (syntax, indent, autoload, ftplugin)
  • i3 (syntax, ftplugin)
  • idris (syntax, indent, ftplugin)
  • ion (syntax, ftplugin)
  • jasmine (syntax)
  • javascript (syntax, indent, compiler, ftplugin, extras)
  • jenkins (syntax, indent)
  • jinja (syntax, indent)
  • json5 (syntax)
  • json (syntax, indent, ftplugin)
  • jst (syntax, indent)
  • jsx (autoload, after)
  • julia (syntax, indent, autoload, ftplugin)
  • kotlin (syntax, indent, ftplugin)
  • latex (syntax, indent, ftplugin)
  • less (syntax, indent, ftplugin)
  • lilypond (syntax, indent, compiler, ftplugin)
  • livescript (syntax, indent, compiler, ftplugin)
  • llvm (syntax, indent, ftplugin)
  • log (syntax)
  • lua (syntax, indent)
  • mako (syntax, indent, ftplugin)
  • markdown (syntax, indent, ftplugin)
  • mathematica (syntax, ftplugin)
  • mdx (syntax)
  • meson (syntax, indent, ftplugin)
  • moonscript (syntax, indent, ftplugin)
  • nginx (syntax, indent, ftplugin)
  • nim (syntax, compiler, indent)
  • nix (syntax, indent, compiler, ftplugin)
  • objc (ftplugin, syntax, indent)
  • ocaml (syntax, indent, compiler, ftplugin)
  • octave (syntax, indent)
  • opencl (syntax, indent, ftplugin)
  • perl (syntax, indent, ftplugin)
  • pgsql (syntax, indent)
  • php (syntax)
  • plantuml (syntax, indent, ftplugin)
  • pony (syntax, indent, autoload, ftplugin)
  • powershell (syntax, indent, ftplugin)
  • protobuf (syntax, indent)
  • pug (syntax, indent, ftplugin)
  • puppet (syntax, indent, autoload, ftplugin)
  • purescript (syntax, indent, ftplugin)
  • python-compiler (compiler, autoload)
  • python-indent (indent)
  • python (syntax)
  • qmake (syntax)
  • qml (syntax, indent, ftplugin)
  • r-lang (syntax)
  • racket (syntax, indent, ftplugin)
  • ragel (syntax)
  • raml (syntax, ftplugin)
  • reason (syntax, indent)
  • rspec (syntax)
  • rst (syntax, indent, autoload, ftplugin)
  • ruby (syntax, indent, compiler, autoload, ftplugin)
  • rust (syntax, indent, compiler, autoload, ftplugin)
  • sbt (syntax)
  • scala (syntax, indent, compiler, ftplugin)
  • scss (syntax, indent, ftplugin)
  • slim (syntax, indent, ftplugin)
  • slime (syntax, indent)
  • smt2 (syntax, autoload, ftplugin)
  • solidity (syntax, indent, ftplugin)
  • stylus (syntax, indent, ftplugin)
  • svelte (syntax, indent)
  • svg-indent (indent)
  • svg (syntax)
  • swift (syntax, indent, ftplugin)
  • sxhkd (syntax)
  • systemd (syntax, ftplugin)
  • terraform (syntax, indent, autoload, ftplugin)
  • textile (syntax, ftplugin)
  • thrift (syntax)
  • tmux (syntax, ftplugin)
  • tomdoc (syntax)
  • toml (syntax, ftplugin)
  • tptp (syntax)
  • twig (syntax, indent, ftplugin)
  • typescript (syntax, indent, compiler, ftplugin)
  • v (syntax, indent, ftplugin)
  • vala (syntax, indent, ftplugin)
  • vbnet (syntax)
  • vcl (syntax)
  • vifm (syntax, autoload, ftplugin)
  • vm (syntax, indent)
  • vue (syntax, indent, ftplugin)
  • xdc (syntax)
  • xls (syntax)
  • xml (syntax)
  • yaml (syntax, ftplugin)
  • yard (syntax)
  • zephir (syntax)
  • zig (syntax, autoload, ftplugin)

Updating

You can either wait for new patch release with updates or run the ./build script by yourself.

Troubleshooting

Please make sure you have syntax on in your .vimrc, otherwise syntax files are not loaded at all.

Individual language packs can be disabled by setting g:polyglot_disabled as follows:

" ~/.vimrc, declare this variable before polyglot is loaded
let g:polyglot_disabled = ['css']

Note that disabling languages won't make in general your vim startup any faster / slower (only for specific file type). Vim-polyglot is selection of language plugins that are loaded only on demand.

Contributing

Language packs are periodically updated using automated build script.

Feel free to add your language, and send pull-request. In your pull request, please include:

  1. How you chose the particular repo from which to pull support for this language.
  2. An updated https://github.com/sheerun/vim-polyglot/blob/master/build .
  3. If at all possible, absolutely nothing else (in particular, please don't run build and include that in your PR).

The easier it is to validate that the new language won't do anything wacky, the faster it'll be merged. In particular, languages that utilize global plugins (loaded for every filetype), or plugins with dangerous features (like call based on the contents of a file being edited), will never be merged, as they will be slow or dangerous, respectively.

License

See linked repositories for detailed license information.

主要指標

概覽
名稱與所有者sheerun/vim-polyglot
主編程語言Vim Script
編程語言Ruby (語言數: 4)
平台
許可證
所有者活动
創建於2013-09-12 14:18:54
推送於2024-12-04 22:22:43
最后一次提交2024-12-05 00:22:43
發布數146
最新版本名稱v4.17.1 (發布於 2022-02-21 00:05:59)
第一版名稱v1.0.0 (發布於 )
用户参与
星數5.7k
關注者數46
派生數301
提交數892
已啟用問題?
問題數586
打開的問題數85
拉請求數57
打開的拉請求數16
關閉的拉請求數202
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?