Subject: FVWM: fvwm.vim: Vim syntax highlighting file ready for testing.

From: "Rob 'Feztaa' Park" <[email-masked]>
Date: Tue, 09 Jul 2002 04:00:48 -0600

Ok, I have whipped together an extremely alpha-quality syntax file for
Vim. You can get it from here:

http://members.shaw.ca/feztaa/fvwm.vim

Probably save it to here: /usr/share/vim/vim61/syntax/ (if you are using
vim61). The location could be different depending on your distro. Just
do a 'locate fvwm.vim' if you're not sure. You might want to backup your
old one before overwriting it with this.

Anyway, all I know is that this highlights the syntax of my own fvwmrc
perfectly. I went through the manpage for 2.5.2 and set it up to match
pretty much everything that's there. There's probably a ton of stuff
that I got wrong because it wasn't in my own fvwmrc and I couldn't test
it properly. 

So if you guys see any problems with it, send me your fvwmrc (so I can
see the problem firsthand), tell me whats wrong, and I'll try to fix it.
I'm not terribly interested in backwards compatability with old config
syntax, but if there's enough demand I'll put it in.

-- 
Rob 'Feztaa' Park
http://members.shaw.ca/feztaa/
--
I'm sorry if the following sounds combative and excessively personal,
but that's my general style.        -- Ian Jackson
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 9 Jul 2002 10:36:15 +0000

> old one before overwriting it with this.

I saved it to ~/.vim/, this was enough.

It is still too old (I don't know how old was the previous one, I don't
use vim), many new commands and options are not recognized.

It would be nice if obsolete commands like IconPath, PixmapPath, *Font,
*Color, WindowDesk, and obsolete Style options would be highlighted
using light red or some other annoying color.

> syntax, but if there's enough demand I'll put it in.

I will not list all problems, if you want to improve it, run it on dozens
of files in fvwm-themes-0.6.1, it uses only the correct 2.4.8 syntax.

Regards,
Mikhael.

---

From: "Rob 'Feztaa' Park" <[email-masked]>
Date: Tue, 09 Jul 2002 07:23:54 -0600

Alas! Mikhael Goikhman spake thus:
> It is still too old

Uh, yeah... I based it on the manpage for 2.5.2. I highly doubt that
much has changed between 2.5.2 and today's CVS. Unless you're using
2.4.8 and there are some /Old/ commands that I didn't include.

My best guess here is that the default fvwm.vim that comes with vim (the
crappy one) is overriding your ~/.vim one.

> using light red or some other annoying color.

Maybe once I get the current commands perfected, I'll put in some
highlighting for obsolete commands.

Honesty's the best policy.
		-- Miguel de Cervantes

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 9 Jul 2002 13:53:27 +0000

> crappy one) is overriding your ~/.vim one.

You are right, I didn't though I already have one fvwm.vim. :)

It is much better now.

There are small glitches:

  * Back ticks may be used for quotes too.
  * Variable matching (following the dollar) is incorrect, it should be
    either one strictly defined char (not \w), digit, asterisk or dot,
    or several \w and dots in square brackets [].
  * ModuleSynchronous should behave like Module.
  * Module aliases (after asterisk) may contain dash, dot and slash.

There are more things to be highlighted, but nothing critical.
Seems like a good work.

Regards,
Mikhael.

---

From: "Rob 'Feztaa' Park" <[email-masked]>
Date: Tue, 09 Jul 2002 08:47:47 -0600

> You are right, I didn't though I already have one fvwm.vim. :)

Whew, I'm glad the problem was that simple ;)

> It is much better now.

Thanks.

>   * Module aliases (after asterisk) may contain dash, dot and slash.

These errors are to be expected, as I don't have any of these in my own
fvwmrc ;)

I'm looking at some of the config files from fvwm-themes, and everything
is slowly getting better and more accurate.

Question: For variables, can they be uppercase as well? like $C or
$[FOO]. I'm not sure on this. The manpage doesn't say they can't, but as
far as I can see, it doesn't show any that are.

> There are more things to be highlighted, but nothing critical.

Thanks, it's getting better. Just wait until it's finished ;)

-- 
Rob 'Feztaa' Park
http://members.shaw.ca/feztaa/
--
"A common trait of many of the companies that failed is that they
gave away for free or at a loss the very thing they produced that
was of greatest value - in the hope they'd somehow make money selling
something else."
    -- Microsoft, presumably not referring to Internet Explorer.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Rob 'Feztaa' Park" <[email-masked]>
Date: Tue, 09 Jul 2002 08:58:07 -0600

>   * Module aliases (after asterisk) may contain dash, dot and slash.

You mean the config stuff, like '*FvwmPager:'?

"...and scantily clad females, of course.  Who cares if it's below zero
outside"
(By Linus Torvalds)

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 9 Jul 2002 15:04:08 +0000

> is slowly getting better and more accurate.

Run `fvwm-themes-config -e >a_good_huge_test_for_vim.fvwmrc`.

> far as I can see, it doesn't show any that are.

Our own variables may be lower-cased only, shell variables may be
in any case.

Escaping of backslash, dollar, hash, quotes and others is not easily
simulated. Another problem is that different commands may parse their
arguments using different rules.

> You mean the config stuff, like '*FvwmPager:'?

Yes, "*FvwmPager-TheLeftOne: ".

Regards,
Mikhael.

---

From: "Rob 'Feztaa' Park" <[email-masked]>
Date: Tue, 09 Jul 2002 19:49:01 -0600

> Run `fvwm-themes-config -e >a_good_huge_test_for_vim.fvwmrc`.

Nah, I don't actually want to /install/ fvwm-themes, so I just
concatenated all of the config files that come with it.

> Our own variables may be lower-cased only, shell variables may be

Highlighting shell variables sort of defeats the purpose of only
allowing one-letter variables, and bracketed variables. 

For now I think I'll only highlight Fvwm variables, not shell ones.
Maybe I'll work out something in later versions.

> arguments using different rules.

Hopefully I'll be able to rig up something that works.

> Yes, "*FvwmPager-TheLeftOne: ".

Ok, fixed. I haven't had a chance to look at the entire fvwm-themes
config (it's 15474 lines), but so far it seems to look pretty good. More
things need highlighting, but the stuff that is highlighted looks great.

Are you a turtle?

---

From: "Rob 'Feztaa' Park" <[email-masked]>
Date: Thu, 11 Jul 2002 22:57:53 -0600

> http://members.shaw.ca/feztaa/fvwm.vim

New version now available. Most problems that were found have been
fixed; lots of new stuff still needs to be added (I want to get it to
highlight the BugOpts options, for example). Anyway, enjoy ;)

I never vote for anyone.  I always vote against.
		-- W.C. Fields