vile
[Top][All Lists]
Advanced

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

Re: Hopefully quick mode question


From: Thomas Dickey
Subject: Re: Hopefully quick mode question
Date: Sun, 12 Apr 2020 17:12:22 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Sun, Apr 12, 2020 at 03:04:39PM -0500, Steven Lembark wrote:
> 
> When I edit files with '.c' in them I end up in cmode.
> Annoying thing is that this inlcudes "*.conf" files.
> 
> To the best of my recollection the only places that should put 
> me in C mode are:
> 
>     set c-suffixes '\.([ch]\|xs)$'
> 
>     define-majormode c
>     remove-submode c cindent
>     ~with define-submode c
>         suffixes '\.[ch]$'
>         notabinsert
>         tabstop=4
>         shiftwidth=4
>     ~endwith
> 
> (note that I last looked at this a few decades ago when most of
> my work was in C... recollection is fuzzy).
> 
> i.e., edit with C format for strings endin in ".c", ".h", and ".xs"
> a.k.a. m{ [.] ( [ch]|xs ) $}x.
> 
> Q: Why would these get caught on "*.conf" basenames?

It shouldn't.  But you can (part of) the trace by doing
        vile -D *.conf

and looking at the [Trace] buffer.

For instance, running that in /etc (where I've a few .conf files),
I see these lines:

** opened /etc/adduser.conf for read
matched preamble of adduser.conf
...inferred majormode conf

while in another directory, I might see matches by suffix:

** opened /usr/build/vile/vile/perl.xs for read
matched suffix of perl.xs
...inferred majormode xs

(showing all of the comparisons is a different matter - the compile-time
debug trace would show _that_).

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

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