vim-polyglot/README.md

189 lines
12 KiB
Markdown
Raw Normal View History

2018-05-01 14:54:32 -04:00
# vim-polyglot [![Build Status][travis-img-url]][travis-url] [![Maintenance](https://img.shields.io/maintenance/yes/2018.svg?maxAge=2592000)]()
[travis-img-url]: https://travis-ci.org/sheerun/vim-polyglot.svg
2013-09-14 14:43:34 -04:00
[travis-url]: https://travis-ci.org/sheerun/vim-polyglot
2013-09-13 08:06:28 -04:00
2013-09-13 08:08:50 -04:00
A collection of language packs for Vim.
2013-09-13 08:06:28 -04:00
2014-05-14 06:06:27 -04:00
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
2013-09-13 09:01:21 -04:00
2015-06-11 11:02:51 -04:00
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
2017-10-19 16:37:39 -04:00
- It **installs and updates 100+ times faster** than 100+ packages it consists of.
2017-10-27 11:28:29 -04:00
- Solid syntax and indentation support (other features skipped). Only the best language packs.
2014-04-14 19:33:45 -04:00
- All unnecessary files are ignored (like enormous documentation from php support).
- No support for esoteric languages, only most popular ones (modern too, like `slim`).
2014-04-14 20:16:31 -04:00
- Each build is tested by automated vimrunner script on CI. See `spec` directory.
2013-09-13 08:06:28 -04:00
2017-11-16 12:47:04 -05:00
\*To be completely honest, concatenated `ftdetect` script takes up to `17ms` to load.
2013-09-16 11:02:09 -04:00
2013-09-13 08:06:28 -04:00
## Installation
2015-11-24 09:08:46 -05:00
1. Install [Pathogen](https://github.com/tpope/vim-pathogen), [Vundle](https://github.com/VundleVim/Vundle.vim), [NeoBundle](https://github.com/Shougo/neobundle.vim), or [Plug](https://github.com/junegunn/vim-plug) package manager for Vim.
2013-09-13 08:06:28 -04:00
2. Use this repository as submodule or package.
For example when using [Plug](https://github.com/junegunn/vim-plug):
```
Plug 'sheerun/vim-polyglot'
```
2013-09-13 08:24:18 -04:00
Optionally download one of the [releases](https://github.com/sheerun/vim-polyglot/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.
2013-09-13 08:06:28 -04:00
## Language packs
- [ansible](https://github.com/pearofducks/ansible-vim) (syntax, indent, ftplugin)
2017-03-23 08:21:01 -04:00
- [apiblueprint](https://github.com/sheerun/apiblueprint.vim) (syntax)
2018-05-08 13:19:22 -04:00
- [applescript](https://github.com/mityu/vim-applescript) (syntax, indent)
- [arduino](https://github.com/sudar/vim-arduino-syntax) (syntax, indent)
2017-05-17 05:18:30 -04:00
- [asciidoc](https://github.com/asciidoc/vim-asciidoc) (syntax)
2017-09-27 14:14:30 -04:00
- [autohotkey](https://github.com/hnamikaw/vim-autohotkey) (indent)
- [blade](https://github.com/jwalton512/vim-blade) (syntax, indent, ftplugin)
- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax)
2015-12-06 05:31:38 -05:00
- [c/c++](https://github.com/vim-jp/vim-cpp) (syntax)
- [caddyfile](https://github.com/isobit/vim-caddyfile) (syntax, indent, ftplugin)
2017-12-30 05:29:09 -05:00
- [carp](https://github.com/hellerve/carp-vim) (syntax)
- [cjsx](https://github.com/mtscout6/vim-cjsx) (syntax, ftplugin)
- [clojure](https://github.com/guns/vim-clojure-static) (syntax, indent, autoload, ftplugin)
2017-11-19 15:46:44 -05:00
- [cmake](https://github.com/pboettch/vim-cmake-syntax) (syntax, indent)
- [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, indent, compiler, autoload, ftplugin)
- [cql](https://github.com/elubow/cql-vim) (syntax)
- [cryptol](https://github.com/victoredwardocallaghan/cryptol.vim) (syntax, compiler, ftplugin)
- [crystal](https://github.com/rhysd/vim-crystal) (syntax, indent, autoload, ftplugin)
- [cucumber](https://github.com/tpope/vim-cucumber) (syntax, indent, compiler, ftplugin)
- [dart](https://github.com/dart-lang/dart-vim-plugin) (syntax, indent, autoload, ftplugin)
- [dockerfile](https://github.com/docker/docker) (syntax)
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, autoload, ftplugin)
2017-09-27 14:52:13 -04:00
- [elm](https://github.com/ElmCast/elm-vim) (syntax, indent, autoload, ftplugin)
- [emberscript](https://github.com/yalesov/vim-ember-script) (syntax, indent, ftplugin)
- [emblem](https://github.com/yalesov/vim-emblem) (syntax, indent, ftplugin)
- [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (syntax, indent)
2017-12-06 07:17:06 -05:00
- [fish](https://github.com/dag/vim-fish) (syntax, indent, compiler, autoload, ftplugin)
- [fsharp](https://github.com/fsharp/vim-fsharp) (syntax, indent)
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin)
- [glsl](https://github.com/tikhomirov/vim-glsl) (syntax, indent)
- [gmpl](https://github.com/maelvalais/gmpl.vim) (syntax)
2017-03-23 06:49:10 -04:00
- [gnuplot](https://github.com/vim-scripts/gnuplot-syntax-highlighting) (syntax)
- [go](https://github.com/fatih/vim-go) (syntax, compiler, indent)
2015-10-10 11:17:57 -04:00
- [groovy](https://github.com/vim-scripts/groovy.vim) (syntax)
- [haml](https://github.com/sheerun/vim-haml) (syntax, indent, compiler, ftplugin)
- [handlebars](https://github.com/mustache/vim-mustache-handlebars) (syntax, indent, ftplugin)
- [haproxy](https://github.com/CH-DanReif/haproxy.vim) (syntax)
- [haskell](https://github.com/neovimhaskell/haskell-vim) (syntax, indent, ftplugin)
- [haxe](https://github.com/yaymukund/vim-haxe) (syntax)
2014-06-08 07:22:29 -04:00
- [html5](https://github.com/othree/html5.vim) (syntax, indent, autoload, ftplugin)
- [i3](https://github.com/PotatoesMaster/i3-vim-syntax) (syntax, ftplugin)
- [jasmine](https://github.com/glanotte/vim-jasmine) (syntax)
- [javascript](https://github.com/pangloss/vim-javascript) (syntax, indent, compiler, ftplugin, extras)
- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax) (syntax, indent)
2017-12-30 05:34:40 -05:00
- [json5](https://github.com/GutenYe/json5.vim) (syntax)
- [json](https://github.com/elzr/vim-json) (syntax, indent, ftplugin)
- [jst](https://github.com/briancollins/vim-jst) (syntax, indent)
- [jsx](https://github.com/mxw/vim-jsx) (after)
- [julia](https://github.com/JuliaEditorSupport/julia-vim) (syntax, indent, autoload, ftplugin)
- [kotlin](https://github.com/udalov/kotlin-vim) (syntax, indent)
2017-12-30 05:10:32 -05:00
- [latex](https://github.com/LaTeX-Box-Team/LaTeX-Box) (syntax, indent, ftplugin)
- [less](https://github.com/groenewege/vim-less) (syntax, indent, ftplugin)
- [liquid](https://github.com/tpope/vim-liquid) (syntax, indent, ftplugin)
- [livescript](https://github.com/gkz/vim-ls) (syntax, indent, compiler, ftplugin)
2016-07-26 07:58:55 -04:00
- [lua](https://github.com/tbastos/vim-lua) (syntax, indent)
- [mako](https://github.com/sophacles/vim-bundle-mako) (syntax, indent, ftplugin)
- [markdown](https://github.com/plasticboy/vim-markdown) (syntax, indent)
2017-03-23 07:11:44 -04:00
- [mathematica](https://github.com/rsmenon/vim-mathematica) (syntax, ftplugin)
- [nginx](https://github.com/chr4/nginx.vim) (syntax, indent, ftplugin)
- [nim](https://github.com/zah/nim.vim) (syntax, compiler, indent)
2017-11-19 15:34:38 -05:00
- [nix](https://github.com/LnL7/vim-nix) (syntax, indent, ftplugin)
- [objc](https://github.com/b4winckler/vim-objc) (ftplugin, syntax, indent)
- [ocaml](https://github.com/jrk/vim-ocaml) (syntax, indent, ftplugin)
- [octave](https://github.com/vim-scripts/octave.vim--) (syntax)
- [opencl](https://github.com/petRUShka/vim-opencl) (syntax, indent, ftplugin)
- [perl](https://github.com/vim-perl/vim-perl) (syntax, indent, ftplugin)
- [pgsql](https://github.com/exu/pgsql.vim) (syntax)
- [php](https://github.com/StanAngeloff/php.vim) (syntax)
- [plantuml](https://github.com/aklt/plantuml-syntax) (syntax, indent, ftplugin)
- [powershell](https://github.com/PProvost/vim-ps1) (syntax, indent, ftplugin)
- [protobuf](https://github.com/uarun/vim-protobuf) (syntax, indent)
- [pug](https://github.com/digitaltoad/vim-pug) (syntax, indent, ftplugin)
- [puppet](https://github.com/voxpupuli/vim-puppet) (syntax, indent, ftplugin)
2017-09-27 13:57:29 -04:00
- [purescript](https://github.com/purescript-contrib/purescript-vim) (syntax, indent, ftplugin)
- [python-compiler](https://github.com/aliev/vim-compiler-python) (compiler, autoload)
- [python-ident](https://github.com/Vimjas/vim-python-pep8-indent) (indent)
- [python](https://github.com/vim-python/python-syntax) (syntax)
- [qml](https://github.com/peterhoeg/vim-qml) (syntax, indent, ftplugin)
2015-10-24 06:06:19 -04:00
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax, ftplugin)
2017-05-17 05:46:19 -04:00
- [racket](https://github.com/wlangstroth/vim-racket) (syntax, indent, autoload, ftplugin)
2015-12-31 12:27:37 -05:00
- [ragel](https://github.com/jneen/ragel.vim) (syntax)
- [raml](https://github.com/IN3D/vim-raml) (syntax, ftplugin)
- [rspec](https://github.com/sheerun/rspec.vim) (syntax)
- [ruby](https://github.com/vim-ruby/vim-ruby) (syntax, indent, compiler, autoload, ftplugin)
- [rust](https://github.com/rust-lang/rust.vim) (syntax, indent, compiler, autoload, ftplugin)
- [sbt](https://github.com/derekwyatt/vim-sbt) (syntax)
- [scala](https://github.com/derekwyatt/vim-scala) (syntax, indent, compiler, ftplugin)
- [scss](https://github.com/cakebaker/scss-syntax.vim) (syntax, autoload, ftplugin)
- [slim](https://github.com/slim-template/vim-slim) (syntax, indent, ftplugin)
2017-12-06 07:17:06 -05:00
- [slime](https://github.com/slime-lang/vim-slime-syntax) (syntax, indent)
2017-09-27 14:08:01 -04:00
- [solidity](https://github.com/tomlion/vim-solidity) (syntax, indent, ftplugin)
- [stylus](https://github.com/wavded/vim-stylus) (syntax, indent, ftplugin)
- [swift](https://github.com/keith/swift.vim) (syntax, indent, ftplugin)
- [sxhkd](https://github.com/baskerville/vim-sxhkdrc) (syntax)
- [systemd](https://github.com/wgwoods/vim-systemd-syntax) (syntax)
- [terraform](https://github.com/hashivim/vim-terraform) (syntax, indent, ftplugin)
- [textile](https://github.com/timcharper/textile.vim) (syntax, ftplugin)
- [thrift](https://github.com/solarnz/thrift.vim) (syntax)
- [tmux](https://github.com/keith/tmux.vim) (syntax, ftplugin)
2015-12-06 05:31:38 -05:00
- [tomdoc](https://github.com/wellbredgrapefruit/tomdoc.vim) (syntax)
- [toml](https://github.com/cespare/vim-toml) (syntax, ftplugin)
2016-09-11 07:50:56 -04:00
- [twig](https://github.com/lumiliet/vim-twig) (syntax, indent, ftplugin)
- [typescript](https://github.com/leafgarland/typescript-vim) (syntax, indent, compiler, ftplugin)
- [vala](https://github.com/arrufat/vala.vim) (syntax, indent)
2015-10-24 06:06:19 -04:00
- [vbnet](https://github.com/vim-scripts/vbnet.vim) (syntax)
- [vcl](https://github.com/smerrill/vcl-vim-plugin) (syntax)
2017-09-27 14:23:42 -04:00
- [vifm](https://github.com/vifm/vifm.vim) (syntax, autoload, ftplugin)
- [vm](https://github.com/lepture/vim-velocity) (syntax, indent)
- [vue](https://github.com/posva/vim-vue) (syntax, indent, ftplugin)
2015-10-24 06:06:19 -04:00
- [xls](https://github.com/vim-scripts/XSLT-syntax) (syntax)
2015-12-31 12:34:53 -05:00
- [yaml](https://github.com/stephpy/vim-yaml) (syntax, ftplugin)
2015-10-24 06:06:19 -04:00
- [yard](https://github.com/sheerun/vim-yardoc) (syntax)
2013-09-13 08:06:28 -04:00
## 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:
```viml
" ~/.vimrc
let g:polyglot_disabled = ['css']
```
2018-03-08 16:34:01 -05:00
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.
2013-09-13 08:06:28 -04:00
## 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.
2013-09-13 08:06:28 -04:00
## License
See linked repositories for detailed license information.