From: Nicola <nvitacolonna@gmail.com>
To: <metapost@tug.org>
Cc: ntg-context@ntg.nl
Subject: ANN: Updated Vim scripts for METAFONT/MetaPost
Date: Sun, 18 Sep 2016 12:46:44 +0200 [thread overview]
Message-ID: <nrlrai$h80$1@blaine.gmane.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]
Hello,
as a Vim user, I was not satisfied with its support for MetaPost
(especially indenting). I have updated the {mf,mp}.vim scripts
in Vim, which you find attached, and which I have forwarded to
the respective maintainers. Hopefully, they will be included in
a future release of Vim. For the time being, just unpack and put
in your .vim folder.
I have tested these scripts and they work fine for me. But if
you use Vim, I would be glad if you could try them and report
your feedback.
New things:
- *all* METAFONT/MetaPost, mplain.{mp,mf} keywords are highlighted
in the respective file types! Up to date with mpost 1.991.
- Indentation should work *much* better; and you may use 'markers'
to force indentation patterns (see indent/mp.vim) because, you
know, a machine will never get MetaPost indentation right ;)
- Keyword omnicompletion (courtesy of Vim's syntaxcomplete)!
Trigger with <c-x><c-o>.
- You may jump between figures, macros and blocks using standard
mappings: [[, ]], ][, [], [{, ]}.
- Support for the matchit plugin (e.g., with the cursor on 'if',
type % to jump to the corresponding 'fi').
ConTeXt users will benefit from these scripts, too, inside MetaPost
environments. Unfortunately, only the syntax file is available in a
ConTeXt document. For omnicompletion, you may put these in
./vim/after/ftplugin/context.vim:
setlocal omnifunc=syntaxcomplete#Complete
let g:omni_syntax_group_include_context='mf\w\+,mp\w\+'
Not ideal, but it works. For indentation, I'm still investigating
possible workarounds.
Happy typesetting!
Nicola
[-- Attachment #2: mp.tgz --]
[-- Type: application/octet-stream, Size: 11227 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
[-- Attachment #4: Type: text/plain, Size: 27 bytes --]
--
http://tug.org/metapost/
next reply other threads:[~2016-09-18 10:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-18 10:46 Nicola [this message]
2016-09-18 12:05 ` Nicola
2016-09-18 12:09 ` luigi scarso
2016-09-18 14:32 ` Nicola
[not found] ` <nrm87q$bkn$1@blaine.gmane.org>
2016-10-05 8:26 ` Nicola
2016-10-05 8:35 ` luigi scarso
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='nrlrai$h80$1@blaine.gmane.org' \
--to=nvitacolonna@gmail.com \
--cc=metapost@tug.org \
--cc=ntg-context@ntg.nl \
/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).