Thursday, July 29, 2010

Re: ksh93 Syntax highlighting

On 2010-07-29, jayemce wrote:

> On Jun 8, 6:29 pm, Gary Johnson <garyj...@spocom.com> wrote:
> > On 2010-06-08, jayemce wrote:
> > > Hello,
> >
> > > I would like to make syntax highlighting work with ksh93.
> > > The syntax highlighting works fine for ksh88, bash, C, perl, etc, but
> > > I am unable to make it work with ksh93.
> > > Does anyone have an idea.
> >
> > No, since no one knows what you mean by "unable to make it work".
> > Do you see no syntax highlighting at all with one or more of your
> > ksh93 files or does the highlighting appear to be incorrect for some
> > ksh syntax that is valid in ksh93 but not in ksh88?
> >
> > > These are the installed packages:
> > > # rpm -qa | grep ^vim
> > > vim-common-6.3-1
> > > vim-enhanced-6.3-1
> >
> > This is a very old version of vim.  The current version is 7.2.442
> > and 7.3 is about to be released.  You should try to obtain a more
> > recent version.  That may even solve the problem you are seeing.

> Hello Gary,
>
> I installed the latest version of VIM. The problem persists. To test,
> please create a ksh93 script with the following content:
>
> #!/bin/ksh93
> [[ 0 == 0 ]] && print -- OK
> exit 0
>
> Then use vim with syntax highlighting.
> As you'll see, syntax highlighting is not working.
>
> Now, how can I use syntax highlighting with ksh93?
> That is my question.
>
> I managed to use the ksh88 syntax highlighting, but it is not 100%
> correct with ksh93 since the shell language syntax has undergone
> several changes.
>
> Thank you for your help.

Thank you for the example. Syntax coloring is "working" for me in
the sense that I see colors, but the color of "[[" and "]]" seems
odd, the arguments to "print" aren't colored as they are if you
change "print" to "echo", and I would have expected "&&" to have
some color, but that seems inconsistent in the little bit of
experimenting that I did.

In any case, the top of $VIMRUNTIME/syntax/sh.vim shows that this
syntax highlighting script is maintained by Chip Campbell, who reads
this list regularly. I would expect some comment on this thread
from him by the end of today. If he doesn't see and reply to this,
then I would send your question to him directly at the address in
that file.

Regards,
Gary

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: