vile
[Top][All Lists]
Advanced

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

Re: [vile] consistent majormode?


From: Thomas Dickey
Subject: Re: [vile] consistent majormode?
Date: Fri, 10 Nov 2017 16:52:11 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Nov 10, 2017 at 03:20:41PM +0000, Steven Lembark wrote:
> 
> Editing YMAL files using 9.8s.
> 
> My .vilerc includes:
> 
>     define-majormode yaml
>     remove-submode yaml cindent
>     ~with define-submode yaml
>         preamble    '^---$'
>         suffixes    '\.\(yaml\|yml\)'
>         notabinsert
>         tabstop=2
>         shiftwidth=2
>     ~endwith
> 
> I cd to ./etc and "xvile *yaml".
> 
> The first file shows up in yaml mode, the second in cmode.
> 
> Q: Why?

I don't know - adding that definition to my .vilerc and editing the
files in /tmp, both came up as yamlmode.

> Q: Is there any way to fix this in my definition, above?

probably.  If I don't see the problem, I build vile using --with-trace,
and study the Trace.out file.  (The normal "-D" command-line option shows
the result of the majormode tests, but not the details).

Also, looking at the ordering in

:show-majormodes

sometimes is useful.  I have this and don't see anything in the "c" mode
which would pick up these filenames:

        /tmp/DB.config.yaml
        /tmp/Querys.config.yaml

--- "c" majormode settings -----------------------------------------(24:113)----
Qualifier:
   qualifiers=any          

   mode-filename=^llib-[\w.]*$
   suffixes=\.\(\([CchisS]\)\|CC\|cc\|cpp\|cxx\|hxx\)$

Buffer:
   cindent                   shiftwidth=8              tabstop=8
   cindent-chars=:#{}()[]  

--- "yaml" majormode settings --------------------------------------(28:113)----
Qualifier:
   before=conf               preamble=^---             qualifiers=any

   suffixes=\.\(yaml\|yml\)$

Buffer:
   shiftwidth=2            notabinsert                 tabstop=2

   filtername=vile-conf-filt

> Q: Is there any way to just force the majormode from the ':' prompt?

:set-h yamlmode

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

Attachment: signature.asc
Description: Digital signature


reply via email to

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