From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
Subject: Re: Identifying context files
Date: Fri, 3 Feb 2006 08:10:34 +0100 [thread overview]
Message-ID: <9ABF20CA-1E6F-45ED-B523-B338876050D9@uni-bonn.de> (raw)
In-Reply-To: <Pine.WNT.4.63.0602022108200.3516@nqvgln>
That sounds like an excellent idea, and I'd be very grateful to have
such a detector. As to keywords: most of my ConTeXt files start with
\enableregime; you may want to add this to your list.
Best
Thomas
On Feb 3, 2006, at 3:17 AM, Aditya Mahajan wrote:
> I use (g)vim to edit both context and latex files. Unfortunately, both
> of them usually have *.tex extension. This mean that detecting
> filetype from extension is not possible, so one should look into the
> contents of the file to see if it a context file or not.
>
> I am planning to submit a ftdetect for context to vim. Right now, I
> check if the first six lines of the file contain any of
> '\\start\|\\enablemode\|\\unprotect\|\\setvariables\|\\module\|\
> \usemodule'
> and if so, set the filetype to context, otherwise it is set to tex
> (that loads latex plugins).
>
> This works for my context writing style. I would like to know about
> other people's preference.
>
> 1. Do you write some keyword unique to context in the first few lines
> of the file. Should I also check the last few line lines.
>
> 2. Are there any other keywords that you will like to include.
>
> 3. Is it enough to check the first 6 line or should I check more. I do
> not want to check more lines as this will make the detection slower
> (by a few mili secs).
>
> Thanks,
> Aditya
>
> --
> Aditya Mahajan, EECS Systems, University of Michigan
> http://www.eecs.umich.edu/~adityam || Ph: 7342624008
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
next prev parent reply other threads:[~2006-02-03 7:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-03 2:17 Aditya Mahajan
2006-02-03 7:10 ` Thomas A. Schmitz [this message]
2006-02-03 8:15 ` Hans Hagen
2006-02-03 8:22 ` Taco Hoekwater
2006-02-03 9:24 ` Hans Hagen
2006-02-03 17:22 ` Aditya Mahajan
2006-02-03 20:47 ` Hans Hagen
2006-02-04 23:41 ` Mojca Miklavec
2006-02-11 4:59 ` Aditya Mahajan
2006-02-11 7:05 ` Aditya Mahajan
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=9ABF20CA-1E6F-45ED-B523-B338876050D9@uni-bonn.de \
--to=thomas.schmitz@uni-bonn.de \
--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).