Loading ...
Sorry, an error occurred while loading the content.

Re: Set different highlighting for Search versus current quickfix error

Expand Messages
  • Tony Mechelynck
    ... hm, yes, that would also work; but usually I prefer not to meddle with a syntax script if the syntax analysis is OK but the choice of colours is not to my
    Message 1 of 12 , Sep 5, 2013
      On 05/09/13 17:42, Charles Campbell wrote:
      > Tony Mechelynck wrote:
      >> On 05/09/13 01:12, Paul wrote:
      >>> On Wednesday, September 4, 2013 6:44:24 PM UTC-4, Tony Mechelynck wrote:
      >>>> On 04/09/13 23:51, Paul wrote:
      >>>>> The GUI highlighting for the current quickfix item seems to be the
      >>>>> same as whatever I set the Search group to. Is there a way to have
      >>>>> a different guibg color?
      >>>> ...With me it doesn't: I just did a :helpgrep, and the current quickfix
      >>>> item didn't get _any_ highlighting: with the cursor on it,
      >>>> :echomsg synIDattr(synID(line("."),col("."),0),"name")
      >>>> synIDattr(synIDtrans(synID(line("."),col("."),0)),"name")
      >>>> synIDattr(synID(line("."),col("."),1),"name")
      >>>> synIDattr(synIDtrans(synID(line("."),col("."),1)),"name")
      >>>> ...didn't display anything. Or if it did, it was because there was
      >>>> some highlighted syntax item (such as between |bars|) just under the
      >>>> cursor.
      >>>> I'm using gvim 7.4.16 (Huge) with GTK2/GNOME2 GUI.
      >>> I'm using vim 7.3 on Windows 7. When I issue:
      >>> :echomsg synIDattr(synID(line("."),col("."),0),"name")
      >>> :echomsg synIDattr(synIDtrans(synID(line("."),col("."),0)),"name")
      >>> :echomsg synIDattr(synID(line("."),col("."),1),"name")
      >>> :echomsg synIDattr(synIDtrans(synID(line("."),col("."),1)),"name")
      >>> I get:
      >>> qfFileName
      >>> Directory
      >>> qfFileName
      >>> Directory
      >>> It's interesting that you don't see the current quickfix item
      >>> highlighted. I thought that maybe I set something to turn on
      >>> quickfix highlighting, but I can't seem to find the switch. I
      >>> searched the web and the quickfix help to see if quickfix is
      >>> *suppose* to highlight the current item by default, but didn't find
      >>> indications of that either.
      >> I get the same as you do if I do :copen first. What I referred to was
      >> the current quickfix item as found _in the text_ by :cnext, with no
      >> quickfix window actually open.
      >> I see this item as blue on white, and doing ":verbose hi qfFileName"
      >> in the quickfix window gives
      >> qfFileName xxx links to Directory
      >> Last set from /usr/local/share/vim/vim74/syntax/qf.vim
      >> The Search highlight, OTOH, is black on yellow. Not at all the same
      >> thing for me, which makes me ask: Which colorscheme are you using?
      >> To link qfFileName to something else, or to define specific colours
      >> for it, just use a new or modified colorscheme.
      >> To modify a colorscheme, first copy it to ~/.vim/colors/ (for *x
      >> systems) or to ~/vimfiles/colors (for Windows), change its name, and
      >> modify it there (including setting g:colors_name to the new name);
      >> then alter the calling line so that it calls the new name. It is not
      >> possible to invoke colorschemes recursively (or at least, I tried and
      >> didn't succeed).
      > Sorry, Tony -- I need to differ with you on this.
      > syntax/qf.vim is a syntax file; it is not a colorscheme, and it is
      > unnecessary to modify or alter any colorschemes.
      > Instead, if you wish to override qfFileName, etc, put your alterations into
      > $HOME/after/syntax/qf.vim
      > Therein, you may put things such as
      > hi link qfFileName Special
      > hi qfSeparator guifg=SeaGreen1 guibg=orange3
      > Doing so will override syntax/qf.vim's selection of default colors.
      > Regards,
      > Chip Campbell
      hm, yes, that would also work; but usually I prefer not to meddle with a
      syntax script if the syntax analysis is OK but the choice of colours is
      not to my taste. A colour scheme can change the colours any which way,
      it may replace yellow by pink in one highlight group, remove a highlight
      link in one place, add one in another placeā€¦ Anything that involves only
      colours can be done by a colorscheme, provided that the different
      colours you want to set belong to different highlight groups, at least
      before taking highlight links into account.

      I already have my own ~/.vim/colors/almost-default.vim (which sets only
      the colours which I want different from the default) so for me it is
      easy to tweak this or that highlight definition by putting all colour
      changes in this one place.

      Best regards,
      `Lasu' Releases SAG 0.3 -- Freeware Book Takes Paves For New World Order
      by staff writers

      The SAG is one of the major products developed via the Information
      Superhighway, the brain child of Al Gore, US Vice President. The ISHW
      is being developed with massive govenment funding, since studies show
      that it already has more than four hundred users, three years before
      the first prototypes are ready. Asked whether he was worried about the
      foreign influence in an expensive American Dream, the vice president
      said, ``Finland? Oh, we've already bought them, but we haven't told
      anyone yet. They're great at building model airplanes as well. And _ I
      can spell potato.'' House representatives are not mollified, however,
      wanting to see the terms of the deal first, fearing another Alaska.
      Rumors about the SAG release have imbalanced the American stock
      market for weeks. Several major publishing houses reached an all time
      low in the New York Stock Exchange, while publicly competing for the
      publishing agreement with Mr. Wirzenius. The negotiations did not work
      out, tough. ``Not enough dough,'' says the author, although spokesmen
      at both Prentice-Hall and Playboy, Inc., claim the author was incapable
      of expressing his wishes in a coherent form during face to face talks,
      preferring to communicate via e-mail. ``He kept muttering something
      about jiffies and pegs,'' they say.
      -- Lars Wirzenius <wirzeniu@...>

      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

      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.