Vim configuration for Zig
See the codeFile detection and syntax highlighting for the zig programming language.
Plug 'ziglang/zig.vim' inside the plug command:call plug#begin('~/.vim/plugged')
Plug 'ziglang/zig.vim'
call plug#end()
:PlugInstallmkdir -p ~/.vim/pack/plugins/start/cd ~/.vim/pack/plugins/start/git clone https://github.com/ziglang/zig.vimmkdir -p ~/.local/share/nvim/site/pack/plugins/start/cd ~/.local/share/nvim/site/pack/plugins/start/git clone https://github.com/ziglang/zig.vimThis plugin enables automatic code formatting on save by default using
zig fmt. To disable it, you can use this configuration in vimrc:
let g:zig_fmt_autosave = 0
The default compiler which gets used by :make (:help :compiler for details)
is zig_build and it runs zig build. The other options are:
:compiler zig_test which runs zig test on the current file.:compiler zig_build_exe which runs zig build-exe on the current file.:compiler zig which requires that a subcommand is passed as an argument
and it runs on the current file.387 followers · starred Aug 2025
461 followers · starred Jul 2023
61 followers · starred Dec 2023
169 followers · starred Jul 2022
Vim configuration for Zig
See the codeFile detection and syntax highlighting for the zig programming language.
Plug 'ziglang/zig.vim' inside the plug command:call plug#begin('~/.vim/plugged')
Plug 'ziglang/zig.vim'
call plug#end()
:PlugInstallmkdir -p ~/.vim/pack/plugins/start/cd ~/.vim/pack/plugins/start/git clone https://github.com/ziglang/zig.vimmkdir -p ~/.local/share/nvim/site/pack/plugins/start/cd ~/.local/share/nvim/site/pack/plugins/start/git clone https://github.com/ziglang/zig.vimThis plugin enables automatic code formatting on save by default using
zig fmt. To disable it, you can use this configuration in vimrc:
let g:zig_fmt_autosave = 0
The default compiler which gets used by :make (:help :compiler for details)
is zig_build and it runs zig build. The other options are:
:compiler zig_test which runs zig test on the current file.:compiler zig_build_exe which runs zig build-exe on the current file.:compiler zig which requires that a subcommand is passed as an argument
and it runs on the current file.387 followers · starred Aug 2025
461 followers · starred Jul 2023
61 followers · starred Dec 2023
169 followers · starred Jul 2022