[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] viewing of local .c and .h files

From: Jasper
Subject: Re: [Lynx-dev] viewing of local .c and .h files
Date: Wed, 06 Feb 2008 18:01:35 +0100

Op di, 05-02-2008 te 20:34 -0800, schreef Doug Kaufman:
> On Mon, 4 Feb 2008, Jasper wrote:
> > In my system ( Debian Etch ) Lynx calls 'less' to view local files
> > with .c or .h extension.
> > 
> > Now I want Lynx to display these files simply like other plain textfiles
> > in the 'internal' viewer.
> > 
> > I can trick Lynx into doing that by commenting out the corresponding
> > lines in /etc/mime.types : apparently Lynx defaults to the internal
> > viewer if it does not know what else to do.
> Your personal ".mime.types" file in your $HOME directory overrules any
> settings in the global mime.types file. So you should be able to set up
> a file in your $HOME directory called ".mime.types" and put in the line:
> text/plain    c h
> That should make lynx treat *.c and *.h files as plain text. If I
> understand you correctly, that should do what you want.

Yes, that works. ( A pifall here was that the line must have a
line-ending. ) An academic question could be: are there other mechanisms
affected by this ? But don't worry, I am fine.

> An alternative, if you don't want to set up a .mime.types file in your
> $HOME directory, would be to use your personal lynx.cfg file. Set
> Then set:
> SUFFIX:.c:text/plain
> SUFFIX:.h:text/plain

I did not try this solution, looks more clean, limited to lynx only.

> Doug
Thank you. --Jasper.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]