From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: Peter Krempa <pkrempa@redhat.com>
Cc: QEMU <qemu-devel@nongnu.org>, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qapi: Add vim magic modelines for qapi definitions
Date: Wed, 5 Dec 2018 18:09:52 +0400 [thread overview]
Message-ID: <CAJ+F1CLr5_nB2hpXJrhMeJnsXjME8k+0s90wZHw-H_qsQht63A@mail.gmail.com> (raw)
In-Reply-To: <20181205123337.GI799@angien.pipo.sk>
Hi
On Wed, Dec 5, 2018 at 4:34 PM Peter Krempa <pkrempa@redhat.com> wrote:
>
> On Thu, Oct 04, 2018 at 13:34:12 +0200, Peter Krempa wrote:
> > On Tue, Sep 04, 2018 at 09:03:10 +0200, Peter Krempa wrote:
> > > The files have a json suffix but look terrible with json syntax
> > > hilighting enabled. Add a magic modeline for vim to switch to python
> > > file format for hilighting similarly to the emacs modeline already
> > > present.
> > >
> > > Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> > > ---
> >
> > Ping?
>
> Ping 2. It looks like no new json files were added meanwhile.
I use both emacs and vim. We solved this for me with emacs .editorconf
file_type_emacs.
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?
--
Marc-André Lureau
next prev parent reply other threads:[~2018-12-05 14:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 7:03 [Qemu-devel] [PATCH] qapi: Add vim magic modelines for qapi definitions Peter Krempa
2018-10-04 11:34 ` Peter Krempa
2018-12-05 12:33 ` Peter Krempa
2018-12-05 14:09 ` Marc-André Lureau [this message]
2018-12-05 16:20 ` Markus Armbruster
2018-12-05 21:49 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ+F1CLr5_nB2hpXJrhMeJnsXjME8k+0s90wZHw-H_qsQht63A@mail.gmail.com \
--to=marcandre.lureau@gmail.com \
--cc=armbru@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).