[NTG-context] Vim wiki page updated
nvitacolonna at gmail.com
Wed Nov 2 20:20:30 CET 2016
On 02/11/2016 19:39, Aditya Mahajan wrote:
> On Tue, 1 Nov 2016, Nicola wrote:
>> I have updated the Vim page at ConTeXt Garden:
>> It may be considered as the official documentation of the ConTeXt
>> scripts in Vim, as the only other documentation is the source code
> Hi Nicola,
> I wonder if you have seen my vim runtime files:
Unfortunately not, I worked only on those already in Vim.
> The main file to look at is the syntax highlighting file. I haven't
> carefully with your version (haven't installed vim 8 yet), but there
> few differences. It may be worthwhile to merge the two syntax files.
Ok, I will take a look. I see that your file does not depend on
plaintex.vim. It might be a good idea to remove that dependency...
> The metapost syntax highlighting file defines a few keywords that are
> used by
> metafun. Could these be merged to your mp syntax highlighting file?
The syntax scripts in Vim already cover all of MetaFun. MetaFun keywords
are highlighted by default inside ConTeXt documents; for MetaPost files
('mp' filetype), you must put
let g:mp_metafun_macros = 1
into your vimrc.
> The indent file is adapted from (I think) latex-suite's indent file with
> modificiations that suit my taste. I am not sure these should go into
> the default vim indent file, but it may be worthwhile for you to take a
> quick look.
MetaPost indentation is tough. I have rewritten the indent script in Vim
from scratch, and now it works reasonably well. I will try yours, but
you might try the one currently in Vim, too.
> The ftplugin file mainly contains shortcuts like `a expand to α, etc;
> adapted from latex-suite (which in-turn borred the idea from auctex).
> depend on a ftplugin file provided by latex-suite. There were also a few
> macros to reflow text, but your code is more robust and has more
I will look into those, too. Do you know that Vim has built-in support
for digraphs (:h digraphs)? For example, α can be obtained by typing
<c-k>a* in Insert mode.
> The compiler file is old and I haven't tested it in a few years, so
> ignore it.
I could maybe create a GitHub repository, to make it easier to merge
More information about the ntg-context