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

:colorscheme (was: Vim version 6.0ad ALPHA available) [patch]

Expand Messages
  • Bram Moolenaar
    ... It is just a Vim script with highlight commands. Yes, you could use :runtime just as well. The :colorscheme command knows that the colors
    Message 1 of 12 , Apr 30, 2001
    • 0 Attachment
      Paul Moore wrote:

      > From: Bram Moolenaar [mailto:Bram@...]
      > > It's now much easier to switch to another color scheme. If
      > > you have a nice color setup, try creating a color scheme and
      > > send it to the maillist. I intend to add a number of them
      > > in the distribution. ":help colorscheme".
      >
      > The only help is for :colorscheme (with the colon), which doesn't explain
      > much. What is the format of a colour scheme file? If it's just Vim commands
      > to be sourced, where's the advantage over :runtime colors/whatever.vim?

      It is just a Vim script with highlight commands. Yes, you could use
      ":runtime" just as well. The ":colorscheme" command knows that the "colors"
      subdirectory is used, that's all.

      > The idea sounds good - an example to start from would be nice...

      I forgot to include the files in the archive. Sorry! I'll add them below.
      Perhaps someone can make the "midnight" and "noon" schemes. :-)

      Oh, you also need some stuff to install them. Apply the following patch to
      src/Makefile:

      -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      *** src/Makefile~ Mon Apr 30 12:22:42 2001
      --- src/Makefile Mon Apr 30 13:02:46 2001
      ***************
      *** 794,799 ****
      --- 794,800 ----
      VIMDIR = /vim
      VIMRTDIR = /vim60ad
      HELPSUBDIR = /doc
      + COLSUBDIR = /colors
      SYNSUBDIR = /syntax
      INDSUBDIR = /indent
      PLUGSUBDIR = /plugin
      ***************
      *** 810,815 ****
      --- 811,817 ----
      ### VIMRCLOC compiled-in location for global [g]vimrc files (all versions)
      ### VIMRUNTIMEDIR compiled-in location for runtime files (optional)
      ### HELPSUBLOC location for help files
      + ### COLSUBLOC location for colorscheme files
      ### SYNSUBLOC location for syntax files
      ### INDSUBLOC location for indent files
      ### PLUGSUBLOC location for standard plugin files
      ***************
      *** 826,831 ****
      --- 828,834 ----
      VIMRTLOC = $(DATADIR)$(VIMDIR)$(VIMRTDIR)
      VIMRCLOC = $(VIMLOC)
      HELPSUBLOC = $(VIMRTLOC)$(HELPSUBDIR)
      + COLSUBLOC = $(VIMRTLOC)$(COLSUBDIR)
      SYNSUBLOC = $(VIMRTLOC)$(SYNSUBDIR)
      INDSUBLOC = $(VIMRTLOC)$(INDSUBDIR)
      PLUGSUBLOC = $(VIMRTLOC)$(PLUGSUBDIR)
      ***************
      *** 851,858 ****
      #HELPENDLOC = /usr/doc/vim
      SYNTAXENDLOC = $(SYNSUBLOC)
      #SYNTAXENDLOC = /usr/lib/vim/syntax
      - INDENTENDLOC = $(INDSUBLOC)
      - #INDENTENDLOC = /usr/lib/vim/indent
      PLUGINFTENDLOC = $(PLUGSUBLOC)
      #PLUGINFTENDLOC = /usr/lib/vim/plugin
      FTPLUGINFTENDLOC = $(FTPLUGSUBLOC)
      --- 854,859 ----
      ***************
      *** 937,942 ****
      --- 938,946 ----
      # Where to copy the script files from (menu, bugreport)
      SCRIPTSOURCE = ../runtime

      + # Where to copy the colorscheme files from
      + COLSOURCE = ../runtime/colors
      +
      # Where to copy the syntax files from
      SYNSOURCE = ../runtime/syntax

      ***************
      *** 1504,1511 ****

      # install the help files; first adjust the contents for the location
      installruntime: $(HELPSOURCE)/vim.1 $(MANSUBDIR) $(VIMLOC) $(VIMRTLOC) \
      ! $(HELPSUBLOC) $(SYNSUBLOC) $(INDSUBLOC) $(FTPLUGSUBLOC) \
      ! $(PLUGSUBLOC) $(TUTORSUBLOC)
      @echo generating $(MANSUBDIR)/$(VIMNAME).1
      @sed -e s+/usr/local/lib/vim+$(VIMLOC)+ \
      -e s+$(VIMLOC)/doc+$(HELPENDLOC)+ \
      --- 1508,1515 ----

      # install the help files; first adjust the contents for the location
      installruntime: $(HELPSOURCE)/vim.1 $(MANSUBDIR) $(VIMLOC) $(VIMRTLOC) \
      ! $(HELPSUBLOC) $(COLSUBLOC) $(SYNSUBLOC) $(INDSUBLOC) \
      ! $(FTPLUGSUBLOC) $(PLUGSUBLOC) $(TUTORSUBLOC)
      @echo generating $(MANSUBDIR)/$(VIMNAME).1
      @sed -e s+/usr/local/lib/vim+$(VIMLOC)+ \
      -e s+$(VIMLOC)/doc+$(HELPENDLOC)+ \
      ***************
      *** 1569,1574 ****
      --- 1573,1581 ----
      chmod $(VIMSCRIPTMOD) $(SYS_INDOFF_FILE)
      $(INSTALL_DATA) $(SCRIPTSOURCE)/optwin.vim $(SYS_OPTWIN_FILE)
      chmod $(VIMSCRIPTMOD) $(SYS_OPTWIN_FILE)
      + # install the colorscheme files
      + cd $(COLSOURCE); $(INSTALL_DATA) *.vim $(COLSUBLOC)
      + cd $(COLSUBLOC); chmod $(HELPMOD) *.vim
      # install the syntax files
      cd $(SYNSOURCE); $(INSTALL_DATA) *.vim README.txt $(SYNSUBLOC)
      cd $(SYNSUBLOC); chmod $(HELPMOD) *.vim README.txt
      ***************
      *** 1633,1640 ****
      test -f error

      $(exec_prefix) $(BINDIR) $(MANSUBDIR) $(VIMLOC) $(VIMRTLOC) $(HELPSUBLOC) \
      ! $(SYNSUBLOC) $(INDSUBLOC) $(FTPLUGSUBLOC) $(LANGSUBLOC) \
      ! $(KMAPSUBLOC) \
      $(MACROSUBLOC) $(TOOLSSUBLOC) $(TUTORSUBLOC) $(PLUGSUBLOC):
      -$(SHELL) ./mkinstalldirs $@
      -chmod $(DIRMOD) $@
      --- 1640,1647 ----
      test -f error

      $(exec_prefix) $(BINDIR) $(MANSUBDIR) $(VIMLOC) $(VIMRTLOC) $(HELPSUBLOC) \
      ! $(COLSUBLOC) $(SYNSUBLOC) $(INDSUBLOC) $(FTPLUGSUBLOC) \
      ! $(LANGSUBLOC) $(KMAPSUBLOC) \
      $(MACROSUBLOC) $(TOOLSSUBLOC) $(TUTORSUBLOC) $(PLUGSUBLOC):
      -$(SHELL) ./mkinstalldirs $@
      -chmod $(DIRMOD) $@
      ***************
      *** 1764,1776 ****
      -rm -f $(SYS_INDOFF_FILE) $(SYS_INDENT_FILE)
      -rm -f $(SYS_FTPLUGOF_FILE) $(SYS_FTPLUGIN_FILE)
      -rm -f $(SYS_OPTWIN_FILE)
      -rm -f $(SYNSUBLOC)/*.vim $(SYNSUBLOC)/README.txt $(INDSUBLOC)/*.vim
      -rm -rf $(MACROSUBLOC)
      -rm -rf $(TUTORSUBLOC)
      -rm -rf $(TOOLSSUBLOC)
      -rm -rf $(LANGSUBLOC)
      -rm -rf $(KMAPSUBLOC)
      ! -rmdir $(HELPSUBLOC) $(SYNSUBLOC) $(INDSUBLOC)
      -rm -rf $(FTPLUGSUBLOC)/*.vim $(FTPLUGSUBLOC)/README.txt
      -rm -f $(PLUGSUBLOC)/*.vim $(PLUGSUBLOC)/README.txt
      -rmdir $(FTPLUGSUBLOC) $(PLUGSUBLOC) $(VIMRTLOC)
      --- 1771,1784 ----
      -rm -f $(SYS_INDOFF_FILE) $(SYS_INDENT_FILE)
      -rm -f $(SYS_FTPLUGOF_FILE) $(SYS_FTPLUGIN_FILE)
      -rm -f $(SYS_OPTWIN_FILE)
      + -rm -f $(COLSUBLOC)/*.vim
      -rm -f $(SYNSUBLOC)/*.vim $(SYNSUBLOC)/README.txt $(INDSUBLOC)/*.vim
      -rm -rf $(MACROSUBLOC)
      -rm -rf $(TUTORSUBLOC)
      -rm -rf $(TOOLSSUBLOC)
      -rm -rf $(LANGSUBLOC)
      -rm -rf $(KMAPSUBLOC)
      ! -rmdir $(HELPSUBLOC) $(COLSUBLOC) $(SYNSUBLOC) $(INDSUBLOC)
      -rm -rf $(FTPLUGSUBLOC)/*.vim $(FTPLUGSUBLOC)/README.txt
      -rm -f $(PLUGSUBLOC)/*.vim $(PLUGSUBLOC)/README.txt
      -rmdir $(FTPLUGSUBLOC) $(PLUGSUBLOC) $(VIMRTLOC)
      -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

      runtime/colors/morning.vim:
      -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      " Vim color file
      " Maintainer: Bram Moolenaar <Bram@...>
      " Last Change: 2001 Apr 29

      " This color scheme uses a light grey background.

      let colors_name = "morning"

      " First remove all existing highlighting.
      hi clear

      hi Normal ctermfg=Black ctermbg=LightGrey guifg=Black guibg=grey90
      set background=light

      " Groups used in the 'highlight' and 'guicursor' options default value.
      hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White
      hi IncSearch term=reverse cterm=reverse gui=reverse
      hi ModeMsg term=bold cterm=bold gui=bold
      hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
      hi StatusLineNC term=reverse cterm=reverse gui=reverse
      hi VertSplit term=reverse cterm=reverse gui=reverse
      hi Visual term=reverse cterm=reverse gui=reverse guifg=Grey guibg=fg
      hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
      hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
      hi Cursor guibg=Green guifg=NONE
      hi lCursor guibg=Cyan guifg=NONE
      hi Directory term=bold ctermfg=DarkBlue guifg=Blue
      hi LineNr term=underline ctermfg=Brown guifg=Brown
      hi MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen
      hi NonText term=bold ctermfg=Blue gui=bold guifg=Blue guibg=grey80
      hi Question term=standout ctermfg=DarkGreen gui=bold guifg=SeaGreen
      hi Search term=reverse ctermbg=Yellow ctermfg=NONE guibg=Yellow guifg=NONE
      hi SpecialKey term=bold ctermfg=DarkBlue guifg=Blue
      hi Title term=bold ctermfg=DarkMagenta gui=bold guifg=Magenta
      hi WarningMsg term=standout ctermfg=DarkRed guifg=Red
      hi WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black
      hi Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
      hi FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue
      hi DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue
      hi DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta
      hi DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan

      " Colors for syntax highlighting
      hi Constant term=underline ctermfg=DarkRed guifg=Magenta guibg=grey95
      hi Special term=bold ctermfg=DarkMagenta guifg=SlateBlue guibg=grey95
      if &t_Co > 8
      hi Statement term=bold cterm=bold ctermfg=Brown gui=bold guifg=Brown
      endif
      hi Ignore ctermfg=LightGrey guifg=grey90

      if exists("syntax_on")
      let syntax_cmd = "enable"
      runtime syntax/syncolor.vim
      unlet syntax_cmd
      endif

      " vim: sw=2
      -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

      runtime/colors/evening.vim:
      -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      " Vim color file
      " Maintainer: Bram Moolenaar <Bram@...>
      " Last Change: 2001 Apr 29

      " This color scheme uses a dark grey background.

      let colors_name = "evening"

      " First remove all existing highlighting.
      hi clear

      hi Normal ctermbg=DarkGrey ctermfg=White guifg=White guibg=grey20
      set background=dark

      " Groups used in the 'highlight' and 'guicursor' options default value.
      hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White
      hi IncSearch term=reverse cterm=reverse gui=reverse
      hi ModeMsg term=bold cterm=bold gui=bold
      hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
      hi StatusLineNC term=reverse cterm=reverse gui=reverse
      hi VertSplit term=reverse cterm=reverse gui=reverse
      hi Visual term=reverse cterm=reverse gui=reverse guifg=Grey guibg=fg
      hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
      hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
      hi Cursor guibg=Green guifg=Black
      hi lCursor guibg=Cyan guifg=Black
      hi Directory term=bold ctermfg=LightCyan guifg=Cyan
      hi LineNr term=underline ctermfg=Yellow guifg=Yellow
      hi MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen
      hi NonText term=bold ctermfg=LightBlue gui=bold guifg=LightBlue guibg=grey30
      hi Question term=standout ctermfg=LightGreen gui=bold guifg=Green
      hi Search term=reverse ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black
      hi SpecialKey term=bold ctermfg=LightBlue guifg=Cyan
      hi Title term=bold ctermfg=LightMagenta gui=bold guifg=Magenta
      hi WarningMsg term=standout ctermfg=LightRed guifg=Red
      hi WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black
      hi Folded term=standout ctermbg=LightGrey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
      hi FoldColumn term=standout ctermbg=LightGrey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue
      hi DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue
      hi DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta
      hi DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan

      " Groups for syntax highlighting
      hi Constant term=underline ctermfg=Magenta guifg=#ffa0a0 guibg=grey5
      hi Special term=bold ctermfg=LightRed guifg=Orange guibg=grey5
      if &t_Co > 8
      hi Statement term=bold cterm=bold ctermfg=Yellow guifg=#ffff60 gui=bold
      endif
      hi Ignore ctermfg=DarkGrey guifg=grey20

      if exists("syntax_on")
      runtime syntax/syncolor.vim
      endif

      " vim: sw=2
      -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

      --
      If your company is not involved in something called "ISO 9000" you probably
      have no idea what it is. If your company _is_ involved in ISO 9000 then you
      definitely have no idea what it is.
      (Scott Adams - The Dilbert principle)

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    • Marius Gedminas
      ... [...] ... What about runtime/colors/default.vim in case the user doesn t like these schemes and wants to go back? Or wants to copy it and make small
      Message 2 of 12 , May 1, 2001
      • 0 Attachment
        On Mon, Apr 30, 2001 at 01:40:54PM +0200, Bram Moolenaar wrote:
        > I forgot to include the files in the archive. Sorry! I'll add them below.
        > Perhaps someone can make the "midnight" and "noon" schemes. :-)
        [...]
        > runtime/colors/morning.vim:
        > runtime/colors/evening.vim:

        What about runtime/colors/default.vim in case the user doesn't like these
        schemes and wants to go back? Or wants to copy it and make small
        changes for her own color scheme.

        Marius Gedminas
        --
        Never trust a smiling Gates.
      • Matt Dunford
        ... I ve applied the script I used to convert the german po file to the other po files. I ve attached the diffs for each of them and have Cc d each of the
        Message 3 of 12 , May 1, 2001
        • 0 Attachment
          * Matt Dunford <zoot@...> [010430 16:31]:
          > * Bram Moolenaar <Bram@...> [010430 07:21]:
          > >
          > > [...] *snip*
          > >
          > > Added IDs to many error messages. They are also present as tags in the
          > > on-line help. Makes it easier to find the relevant explanation in the docs.
          > >
          > > [...] *snip*
          > >
          >
          > I've added the IDs to the error messages in po/de.po. Here's a patch.
          >

          I've applied the script I used to convert the german po file to the
          other po files. I've attached the diffs for each of them and have Cc'd
          each of the maintainers for review. Hope it helps. Here's the script I
          used:

          #!/usr/local/bin/perl -w
          # run this script in the po/ directory
          # example: perl script.pl it.po.orig it.po

          $pofile = shift; # get 1st commandline arg
          $outfile = shift; # get 2nd commandline arg

          @array = (); $i=0;
          open(IN,"../globals.h");
          while (<IN>) # extract changed error messages
          {
          chomp;
          if (!/\(e..\)/) {next}
          s/^[^"]+//;
          s/\)\);$//;

          $p2 = $_;
          s/\(e..\) //; # chop off the (e..) part
          $p1 = $_;
          $array[$i++] = "$p1 $p2"; # add both for storage
          }
          close IN;

          open(PO,$pofile);
          @lines = <PO>; $i = 0;
          while($i < $#lines)
          {
          foreach $pair (@array)
          {
          # extract the two parts
          $pair =~ /^(.*)\t(.*)$/;
          $p1 = $1; $p2 = $2;

          # escape anything that will conflict w/ our regex
          $p1 =~ s![\[\]?)(.\\]!\\$&!g;

          # extract the error number
          $p2 =~ /(\(e..\) )/;
          $err = $1;

          if ($lines[$i] =~ s/$p1/$p2/)
          {
          # if substitute is successful
          # get the next line and add err number to translation
          $lines[++$i] =~ s/^msgstr "/$&$err/;
          last; # break out of loop
          }
          }
          $i++;
          }
          close PO;

          open(OUT,">$outfile");
          foreach (@lines) {print OUT}
          close OUT;
        • Bram Moolenaar
          ... Good point. I ll make a default.vim. -- hundred-and-one symptoms of being an internet addict: 18. Your wife drapes a blond wig over your monitor to remind
          Message 4 of 12 , May 1, 2001
          • 0 Attachment
            Marius Gedminas wrote:

            > On Mon, Apr 30, 2001 at 01:40:54PM +0200, Bram Moolenaar wrote:
            > > I forgot to include the files in the archive. Sorry! I'll add them below.
            > > Perhaps someone can make the "midnight" and "noon" schemes. :-)
            > [...]
            > > runtime/colors/morning.vim:
            > > runtime/colors/evening.vim:
            >
            > What about runtime/colors/default.vim in case the user doesn't like these
            > schemes and wants to go back? Or wants to copy it and make small
            > changes for her own color scheme.

            Good point. I'll make a default.vim.

            --
            hundred-and-one symptoms of being an internet addict:
            18. Your wife drapes a blond wig over your monitor to remind you of what she
            looks like.

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
            \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
          • Nazri Ramliy
            ... Having wildchar= and doing ... Doesn t seem to do the completion as I d expect it to. (:so $VIM/ works fine, that is, it expands $VIM to
            Message 5 of 12 , May 2, 2001
            • 0 Attachment
              On Sun, Apr 29, 2001 at 10:50:14PM +0200, Bram Moolenaar wrote:
              > major changes
              > -------------
              >
              > support for loading a color scheme. added the ":colorscheme" command.
              > automatically add menu entries for available schemes.
              > should now properly reset the colors when 'background' or 't_co' is changed.

              Having wildchar=<Tab>
              and doing

              :colo $VIM/<tab>

              Doesn't seem to do the completion as I'd expect it to.
              (:so $VIM/<tab> works fine, that is, it expands $VIM to /usr/share/vim/vim60ad)

              --
              Nazri
            • Nazri Ramliy
              ... Ignore this message, I should read :he colorscheme better next time ;)
              Message 6 of 12 , May 2, 2001
              • 0 Attachment
                On Wed, May 02, 2001 at 09:52:03PM +0800, Nazri Ramliy wrote:
                > Having wildchar=<Tab>
                > and doing
                >
                > :colo $VIM/<tab>
                >
                > Doesn't seem to do the completion as I'd expect it to.
                > (:so $VIM/<tab> works fine, that is, it expands $VIM to /usr/share/vim/vim60ad)

                Ignore this message, I should read :he colorscheme better next time ;)
              Your message has been successfully submitted and would be delivered to recipients shortly.