Error with syntax highlighting patch

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Error with syntax highlighting patch

Gautam Iyer
Bram Wrote:

> Yes, there is something special in the spell code.  Could use this for
> the syntax highlighting too.  Try this patch and look out for things
> that go wrong:

Ok so I noticed one thing wrong:

    :hi search ctermfg=white ctermbg=darkcyan
    /.

Now all search highlighted text apears with a darkcyan background and a
TRANSPARENT (i.e. syntax color) foreground. I think it might be more
usefull to have syntax color ONLY if ctermfg=NONE. Otherwise, use the
correct ctermfg :)

Will report any other errors if I see them :)

Gautam

PS: I haven't checked anything on the GUI yet.
 
--
There are only three types of computer users:
    1. Those that use Linux.
    2. Those who wish they use Linux.
    3. Those who don't know any better.
Reply | Threaded
Open this post in threaded view
|

a few bugs with gvim-7.

Gautam Iyer
Ok, so I *finally* loaded the gui version of vim and found the following
bugs with syntax highlighting:

    1. The guisp only seems to work with gui=undercurl and not with
       gui=underline (the undercurl gives a nice MS Word look ... but
       since I hate MS, I tried to repalce it with underline naturally
       and found the above error).

    2. Load up the GUI and type

            hi visual guifg=none guibg=#0000af

       Now load a file with spell errors (like syntx.txt from the help).
       In visual mode some extra punctuation gets marked as a spell
       error! (For instance line 3960 -- normally only the word cterm is
       marked as a spell error. HOwever in visual mode cterm AND the
       following quote, but not the preceding quote, is marked as a
       spell error)

    3. (unrelated) Ctrl-W works differently in gvim7 command line. In a
       buffer in insert mode, ctrl-w deletes a word. But in gvim in the
       command line ctrl-W deletes a blank delimited word. (I know in
       vim6.3.x ctrl-W deletes a word in command line, but have not yet
       compiled the GUI on this computer so don't know what the GUI
       does).

I'm using vim7 from CVS from yesterday with the two syntax patches you
sent out earlyer Bram. Will let you know if I see any other errors :)

GI

--
Error: Keyboard not attached. Press F1 to continue.
Reply | Threaded
Open this post in threaded view
|

Re: a few bugs with gvim-7.

Bram Moolenaar

Gautam Iyer wrote:

> Ok, so I *finally* loaded the gui version of vim and found the following
> bugs with syntax highlighting:
>
>     1. The guisp only seems to work with gui=undercurl and not with
>        gui=underline (the undercurl gives a nice MS Word look ... but
>        since I hate MS, I tried to repalce it with underline naturally
>        and found the above error).

That's right, underline didn't change, it uses the guifg color.  Perhaps
we can use another attribute for underlining with the guisp color.
Can't think of a good name right now.

>     2. Load up the GUI and type
>
>    hi visual guifg=none guibg=#0000af
>
>        Now load a file with spell errors (like syntx.txt from the help).
>        In visual mode some extra punctuation gets marked as a spell
>        error! (For instance line 3960 -- normally only the word cterm is
>        marked as a spell error. HOwever in visual mode cterm AND the
>        following quote, but not the preceding quote, is marked as a
>        spell error)

I see the problem.  Goes in the todo list.

>     3. (unrelated) Ctrl-W works differently in gvim7 command line. In a
>        buffer in insert mode, ctrl-w deletes a word. But in gvim in the
>        command line ctrl-W deletes a blank delimited word. (I know in
>        vim6.3.x ctrl-W deletes a word in command line, but have not yet
>        compiled the GUI on this computer so don't know what the GUI
>        does).

I don't think this changed from previous versions.  It's very well
possible that CTRL-W works different on the command line compared to
Insert mode.

--
How To Keep A Healthy Level Of Insanity:
18. When leaving the zoo, start running towards the parking lot,
    yelling "run for your lives, they're loose!!"

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\     Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html   ///
Reply | Threaded
Open this post in threaded view
|

Re: a few bugs with gvim-7.

Gautam Iyer
On Fri, Jun 03, 2005 at 12:15:32PM +0200, Bram Moolenaar wrote:

