0

the ftplugin for vim *.inf files defaults to inform which says something about a Z-machine. Needless to say, this provides the wrong syntax highlighting etc for a windows .inf device driver file.

  • does anyone know of a vim syntax highlight file for windows .inf (device driver) files?
  • what about autoloading this file when appropriate (versus the z-machine inform file...)
swinman
  • 391
  • 3
  • 10

1 Answers1

4

The format of the Windows driver information files is (similar to) that of *.ini files, and Vim has a syntax script for that.

:setf dosini

To change the automatic detection, put the following into a ~/.vim/filetype.vim script:

if exists('did_load_filetypes')
    finish
endif
augroup filetypedetect
autocmd BufNewFile,BufRead *.inf    setf dosini
augroup END
Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324