vim-uefi provides syntax highlighting, automatic indentation, comment configuration, and filetype detection for files commonly used in UEFI BIOS development (EDK II and ACPI Source Language).
Implemented in modern Vim9 script, conforming to standard Vim runtime engineering practices.
- Filetype Detection & Syntax Highlighting:
- EDK II Package Declaration (
*.dec) - EDK II Platform Description (
*.dsc) - EDK II Flash Description (
*.fdf) - EDK II Module Information (
*.inf) - UEFI HII String / Unicode (
*.uni) - UEFI Visual Forms Representation (
*.vfr,*.hfr,*.sd) - ACPI Source Language (
*.asl,*.asi,*.dsl) - SDL (
*.sdl) - UEFI C extensions (
after/syntax/c.vimfor types, status codes, protocols,%r,%t)
- EDK II Package Declaration (
- Indentation (
indent/):- Automatic C-style indentation (
cindent) for ASL (*.asl) and VFR (*.vfr) files.
- Automatic C-style indentation (
- Comment Support (
ftplugin/):- Automatically sets
commentstringfor all supported formats (#for DEC/DSC/FDF/INF/SDL,//for UNI,//and/* */for ASL/VFR/C). Compatible with native commenting (gc).
- Automatically sets
- Log Helper:
- Press
<F5>in any*.logfile to reload from disk and jump to the bottom (G).
- Press
- Vim Help Documentation:
- Full documentation available via
:help uefi.
- Full documentation available via
mkdir %UserProfile%\vimfiles\pack\plugins\start
git clone https://github.com/aphroteus/vim-uefi.git %UserProfile%\vimfiles\pack\plugins\start\vim-uefimkdir -p ~/.vim/pack/plugins/start
git clone https://github.com/aphroteus/vim-uefi.git ~/.vim/pack/plugins/start/vim-uefiWith vim-plug:
Plug 'aphroteus/vim-uefi'Generate help tags after installation:
:helptags ALLAll features are enabled with sensible defaults. You can customize them in your .vimrc / _vimrc:
" UEFI C syntax mode (default: 'auto')
" 'auto': 3-tier smart detection (0 pollution for plain C, 100% active for BIOS/OEM/3rd-party)
" 1 : Force enable for all C files
" 0 : Completely disable UEFI C extensions
let g:uefi_c_syntax = 'auto'
" Toggle function call highlighting in C files (default: 1)
let g:uefi_highlight_functions = 1
" Toggle operator highlighting in C files (default: 1)
let g:uefi_highlight_operators = 1
" Toggle <F5> log reload in *.log files (default: 1)
let g:uefi_log_f5_reload = 1
" Disable UEFI C ftplugin extensions (default: 0)
let g:uefi_no_c_ftplugin = 0The plugin includes a self-contained automated test suite implemented in pure Vim9 script with zero external dependencies.
Run the complete test suite directly via Vim:
vim --clean -Nu test/minivimrc -es -S test/run_all.vimOr use the provided wrapper scripts:
powershell -ExecutionPolicy Bypass -File test/run.ps1./test/run.shMIT License. See LICENSE for details.