On 12/5/18 10:20 AM, Markus Armbruster wrote:
The vim plugin doesn't have an equivalent, however, the documentation
suggest vim_filetype, but you need to add
to .vimrc:
function! FiletypeHook(config)
if has_key(a:config, 'vim_filetype')
let &filetype = a:config['vim_filetype']
endif
return 0 " Return 0 to show no error happened
endfunction
call editorconfig#AddNewHook(function('FiletypeHook'))
I think this is a better solution than having to add modelines
everywhere, what do you think?
These .json files are not valid JSON. They *are* valid Python (except
for a few tests, which could perhaps be fixed). Makes me wonder why on
earth we insist on naming them .json and create all this trouble.
I've previously posted patches that bulk-renames the QAPI files from
.json to .qapi, but too close to a release cycle to be applied at the
time. I'd have to refresh them to match new files in the meantime, but
as long as we are arguing that editorconfig is a smart way to go, it's a
fairly simple tweak to editorconfig to match the preferred suffix we use
for QAPI files.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org