Fwd: Vim syntax (variables)

15 views
Skip to first unread message

D. Ben Knoble

unread,
May 26, 2020, 11:44:56 AM5/26/20
to vim...@vim.org
All,

I sent the following message to Dr. Chip RE: vim syntax files, and it
bounced back; do we know if there's a more current contact for him
(and whether or not he's ok)?

D. Ben Knoble



---------- Forwarded message ---------
From: D. Ben Knoble <ben.k...@gmail.com>
Date: Tue, May 26, 2020 at 11:13 AM
Subject: Vim syntax (variables)
To: <drc...@campbellfamily.biz>


Chip,

I've got a suggestion for the vim syntax files that you maintain.
(I'll attach a patch.)

There are a couple of places I've spotted where certain kinds of
variables, namely environment variables of the form $PATH or ${PATH},
are not highlighted—and yet in others, they are.

The following patch *seems* to enable highlighting after the :let and
:if keywords; let me know what you think.

Best,
D. Ben Knoble
vim-syntax.patch

Charles Campbell

unread,
May 26, 2020, 11:57:14 AM5/26/20
to vim...@googlegroups.com
Hello:

I don't know how my old (as in no longer active) email address remained
in syntax/vim.vim, because I updated all of the syntax files with my new
address. I just sent an updated syntax/vim.vim to Bram  with the correct
email address. Just look at any of the other syntax files I maintain
(tex.vim, etc) and you'll get the correct email address.

That said, your attachment looks pretty short -- I'll look it over,
apply it, and run it through my test files.

Chip Campbell

D. Ben Knoble

unread,
May 26, 2020, 2:25:10 PM5/26/20
to vim...@googlegroups.com
Thanks for correcting the email (I searched your site for ages trying
to find a different one, but didn't look in the other vim files).

I'll grant your example highlights according to my expectations, but
this one doesn't (in either the :if or the :let):

function F()
if $HOME =~ "^/home"
echo "GOT HERE#1"
else
echo "GOT HERE#2"
endif
let $HOME = "/some/home"
endfunction

It seems the function body impedes the other rules (??).

Best,
D. Ben Knoble
Reply all
Reply to author
Forward
0 new messages