BIRD.vim
July 17, 2026 · View on GitHub
Overview
BIRD.vim provides Vim syntax highlighting, filetype detection, and filetype plugin support for BIRD 2 and BIRD 3 configuration files.
This is the Vim plugin component of the BIRD-tm-language-grammar project by the BIRD Chinese Community.
Note
This repository was renamed from BIRD2.vim to reflect support for both BIRD 2 and BIRD 3. GitHub redirects the old URL, while the bird2 filetype, runtime filenames, mappings, and configuration variables remain compatible.
Features
- Syntax highlighting aligned with current BIRD 2.19 and BIRD 3.3 syntax
- Automatic filetype detection for
.bird,.bird2,.bird3, and.conffiles - Smart heuristic detection for generic
.conffiles - Filetype-specific settings (comments, format options, etc.)
Installation
Using vim-plug
Plug 'bird-chinese-community/BIRD.vim'
Using Vundle
Plugin 'bird-chinese-community/BIRD.vim'
Using native packages (Vim 8+)
Clone the repository into a start package directory; Vim loads it
automatically during startup:
git clone https://github.com/bird-chinese-community/BIRD.vim \
~/.vim/pack/plugins/start/BIRD.vim
Manual Installation
git clone https://github.com/bird-chinese-community/BIRD.vim.git
cd BIRD.vim
bash scripts/install.sh
Release archives
Each GitHub Release
includes a directly installable ZIP, tar.gz archive, and SHA256SUMS. The
archives contain only the Vim runtime and include generated doc/tags. See the
release runbook for the verified package contract.
Updating
GitHub redirects the former BIRD2.vim repository URL, so existing checkouts continue to fetch. Update the repository name in your plugin-manager configuration, then refresh it:
" vim-plug
:PlugUpdate BIRD.vim
" Vundle
:PluginUpdate
For an existing native package checkout, rename its directory, update the remote, and then pull the latest version:
mv ~/.vim/pack/plugins/start/bird2.vim \
~/.vim/pack/plugins/start/BIRD.vim
git -C ~/.vim/pack/plugins/start/BIRD.vim remote set-url origin \
https://github.com/bird-chinese-community/BIRD.vim.git
git -C ~/.vim/pack/plugins/start/BIRD.vim pull --ff-only
For a manual checkout at another path, the directory name can remain unchanged; update its remote and rerun the installer:
git -C /path/to/bird2.vim remote set-url origin \
https://github.com/bird-chinese-community/BIRD.vim.git
git -C /path/to/bird2.vim pull --ff-only
bash /path/to/bird2.vim/scripts/install.sh
Filetype Detection
The plugin automatically detects BIRD 2 and BIRD 3 configuration files by:
- Extension:
.bird,.bird2,.bird3 - Filename:
bird.conf,bird2.conf,bird3.conf,bird6.conf, and explicitbird-*/*.bird*.confvariants - Known paths: configuration files below
bird,bird2, orbird3directories - Content: scans the first 200 lines of generic
.conffiles. Strong BIRD-only constructs are accepted immediately; generic constructs require two independent signals to reduce false positives.
Documentation
After installation, view the help documentation:
:help bird2
To regenerate help tags:
:helptags ~/.vim/doc
See the changelog for release history. Contributors should add a bilingual fragment following the change-fragment guide for user-visible or release-worthy changes.
Configuration
No configuration is required. The plugin works out of the box.
Disable heuristic detection
If you want to disable content-based detection for .conf files:
let g:bird2_heuristic_detect = 0
Custom file extensions
To add custom file extensions:
autocmd BufRead,BufNewFile *.myext setfiletype bird2
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
- Plugin files: Mozilla Public License 2.0
- Copyright (c) BIRD Chinese Community
Related Projects
- BIRD-tm-language-grammar - TextMate grammar for BIRD 2 and BIRD 3
- BIRD.nvim - Neovim plugin
- vscode-bird2 - VS Code extension
Acknowledgments
This plugin is maintained by the BIRD Chinese Community.