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

Changing colors in netrw?

Expand Messages
  • François Ingelrest
    Hi all, Is there a way to configure colors used by netrw? For instance, executable files are displayed using the same color as directories, except that they
    Message 1 of 5 , Jul 2, 2008
    • 0 Attachment
      Hi all,

      Is there a way to configure colors used by netrw?

      For instance, executable files are displayed using the same color as
      directories, except that they have a star close to them. I would like
      to change such colors, if possible.

      --
      François INGELREST
      LCAV, I&C school
      BC 364, EPFL
      CH-1015 Lausanne, Switzerland

      Tel. : +41 (0)21 693 12 81
      E-Mail: Francois.Ingelrest@...
      WWW : http://fingelrest.silent-blade.org

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Charles E Campbell Jr
      ... Executable files (those shown with a trailing *) are shown in the netrwExe- PreProc highlighting group, and directories are shown using the
      Message 2 of 5 , Jul 2, 2008
      • 0 Attachment
        François Ingelrest wrote:
        > Hi all,
        >
        > Is there a way to configure colors used by netrw?
        >
        > For instance, executable files are displayed using the same color as
        > directories, except that they have a star close to them. I would like
        > to change such colors, if possible.
        >
        >

        Executable files (those shown with a trailing *) are shown in the
        "netrwExe->PreProc" highlighting group, and directories are shown using
        the "netrwDir->Directory" highlighting group. You may change them by
        specifying them as you wish in a .vim/after/syntax/netrw.vim file. Example:

        hi link netrwExe Statement

        As a bonus, if you have

        let g:netrw_special_syntax= 1

        you'll get additional highlighting of *.bak, *.gz, etc groups (see
        :help g:netrw_special_syntax).

        These comments are predicated on the use of netrw v125 or v126[a-e];
        v126e is available from my website as

        http://mysite.verizon.net/astronaut/vim/index.html#NETRW

        Both of these versions require a vim that has fnameescape() and
        shellescape() -- ie. vim 7.2a will do.

        Regards,
        Chip Campbell


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • François Ingelrest
        On Wed, Jul 2, 2008 at 16:54, Charles E Campbell Jr ... Thanks for your help ! --~--~---------~--~----~------------~-------~--~----~ You received this message
        Message 3 of 5 , Jul 2, 2008
        • 0 Attachment
          On Wed, Jul 2, 2008 at 16:54, Charles E Campbell Jr
          <drchip@...> wrote:
          > Executable files (those shown with a trailing *) are shown in the
          > "netrwExe->PreProc" highlighting group, and directories are shown using
          > the "netrwDir->Directory" highlighting group. You may change them by
          > specifying them as you wish in a .vim/after/syntax/netrw.vim file. Example:
          >
          > hi link netrwExe Statement
          >
          > As a bonus, if you have
          >
          > let g:netrw_special_syntax= 1
          >
          > you'll get additional highlighting of *.bak, *.gz, etc groups (see
          > :help g:netrw_special_syntax).
          >
          > These comments are predicated on the use of netrw v125 or v126[a-e];
          > v126e is available from my website as
          >
          > http://mysite.verizon.net/astronaut/vim/index.html#NETRW
          >
          > Both of these versions require a vim that has fnameescape() and
          > shellescape() -- ie. vim 7.2a will do.

          Thanks for your help !

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • François Ingelrest
          Hi, On Wed, Jul 2, 2008 at 16:54, Charles E Campbell Jr ... I have another question. I ve tried to set up some links in my .vimrc, like this: highlight link
          Message 4 of 5 , Jul 6, 2008
          • 0 Attachment
            Hi,

            On Wed, Jul 2, 2008 at 16:54, Charles E Campbell Jr
            <drchip@...> wrote:
            > Executable files (those shown with a trailing *) are shown in the
            > "netrwExe->PreProc" highlighting group, and directories are shown using
            > the "netrwDir->Directory" highlighting group. You may change them by
            > specifying them as you wish in a .vim/after/syntax/netrw.vim file. Example:
            >
            > hi link netrwExe Statement
            >
            > As a bonus, if you have
            >
            > let g:netrw_special_syntax= 1
            >
            > you'll get additional highlighting of *.bak, *.gz, etc groups (see
            > :help g:netrw_special_syntax).
            >
            > These comments are predicated on the use of netrw v125 or v126[a-e];
            > v126e is available from my website as
            >
            > http://mysite.verizon.net/astronaut/vim/index.html#NETRW
            >
            > Both of these versions require a vim that has fnameescape() and
            > shellescape() -- ie. vim 7.2a will do.

            I have another question. I've tried to set up some links in my .vimrc,
            like this:

            highlight link netrwVersion Comment

            I know the preferred way would be to put this line in
            .vim/after/syntax/netrw.vim file, but my .vimrc is small enough to
            contain everything I need. Actually, putting this line in .vimrc does
            not work, because (from what I understood) netrw does not use the
            "default" keyword when setting the default value. From :h hi:

            Using [default] is especially useful to overrule the highlighting of a
            specific syntax file. For example, the C syntax file contains:
            :highlight default link cComment Comment
            If you like Question highlighting for C comments, put this in your vimrc file:
            :highlight link cComment Question
            Without the "default" in the C syntax file, the highlighting would be
            overruled when the syntax file is loaded.

            Would it be possible to add that keyword?

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • François Ingelrest
            Hi, On Sun, Jul 6, 2008 at 09:37, François Ingelrest ... This is just to know whether this is possible. This does not seem too complicated and would help for
            Message 5 of 5 , Aug 12, 2008
            • 0 Attachment
              Hi,

              On Sun, Jul 6, 2008 at 09:37, François Ingelrest
              <francois.ingelrest@...> wrote:
              > I have another question. I've tried to set up some links in my .vimrc,
              > like this:
              >
              > highlight link netrwVersion Comment
              >
              > I know the preferred way would be to put this line in
              > .vim/after/syntax/netrw.vim file, but my .vimrc is small enough to
              > contain everything I need. Actually, putting this line in .vimrc does
              > not work, because (from what I understood) netrw does not use the
              > "default" keyword when setting the default value. From :h hi:
              >
              > Using [default] is especially useful to overrule the highlighting of a
              > specific syntax file. For example, the C syntax file contains:
              > :highlight default link cComment Comment
              > If you like Question highlighting for C comments, put this in your vimrc file:
              > :highlight link cComment Question
              > Without the "default" in the C syntax file, the highlighting would be
              > overruled when the syntax file is loaded.
              >
              > Would it be possible to add that keyword?

              This is just to know whether this is possible. This does not seem too
              complicated and would help for integration.

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            Your message has been successfully submitted and would be delivered to recipients shortly.