> > Ok, so I *finally* loaded the gui version of vim and found the following
> > bugs with syntax highlighting:
> >
> >     1. The guisp only seems to work with gui=undercurl and not with
> >        gui=underline (the undercurl gives a nice MS Word look ... but
> >        since I hate MS, I tried to repalce it with underline naturally
> >        and found the above error).
>
> That's right, underline didn't change, it uses the guifg color.
> Perhaps we can use another attribute for underlining with the guisp
> color. Can't think of a good name right now.

Why not use guisp? I don't think anyone will want to use BOTH underline
and undercurl will they? Anyway, if you do plan on using a different
name, might I suggest 'guiuc' (for undercurl) and 'guiul' for underline
:)

Gautam

--
'Vinylocity' -- The strange atmospheric force that makes the shower
curtain blow towards you while trying to shower.
Reply | Threaded
Open this post in threaded view
|

Re: a few bugs with gvim-7.

Bram Moolenaar

Gautam Iyer wrote:

> On Fri, Jun 03, 2005 at 12:15:32PM +0200, Bram Moolenaar wrote:
>
> > > Ok, so I *finally* loaded the gui version of vim and found the following
> > > bugs with syntax highlighting:
> > >
> > >     1. The guisp only seems to work with gui=undercurl and not with
> > >        gui=underline (the undercurl gives a nice MS Word look ... but
> > >        since I hate MS, I tried to repalce it with underline naturally
> > >        and found the above error).
> >
> > That's right, underline didn't change, it uses the guifg color.
> > Perhaps we can use another attribute for underlining with the guisp
> > color. Can't think of a good name right now.
>
> Why not use guisp? I don't think anyone will want to use BOTH underline
> and undercurl will they?

I think there are people who do.  You can use underline for syntax
highlighting.  Then undercurl is still available for badly spelled
words on top of that.  If you don't want to use undercurl, then perhaps
overwriting the underline in a different color would be OK.

If we would use guisp for underline then there would at least be the
fallback that when it's not set guifg must be used, otherwise it's not
backward compatible.  And then when there is a spell error an existing
underline would suddenly change color when the undercurl appears.

> Anyway, if you do plan on using a different name, might I suggest
> 'guiuc' (for undercurl) and 'guiul' for underline :)

I was thinking of another name for "underline" that does use the guisp
color.  I don't really want to add more color arguments, it's a bit
bulky in the code.

--
The startling truth finally became apparent, and it was this: Numbers
written on restaurant checks within the confines of restaurants do not follow
the same mathematical laws as numbers written on any other pieces of paper in
any other parts of the Universe.  This single statement took the scientific
world by storm.  So many mathematical conferences got held in such good
restaurants that many of the finest minds of a generation died of obesity and
heart failure, and the science of mathematics was put back by years.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\     Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html   ///
Reply | Threaded
Open this post in threaded view
|

Re: a few bugs with gvim-7.

Gautam Iyer
In reply to this post by Bram Moolenaar
On Fri, Jun 03, 2005 at 12:15:32PM +0200, Bram Moolenaar wrote:

> > (unrelated) Ctrl-W works differently in gvim7 command line. In a
> > buffer in insert mode, ctrl-w deletes a word. But in gvim in the
> > command line ctrl-W deletes a blank delimited word. (I know in
> > vim6.3.x ctrl-W deletes a word in command line, but have not yet
> > compiled the GUI on this computer so don't know what the GUI does).
>
> I don't think this changed from previous versions.  It's very well
> possible that CTRL-W works different on the command line compared to
> Insert mode.

Ok. I messed up on this one. However I now have another problem -- I
find that pressing Ctrl-W in the command line deletes a word as defined
by iskeyword from the current buffer. (Everytime I tried in gvim7, I was
viewing a help file, hence blank delmited words got deleted on pressing
Ctrl-W).

I'm wondering if the above is what was intended or not. To me it seems
more intuitive if Ctrl-W worked the same always (as opposed to deleting
too much when viewing a help file). But ofcourse you and others might
feel differently ... :)

GI

--
Alternative definitions of terms from Math Lectures:
TRIVIAL: If I have to show you how to do this, you're in the wrong
class.