>_VIM-VIML — VIML IN VIM AND NEOVIM
Load it with pathogen, get full VimL support in Vim / Neovim. vimlrs is a standalone Vimscript interpreter — a Rust port of Neovim's eval engine running on fusevm. vim-viml registers the vim filetype for *.vim files, the vimrc / gvimrc / exrc family, and vimlrs / vim / nvim shebangs, highlights with a standalone VimL grammar (statements, ex commands, scope vars, v: vars, and the ported builtin subset), indents with a keyword-aware indenter, wires :make / :VimlRun through the vimlrs binary, registers vimlrs %t as an ALE linter, and registers vimlrs --lsp for vim-lsp and coc.nvim (plus vimlrs --dap guidance for nvim-dap). It augments Vim's built-in vim filetype rather than replacing it.
Install
The vimlrs binary must be on $PATH for running, linting and LSP. Then drop the plugin into your runtimepath:
# pathogen
cd ~/.vim/bundle
git clone https://github.com/MenkeTechnologies/vim-viml
# then, inside vim: :Helptags
# vim-plug (add to ~/.vimrc / init.vim)
Plug 'MenkeTechnologies/vim-viml'
# native packages (Vim 8+ / Neovim)
git clone https://github.com/MenkeTechnologies/vim-viml \
~/.vim/pack/plugins/start/vim-viml
Open any .vim file and it lights up — no further configuration. Help: :help vim-viml.
What you get
Filetype detection
Every *.vim file becomes filetype=vim. The rc / init family (vimrc, .vimrc, gvimrc, .exrc, .nvimrc, init.vim) and extensionless scripts with a #!/usr/bin/env vimlrs (or vim / nvim) shebang are detected too.
Syntax highlighting
A standalone VimL grammar — statement keywords, common ex commands, scope-sigil vars, the special v: vars, the builtin-function subset, strings, numbers, and operators — the eval-engine surface vimlrs implements.
Indentation
A standalone keyword-aware indenter — indents after a block-opening keyword (if / while / for / function / try), dedents block midpoints and closers (else / endif / endfunction).
Run & lint
:compiler vimlrs wires :make to vimlrs % into the quickfix list; :VimlRun executes the buffer via vimlrs % (positional — no -f flag). ALE runs vimlrs %t inline.
Language server & debugger
Registers vimlrs --lsp for vim-lsp (filetype vim) — diagnostics, hover, completion; coc.nvim + nvim-dap (vimlrs --dap) snippets in the README. Each is invoked with only its flag (no appended --stdio), and the wiring is guarded so the plugin still loads cleanly if the binary is absent.
Zero config
No settings required. Opt-outs: g:vim_viml_no_ale, g:vim_viml_no_lsp, and g:vim_viml_no_maps to skip an integration or the run mapping.
Token categories
The grammar classifies tokens into the categories the VimL language defines — the eval-engine surface vimlrs implements:
| Group | Tokens (sample) |
|---|---|
| Statements / control flow | if elseif else endif while for function return try catch finally let const call execute echo |
| Ex commands | source runtime normal set setlocal command autocmd augroup highlight syntax map nnoremap sign sleep |
| Scope variables | g: s: b: w: t: l: a: v: · &option · $ENV · @reg |
Special v: vars | v:true v:false v:null v:count v:val v:key v:exception v:lnum v:errmsg v:shell_error |
| List / dict / string fns | add copy extend filter get has_key index insert items join keys len map range reduce sort split string substitute type values |
| Math / bit / JSON fns | abs ceil cos floor fmod pow round sin sqrt · and or xor invert · json_encode json_decode |
Command-position " comments, single-quoted literal strings, double-quoted strings with escapes, the . / .. concat and =~ / !~ match operators, numbers, and the full operator set are handled too. Everything links to standard highlight groups, so every colorscheme covers it without bespoke tuning.
Layout
vim-viml/ ├── ftdetect/vim.vim # *.vim + rc family + vimlrs / vim / nvim shebang -> filetype=vim ├── syntax/vim.vim # standalone VimL grammar (statements / ex cmds / builtins) ├── scripts/gen_syntax.sh # stamps syntax/vim.vim with the vimlrs version ├── ftplugin/vim.vim # commentstring '" %s', :compiler vimlrs, :VimlRun ├── compiler/vimlrs.vim # :make via vimlrs % -> quickfix ├── indent/vim.vim # standalone keyword-aware indenter ├── plugin/vim.vim # ALE linter + vim-lsp + coc + nvim-dap wiring └── doc/vimlrs.txt # :help vim-viml
Standard Vim runtime layout, so pathogen / vim-plug / native packages add it to runtimepath with no special handling. It augments Vim's built-in vim filetype. Licensed MIT.
Compatibility
| Editor / plugin | Status |
|---|---|
| Vim 8+ | Filetype, syntax, indent, ftplugin, compiler |
| Neovim | Same runtime files |
| ALE | vimlrs %t linter |
| vim-lsp | vimlrs --lsp language server |
| coc.nvim | languageserver config in README |
| nvim-dap | vimlrs --dap debug adapter config in README |