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

Re: Use terminal colors in GUI Vim?

Expand Messages
  • Nathan Neff
    ... Thanks Glen -- I tried your colorscheme, and it looks a lot like mine. I ll go through the colors 1 by 1 when I have time -- in the meantime, I ll use your
    Message 1 of 16 , Sep 1, 2009
    • 0 Attachment
      On Mon, Aug 31, 2009 at 8:19 PM, Patrick Gen-Paul<pgenpaul@...> wrote:
      > I used ":hi + copy/paste" to create a color scheme that reflects my
      > xterm's default colors.
      >
      > Pleas find attached the color scheme file I created manually via
      > copy/paste and a few substitutions + the relevant stanza of my
      > .Xdefaults file so all you need to do is replace my terminal color
      > definitions by yours.

      Thanks Glen -- I tried your colorscheme, and it looks a lot like mine.

      I'll go through the colors 1 by 1 when I have time -- in the meantime, I'll
      use your colorscheme :-)

      --Nate

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Charles Campbell
      ... The hicolors plugin can help with this: http://mysite.verizon.net/astronaut/vim/index.html#HICOLORS (cutting edge)
      Message 2 of 16 , Sep 1, 2009
      • 0 Attachment
        Patrick Gen-Paul wrote:
        > I used ":hi + copy/paste" to create a color scheme that reflects my
        > xterm's default colors.
        >
        > Pleas find attached the color scheme file I created manually via
        > copy/paste and a few substitutions + the relevant stanza of my
        > .Xdefaults file so all you need to do is replace my terminal color
        > definitions by yours.
        >
        > :%s/#iiiiii/#jjjjjj/g (e.g.)
        >
        > Would be nice if someone could suggest an automated solution, though.
        >
        The hicolors plugin can help with this:

        http://mysite.verizon.net/astronaut/vim/index.html#HICOLORS
        (cutting edge)
        http://vim.sourceforge.net/scripts/script.php?script_id=1081 (stable)

        I used simple.vimrc:
        set nocp
        syn on
        filetype plugin on

        and the following:

        vim -u simple.vimrc
        :he hicolors
        (place cursor atop a color) <cr>
        (place cursor atop "WriteColorscheme") <cr>
        (pick a name for the colorscheme)

        Regards,
        Chip Campbell



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Matt Wozniski
        ... Well, you can probably tell that I was bored today... but here s a port of the 16-color-terminal default colorscheme to gvim. Just change the block of
        Message 3 of 16 , Sep 1, 2009
        • 0 Attachment
          On Tue, Sep 1, 2009 at 10:31 AM, Nathan Neff wrote:
          >
          > On Mon, Aug 31, 2009 at 8:19 PM, Patrick Gen-Paul wrote:
          >> I used ":hi + copy/paste" to create a color scheme that reflects my
          >> xterm's default colors.
          >>
          >> Pleas find attached the color scheme file I created manually via
          >> copy/paste and a few substitutions + the relevant stanza of my
          >> .Xdefaults file so all you need to do is replace my terminal color
          >> definitions by yours.
          >
          > Thanks Glen -- I tried your colorscheme, and it looks a lot like mine.
          >
          > I'll go through the colors 1 by 1 when I have time -- in the meantime, I'll
          > use your colorscheme :-)

          Well, you can probably tell that I was bored today... but here's a
          port of the 16-color-terminal default colorscheme to gvim. Just
          change the block of colors (the "let" lines..) to match your
          terminal's colors (they're colors 0 through 15, in order, fwiw).
          Hopefully gmail doesn't wrap this on me... In fact, just in case it
          does, I've attached it as well - so there will be a plain text,
          archivable copy in the list archives and a not-horribly-wrapped copy
          in subscriber's inboxes. Sorry I can't disable wrapping ATM. :)

          ~Matt

          hi clear
          if exists("syntax_on")
          syntax reset
          endif

          let g:colors_name = 'sixteen'

          " Change these to match your terminal!

          let s:Black = '#000000'
          let s:DarkBlue = '#AF0000'
          let s:DarkGreen = '#00AF00'
          let s:DarkCyan = '#AFAF00'
          let s:DarkRed = '#00FF00'
          let s:DarkMagenta = '#AF00AF'
          let s:Brown = '#00AFAF'
          let s:Grey = '#9A9A9A'
          let s:DarkGrey = '#5F5F5F'
          let s:Blue = '#D70000'
          let s:Green = '#00D700'
          let s:Cyan = '#D7D700'
          let s:Red = '#00FF00'
          let s:Magenta = '#D700D7'
          let s:Yellow = '#00D7D7'
          let s:White = '#D7D7D7'

          " Both

          exe 'hi ErrorMsg term=standout ctermbg=DarkRed guibg=' . s:DarkRed . '
          ctermfg=White guifg=' . s:White
          exe 'hi IncSearch term=reverse cterm=reverse gui=reverse'
          exe 'hi ModeMsg term=bold cterm=bold gui=bold'
          exe 'hi NonText term=bold ctermfg=Blue guifg=' . s:Blue
          exe 'hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold'
          exe 'hi StatusLineNC term=reverse cterm=reverse gui=reverse'
          exe 'hi VertSplit term=reverse cterm=reverse gui=reverse'
          exe 'hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold'
          exe 'hi DiffText term=reverse cterm=bold gui=bold ctermbg=Red guibg=' . s:Red
          exe 'hi PmenuThumb cterm=reverse gui=reverse'
          exe 'hi PmenuSbar ctermbg=Grey guibg=' . s:Grey
          exe 'hi TabLineSel term=bold cterm=bold gui=bold'
          exe 'hi TabLineFill term=reverse cterm=reverse gui=reverse'
          exe 'hi Cursor guibg=fg guifg=bg'
          exe 'hi lCursor guibg=fg guifg=bg'

          if &bg == 'light'
          exe 'hi Directory term=bold ctermfg=DarkBlue guifg=' . s:DarkBlue
          exe 'hi LineNr term=underline ctermfg=Brown guifg=' . s:Brown
          exe 'hi MoreMsg term=bold ctermfg=DarkGreen guifg=' . s:DarkGreen
          exe 'hi Question term=standout ctermfg=DarkGreen guifg=' . s:DarkGreen
          exe 'hi Search term=reverse ctermbg=Yellow guibg=' . s:Yellow . '
          ctermfg=NONE guifg=NONE'
          exe 'hi SpellBad term=reverse ctermbg=Red guibg=' . s:Red
          exe 'hi SpellCap term=reverse ctermbg=Blue guibg=' . s:Blue
          exe 'hi SpellRare term=reverse ctermbg=Magenta guibg=' . s:Magenta
          exe 'hi SpellLocal term=underline ctermbg=Cyan guibg=' . s:Cyan
          exe 'hi Pmenu ctermbg=Magenta guibg=' . s:Magenta
          exe 'hi PmenuSel ctermbg=Grey guibg=' . s:Grey
          exe 'hi SpecialKey term=bold ctermfg=DarkBlue guifg=' . s:DarkBlue
          exe 'hi Title term=bold ctermfg=DarkMagenta guifg=' . s:DarkMagenta
          exe 'hi WarningMsg term=standout ctermfg=DarkRed guifg=' . s:DarkRed
          exe 'hi WildMenu term=standout ctermbg=Yellow guibg=' . s:Yellow .
          ' ctermfg=Black guifg=' . s:Black
          exe 'hi Folded term=standout ctermbg=Grey guibg=' . s:Grey . '
          ctermfg=DarkBlue guifg=' . s:DarkBlue
          exe 'hi FoldColumn term=standout ctermbg=Grey guibg=' . s:Grey . '
          ctermfg=DarkBlue guifg=' . s:DarkBlue
          exe 'hi SignColumn term=standout ctermbg=Grey guibg=' . s:Grey . '
          ctermfg=DarkBlue guifg=' . s:DarkBlue
          exe 'hi Visual term=reverse'
          exe 'hi DiffAdd term=bold ctermbg=Blue guibg=' . s:Blue
          exe 'hi DiffChange term=bold ctermbg=Magenta guibg=' . s:Magenta
          exe 'hi DiffDelete term=bold ctermfg=Blue guifg=' . s:Blue . '
          ctermbg=Cyan guibg=' . s:Cyan
          exe 'hi TabLine term=underline cterm=underline gui=underline
          ctermfg=Black guifg=' . s:Black . ' ctermbg=Grey guibg=' . s:Grey
          exe 'hi CursorColumn term=reverse ctermbg=Grey guibg=' . s:Grey
          exe 'hi CursorLine term=underline cterm=underline gui=underline'
          exe 'hi MatchParen term=reverse ctermbg=Cyan guibg=' . s:Cyan
          exe 'hi Normal gui=NONE'
          else
          exe 'hi Directory term=bold ctermfg=Cyan guifg=' . s:Cyan
          exe 'hi LineNr term=underline ctermfg=Yellow guifg=' . s:Yellow
          exe 'hi MoreMsg term=bold ctermfg=Green guifg=' . s:Green
          exe 'hi Question term=standout ctermfg=Green guifg=' . s:Green
          exe 'hi Search term=reverse ctermbg=Yellow guibg=' . s:Yellow . '
          ctermfg=Black guifg=' . s:Black
          exe 'hi SpecialKey term=bold ctermfg=Blue guifg=' . s:Blue
          exe 'hi SpellBad term=reverse ctermbg=Red guibg=' . s:Red
          exe 'hi SpellCap term=reverse ctermbg=Blue guibg=' . s:Blue
          exe 'hi SpellRare term=reverse ctermbg=Magenta guibg=' . s:Magenta
          exe 'hi SpellLocal term=underline ctermbg=Cyan guibg=' . s:Cyan
          exe 'hi Pmenu ctermbg=Magenta guibg=' . s:Magenta
          exe 'hi PmenuSel ctermbg=DarkGrey guibg=' . s:DarkGrey
          exe 'hi Title term=bold ctermfg=Magenta guifg=' . s:Magenta
          exe 'hi WarningMsg term=standout ctermfg=Red guifg=' . s:Red
          exe 'hi WildMenu term=standout ctermbg=Yellow guibg=' . s:Yellow .
          ' ctermfg=Black guifg=' . s:Black
          exe 'hi Folded term=standout ctermbg=DarkGrey guibg=' . s:DarkGrey
          . ' ctermfg=Cyan guifg=' . s:Cyan
          exe 'hi FoldColumn term=standout ctermbg=DarkGrey guibg=' .
          s:DarkGrey . ' ctermfg=Cyan guifg=' . s:Cyan
          exe 'hi SignColumn term=standout ctermbg=DarkGrey guibg=' .
          s:DarkGrey . ' ctermfg=Cyan guifg=' . s:Cyan
          exe 'hi Visual term=reverse'
          exe 'hi DiffAdd term=bold ctermbg=DarkBlue guibg=' . s:DarkBlue
          exe 'hi DiffChange term=bold ctermbg=DarkMagenta guibg=' . s:DarkMagenta
          exe 'hi DiffDelete term=bold ctermfg=Blue guifg=' . s:Blue . '
          ctermbg=DarkCyan guibg=' . s:DarkCyan
          exe 'hi TabLine term=underline cterm=underline gui=underline
          ctermfg=White guifg=' . s:White . ' ctermbg=DarkGrey guibg=' .
          s:DarkGrey
          exe 'hi CursorColumn term=reverse ctermbg=DarkGrey guibg=' . s:DarkGrey
          exe 'hi CursorLine term=underline cterm=underline gui=underline'
          exe 'hi MatchParen term=reverse ctermbg=DarkCyan guibg=' . s:DarkCyan
          exe 'hi Normal gui=NONE'
          endif

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Patrick Gen-Paul
          ... [..] Thanks for the feedback. Do not deride such efforts - and yours in particular. Stuff like that is quite valuable in terms of introducing low-level vim
          Message 4 of 16 , Sep 1, 2009
          • 0 Attachment
            Matt Wozniski wrote:

            > Well, you can probably tell that I was bored today... but here's a
            > port of the 16-color-terminal default colorscheme to gvim. Just
            > change the block of colors (the "let" lines..) to match your
            > terminal's colors (they're colors 0 through 15, in order, fwiw).
            > Hopefully gmail doesn't wrap this on me... In fact, just in case it
            > does, I've attached it as well - so there will be a plain text,
            > archivable copy in the list archives and a not-horribly-wrapped copy
            > in subscriber's inboxes. Sorry I can't disable wrapping ATM. :)

            [..]

            Thanks for the feedback.

            Do not deride such efforts - and yours in particular. Stuff like that is
            quite valuable in terms of introducing low-level vim users like myself
            to vim scripting / customization.

            An obvious limitation is that nobody is going to want to type in their
            rrggbb's - even 16 of them.. And some folks have 256 colors terminals.

            I plan to take a closer look at your port, tomorrow I hope.

            :-)

            Gen-Paul.


            --~--~---------~--~----~------------~-------~--~----~
            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.