From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Pretty printer for matlab
Date: Thu, 21 Feb 2019 16:45:59 +0100 [thread overview]
Message-ID: <F40B2378-7E06-4754-9750-9D14B56CB4A5@gmail.com> (raw)
In-Reply-To: <20190221153121.5afcd8be@homerow>
Hi Marco,
Thanks! I hadn't tries [syntax=scilab], but I just did it and it works exactly as expected!
However I could not edit the file scilab.vim which sits (on my machine) in
/usr/share/vim/vim80/syntax/scilab.vim
Meanwhile, out of curiosity I modified the two files
buff-imp-lua.mkiv
buff-imp-lua.lua
written by Hans, by naming them (temporarily)
buff-imp-scilab.mkiv
buff-imp-scilab.lua
and then by saying
\usemodule[buff-imp-scilab]
\definetyping[scilab][option=SCILAB]
I could obtain an approximate good result… But since the keywords in Lua and Scilab are quite different, I could not change some of the settings (for instance in Lua the cosine function is called math.cos while in Scilab it is cos: I could not change appropriately the list of such keywords…).
I think for the time being it is simpler for me to use your solution with
\usemodule[vim]
\definevimtyping[scilab][syntax=scilab]
Thanks again,
Best regards: OK
> On 21 Feb 2019, at 15:31, Marco Patzer <lists@homerow.info> wrote:
>
> On Thu, 21 Feb 2019 15:10:27 +0100
> Otared Kavian <otared@gmail.com> wrote:
>
>> Thanks for pointing to that module, which I didn't know because I
>> never use vim… I just tested it and seems fine, but I would need to
>> modify some of the keywords of Matlab in order to adapt them to
>> Scilab. However I didn't find where those keywords are defined in the
>> vim module.
>
> They're not defined in the vim module. The vim module is just a way
> to use vim's syntax highlighting in context. The syntax should be
> defined in the vim files <filetype>.vim in the vim directory, e.g.
> /usr/share/vim/vim81/syntax/<filetype>.vim if I'm not mistaken.
>
> Have you tried using “syntax=scilab”?
>
> Marco
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2019-02-21 15:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 13:25 Otared Kavian
2019-02-21 13:43 ` Marco Patzer
2019-02-21 14:10 ` Otared Kavian
2019-02-21 14:31 ` Marco Patzer
2019-02-21 15:45 ` Otared Kavian [this message]
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=F40B2378-7E06-4754-9750-9D14B56CB4A5@gmail.com \
--to=otared@gmail.com \
--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).