Color in Vim

I've been writing some PHP files on my arch box using vim and I realized there was no color syntax highlighting. After googling, searching the forum, and fiddling with some configuration files, I still haven't seen any color in my vim. When I enable syntax highlighting by adding "syntax on" to my ~/.vimrc, the PHP file gains some underlining and bold text. That's a step up from nothing, but not color. My /usr/share/vim/syntax files exist and they must be noticed by vim since it is doing a sort of b&w highlighting. I'm using gnome-terminal which supports color. When I "ls" in Arch, I get a colorful listing. My bash prompt is in color. So why isn't color working in vim?!
Any suggestions will be greatly appreciated.

Take a look at :help xterm-color from within vim.
If that doesn't do it, try setting the TERM shell variable to let programs know that colour is available. Here's mine:
TERM=xterm-xfree86, but I use xterm. Take a look at this page: http://wiki.archlinux.org/index.php/Why … rminals%3F for some more terminal related stuff.
Dusty

Similar Messages

  • Bad colors in Vim

    Hello,
    My problem is that colors for Molokai color-schema in Vim doesn't look exactly the same as in screenshot. Molokai isn't the only color-scheme for me that looks kinda weird and I think that's somehow related to terminal support for 256 colors.
    I'm using `rxvt-unicode-256xresources` from AUR instead of official `rxvt-unicode` from repo. I have `set t_Co=256` in `.vimrc`. I have Molokai theme for Vim and for terminal (in `.Xresources`) as well, but still it looks kinda different.
    http://i.imgur.com/12w08.jpg
    Need advice to fix colors, thanks!
    Edit: Screenshot shows all correctly (less or more), but actually it's much worse. Weirdly, but taking screenshots somehow fixed it?
    Moderator edit: The included image is too big. Reduced to url.
    Last edited by bernarcher (2012-12-15 20:08:05)

    There appear to be some big differences, to my eye, between the gui colors and the cterm colors.
    :hi Function
    Function xxx ctermfg=118 guifg=#A6E22E
    Color 118 is #87FF00.  The cterm color 154, #AFFF00, is a better match to my eye.  I edited a copy of the molokai color scheme, and toned down the electric green with:
    :%s/=118/=154/g
    I have spent some time coming up with a custom color scheme for vim in xterm and urxvt.  I now always add this boiler plate to color scheme files so I don't have to remember these useful tips:
    " To test, use
    " :so %
    " To see the current color setting for an individual syntax item:
    " :hi Cursor
    " To see all the highlight syntax groups:
    " :so $VIMRUNTIME/syntax/hitest.vim
    " Useful help pages:
    " :he group-name
    " :he highlight-groups
    " Useful plugin:
    " xterm-color-table.vim
    " http://www.vim.org/scripts/script.php?script_id=3412
    " Usage:
    " :XtermColorTable
    The XtermColorTable plugin works in urxvt.  That plugin shows a table in a vim window with the cterm color numbers next to blocks of the color.  The display of RGB values can then be toggled using the mouse to select a color block or with single key commands.
    Edited for spelling error correction.
    Last edited by thisoldman (2012-12-17 11:21:04)

  • Terminal colors vs Vim colors [SOLVED]

    Hey guys!
    I've been using vim since the very first day I started learning programming, and am now using it on my brand new arch system. Everything works really well so far, but I'm having a bit of trouble customizing colors. I wouldn't normally make a big deal out of it, but since I'm going to spend an enormous amount of hours using it for school and personnal projects, I'd really like to get all my colors right. I'm using an urxvt terminal, under awesome wm.
    Here are my 16 terminal colors:
    http://tinypic.com/r/2yper6b/5
    Here is what my vim loks like:
    http://tinypic.com/r/s1547k/5
    As you can see, vim uses a crap-looking, brownish-red color for line numbers and html tags. This color is not in any of the 16 I specified in .Xresources. I don't know where it comes from, but I would like for vim to use only these 16 colors. Is that possible? I assume it is, because most of my vim colors are changed whenever I edit them in .Xresources.
    If not, I'd like to know how I can edit the colors vim uses myself. Thank you for reading!
    Last edited by PolyBender (2013-05-12 00:35:41)

    You select a colorscheme (:help colorscheme) in your vimrc.  The themes can use 256 colors, which I find nice once I customized the theme/scheme.  But if you want to limit it to 16, just `set t_Co=16` in your vimrc.

  • [SOLVED] How to convince vim my terminal supports color?

    Hi. I recently got a shell account from Kaitocracy on his linode machine. I noticed that my bash prompt has color, as expected, but when I copied over my vim configuration (which includes a color theme), it didn't work! After some toying around, I noticed that vim recognizes the terminal escape codes using `:hi <type> start= stop=`, but not the existing `cterm` commands in my color theme. To make things more confusing, I know my terminal (urxvt) is capable of using the cterm flags.
    Also, Ctrl+L does not clear/redraw the screen as expected.
    What can I do to fix these issues? Here are the configs:
    ~/.vimrc:
    " No vi compatibility; strictly vim here.
    set nocompatible
    " Don't source /etc/vimrc
    set noexrc
    " My background is always black
    set background=dark
    " The mouse is helpful every now and then...
    set mouse=a
    " I'm a Linux user
    set fileformats=unix,dos,mac
    " Search while I type
    set incsearch
    " The blinking pisses me off
    set novisualbell
    " Line numbers are key to debugging
    set number
    set numberwidth=5
    " My tabs are 4 characters long
    set tabstop=4
    set softtabstop=4
    " Indention is also 4 characters
    set shiftwidth=4
    " Normally, I don't want tabs converted to spaces.
    set noexpandtab
    " Syntax highlighting is a staple :D
    syntax on
    " I want liberal use of hidden buffers, just in case.
    set hidden
    set laststatus=2
    " filename, filetype, readonly flag, modified flag line #, column #, %age of file length, hex value of byte under cursor.
    " Ex: .vimrc [vim][+] 48,22 55% hex:20
    set statusline=%f\ %y%r%m\ %l,%c\ %P\ hex:%B
    set noai
    " I can see where tabs and line endings are
    set listchars=tab:▸\ ,eol:¬
    " This turns on the config above; I can turn it off with :set nolist
    set list
    " I want wordwrap on, coupled with sane line-breaking. This will not work when :set list is active.
    set wrap
    set lbr
    " My color scheme is pwn
    colorscheme sporkbox
    filetype indent on
    if has("autocmd")
    " enable filetype detection
    filetype on
    " I want to convert tabs to spaces to adhere to PEP 8.
    autocmd FileType python setlocal ts=4 sts=4 sw=4 expandtab
    endif
    " \l toggles invisibles
    nmap <leader>l :set list!<CR>
    " I like to get rid of trailing white space.
    nnoremap <silent> <F5> :call <SID>StripTrailingWhitespaces()<CR>
    " Fast window movement is important
    map <C-h> <C-w>h
    map <C-j> <C-w>j
    map <C-k> <C-w>k
    map <C-l> <C-w>l
    " Courtesy of vimcasts.org
    function! <SID>StripTrailingWhitespaces()
    " Save last search and cursor position
    let _s=@/
    let l = line(".")
    let c = col(".")
    " Do the business:
    %s/\s\+$//e
    " Restore previous search history and cursor position
    let @/=_s
    call cursor(l, c)
    endfunction
    ~/.vim/colors/sporkbox.vim:
    " Color scheme "sporkbox"
    " by Daniel Campbell <[email protected]>
    " Tab characters and EOLs should be dark gray so they don't stand out too much.
    highlight SpecialKey ctermfg=darkgray
    highlight NonText ctermfg=darkgray
    " If I'm in a mode, I want to see it.
    highlight ModeMsg ctermfg=green
    " The current file should be obvious; the others can be faded.
    highlight StatusLine ctermfg=green ctermbg=black
    highlight StatusLineFC ctermfg=darkgray ctermbg=white
    " Line numbers should be just-visible, not bright.
    highlight LineNr ctermfg=darkgray
    " Titles in Markdown
    highlight Title cterm=bold ctermfg=white
    " My splits should not be bright
    highlight VertSplit ctermfg=black ctermbg=darkblue
    highlight Comment ctermfg=darkgreen
    highlight Constant ctermfg=cyan
    highlight Identifier ctermfg=yellow
    highlight Statement ctermfg=magenta
    highlight PreProc ctermfg=lightblue
    highlight Type ctermfg=blue
    highlight Special ctermfg=lightblue
    Remote .bashrc:
    ### ~/.bashrc: Sourced by all interactive bash shells on startup
    # Set a fancier prompt
    PS1='\[\e[32;01m\]\u\[\e[m\] \[\e[36m\]\w\[\e[m\]: '
    # Turn on colors for ls and grep
    alias less='less --RAW-CONTROL-CHARS'
    alias ls='ls --color=auto'
    alias grep='grep --color=auto'
    # Set colors for ls and friends
    if [ -f ~/.dir_colors ]; then
    eval `dircolors -b ~/.dir_colors`
    elif [ -f /etc/dir_colors ]; then
    eval `dircolors -b /etc/dir_colors`
    else eval `dircolors -b`; fi
    # Compilation optimization flags
    CHOST="i686-pc-linux-gnu"
    MAKEFLAGS="-j2"
    LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=both"
    CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
    FFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
    CPPFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
    CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
    export PGHOST="private1.kiwilight.com"
    export PS1 CHOST MAKEFLAGS LDFLAGS CFLAGS FFLAGS CXXFLAGS
    To make matters more confusing, my vim theme works when I connect to the linode in a GNU screen session, but not when it's a straight-up terminal.
    Last edited by xelados (2010-04-25 00:34:44)

    Mr.Elendig wrote:Make sure you are using rxvt-unicode-256color and that your TERM is rxvt-256color outside of screen, and screen-256color inside of screen.
    That's the peculiarity of the problem; when I run vim in my local environment, I always get color using the `:hi <hilighttype> ctermfg=* ctermbg=*` commands. This applies inside of X through rxvt-unicode (non-256color), GNU screen, and on the plain command line in vc1. This issue seems to be related to the remote environment and/or variables not being sent through ssh.
    @moljac: When I echo'd TERM inside a screen session, it returned "screen", so I don't know whether it's legit or not.
    Last edited by xelados (2010-04-24 11:47:52)

  • [SOLVED] Odd colours in vim/urxvt

    So I'm using the base16 colourset in my Xresources and something really strange seems to be happening. The colours being used by vim to perform syntax highlighting are just wrong. As in, there are colours being used that aren't even specified in my Xresources file.
    Periodically, like 1 out of 50 calls to vim they will look "correct".
    $TERM is rxvt-unicode-256colors
    Nothing to do with colours or colour schemes in my .vimrc.
    Can anyone tell me what's going on here?
    EDIT: I should add that the colours look strange for commands like ls as well.
    Last edited by Vixus (2012-11-05 15:43:23)

    doug piston wrote:Well to my knowledge (Someone correct me if I am wrong), Vim doesn't look at your .Xresources by default. You can make it do such a thing but using the a colorscheme is still a better option. Just install the colorscheme, I do not see why you don't want to...
    Sorry, I may not have explained clearly, but I did try and install the base16 colorscheme for vim, following all the steps that the author provided. However there were some steps involving running bash scripts that just didn't work, most likely why the colorscheme didn't work.
    Thanoulis wrote:1) Vim always uses a colorscheme, even if not present in .vimrc. In that case it uses :colorscheme default.
    This I did not know. Thanks for telling me. In that case I guess there are bugs in the base16 colourscheme for vim (as a lot of comments on the repository seem to suggest).
    2) In Xresources, we define the terminal's color palette, not vim's colorscheme. My guess is that you use a different color palette for urxvt and xterm (hence the differences in vim colors)
    I don't, since I only have one Xresources file that presumably applies to both terminal emulators.
    3) The weird looks from your ssh session, is because in the host machine there is not a valid terminfo file. Usually its fixed by installing the same type of terminal emulator in both machines.
    Ugh, really? I never thought that was necessary... can I fake this in any way? I don't have sudo access to any of the work machines I ssh into.
    If you really like the base 16 colors in vim, try :colorscheme peachpuff (it's the one i use, and comes with vim).
    Thanks, this worked a treat!

  • How to permanently save the color settings in terminal.app

    Hi,
    I have configured the "ls" command in the terminal.app to give colored outputs. However, I realised that for some reason the color-set used is designed for a light-colored background. When I use "white on black", the default blue color of the directories is almost invisible.
    Of course, I can change this to another color, but this problem is true for all "blue" fonts, so for example, the default color for comments in vim is also blue and thus unreadable with black background.
    This is not a problem when I use the xterm in X11. The color set there is much lighter and is perfect for a black backgound.
    By drag-and-drop method (drag the chosen color on top of the directory texts in terminal), I am able to alter the blue color to a much lighter version. This apparently changes all fonts that is blue (this includes for example vim comments), and is exactly what I wanted. But I cannot figure out a way to save this as default. Clicking "Save setting as default" button in the inspector does nothing, the new terminal window still gives you this dark blue.
    Anyone know how do I do this?
    Cheers,
    Lianheng

    Hi Nils,
    Thanks for the replies.
    I think I see what the problem is: basically the colors in the terminal are darker than that of the xterm in X11. This can be clearly seen from the vim. May be this is to do with the fact that apple terminal.app has a "better" color support?
    I quite like the default LSCOLORS settings, which is:
    LSCOLORS=exfxcxdxcxegedabagacad
    The color settings in X11 is just perfect for me at the moment. It would be so much nicer if I can make the color scheme in terminal.app look like that of the X11. If say, I change LSCOLORS to
    LSCOLORS=gxfxcxdxcxegedabagacad
    and change the color schemes in vim to a lighter theme, but this will effect the colors in X11 too, which is perfect now. Cyan will look too light in X11.
    At the first I thought by drag and dropping the colors into terminal it will alter its color map. So my question was actually how can one (if it is possible) change the color map of the terminal.app, so that it inteprets the ANSI "blue" slightly differently.
    By the way, the way that you can see all colors in vim is really neat! Thanks for that tip.
    Cheers,
    Lianheng

  • Opinions on gVim as opposed to just Vim

    I'm finally going to learn Vim, and I will have gVim on my system for a graphical text editor to launch out of pcmanfm. I'm just curious whether any of you feel that there's some advantage to using, or at least learning out of, gVim over Vim.

    Dusty wrote:
    On topic, by accident; I use vim and gvim pretty much interchangably. tabbing works nicer in gvim. If I'm in a console I type vim cause its shorter (or :edit by mistake often enough that I aliased it to vim). I have my console and my gvim both set to use the zenburn theme, so they look pretty much the same.
    gvim looks a bit more modern but on ssh and screen vim is cooler. I'd say use gvim when you can and use vim when its more convenient.
    Dusty
    I use oceanblack in both but colors are not the same, they are pretty different indeed. I tried zenburn also. In both I type <esc>:color zenburn but only in gvim I have better results.
    Maybe I'm missing something. I use Sakura terminal and vim has few colors. Maybe I should use something else for TERM variable....at the moment I have TERM=xterm.
    Could you please tell me how did you obtained same colors for vim and gvim?
    ===EDIT=================================================================================
    Kristoffer Stensbo-Smidt wrote:
    > I have just made a full install of vim 7.0 and gvim using the package
    > manager in Debian. My problem is that the syntax highlighting works very
    > badly in the terminal version of vim – if it works at all.
    > When I try ':colo desert' it changes only the color of the text (but not
    > even to the correct colors) and not the background. When I try ':colo
    > chela_light' nothing happens at all. Both of these color schemes work
    > perfectly in gvim. Any ideas on how to get this working in the terminal?
    > Best regards,
    > Kristoffer Stensbo-Smidt
    Are you using default terminal colors (light grey on black) or are you using
    some "xterm color scheme" outside of Vim? If you are, Vim is not necessarily
    aware of it.
    What happens if you log in on a text console (Ctrl-Alt-F2 then repli to the
    login prompt with username & password) and start Vim there? Can you set
    colorschemes properly?
    Use ":view $VIM/vimfiles/colors/chela_light_vim" or ":view
    ~/.vim/colors/chela_light.vim" (depending on where that color scheme is
    located -- it should NOT be under $VIMRUNTIME because it wasn't distributed
    with Vim and any upgrade can silently change or remove anything in the
    $VIMRUNTIME tree). Does it include "cterm/ctermfg/ctermbg" clauses in its
    ":hi" statements? If not, it's a GUI-only colorscheme.
    Similarly with ":view $VIMRUNTIME/colors/desert".
    The settings for console Vim in a color terminal (cterm= ctermbg= ctermfg= )
    are not necessarily the same as for gvim (gui= guibg= guifg= ) because a color
    terminal typically has 8 background and 16 foreground colors, whereas the GUI
    typically has 16,777,216 of each kind.
    Best regards,
    Tony.
    source:http://groups.google.com/group/vim_use/ … 8a58ec9a9e
    This explains all. You have to use a colorscheme made for both, gvim and vim.
    I tried zellner scheme with white background in sakura virtual terminal and the colors are matching.
    If your virtual terminal supports 256 colors you can set in vim: set   t_Co=256 for better results.
    Pity that oceanblack scheme is just for gvim.
    Well, will just continue using gvim.
    Last edited by ArchArael (2008-08-30 11:35:30)

  • How to get some color for urxvt

    What I'm looking for is to make my urxvt look like it does in this screenshot: https://i.imgur.com/UgH2tJ3.jpg
    I've been messing with my ~/.Xdefaults, but that didn't change anything. I'm using rxvt-unicode-pixbuf from the AUR in case that matters.

    Perhaps slithery should have said most programs have color support.  You just need to configure the ones you want to use.  The terminal just shows what the running program tells it to show.  If you want color in vim, you'd set up color in vim.  If you want color in mutt, you'd set up color in mutt.  Etc.
    The terminal has to be capable of showing colors, but yours is.  Just because the terminal is capable, though, you still have to use programs that output color.
    ls is commonly (and by default in arch) aliased to "ls --colors" which will use the dircolors settings to highlight different filetypes in different colors when you run `ls` commands.
    Grep has a similar color setting.
    Pacman has color settings.
    Most text editors have color settings.
    See a pattern?

  • Tweak vims syntax highlighting

    here is a little tutorial for making your own s-h theme for vim,
    if you're using gvim you can skip the part about terminals,
    for terminal users you must first set your prefered terminal colours in .Xdefaults ,
    eg for urxvt:
    urxvt*scrollColor: #111111
    urxvt*font: xft:Bitstream Vera Sans Mono:pixelsize=13
    urxvt*scrollBar_floating: false
    urxvt*scrollstyle: urxvt
    urxvt*saveLines: 1000
    urxvt*foreground: #eeeeee
    urxvt*background: #000000
    ! black
    urxvt*color0: #000000
    urxvt*color8: #444444
    ! red
    urxvt*color1: #b21818
    urxvt*color9: #ee9090
    ! green
    urxvt*color2: #18b218
    urxvt*color10: #54ee54
    ! yellow
    urxvt*color3: #968a38
    urxvt*color11: #eeee77
    ! blue
    urxvt*color4: #1818b2
    urxvt*color12: #9090ee
    ! magenta
    urxvt*color5: #963c59
    urxvt*color13: #cf9ebe
    ! cyan
    urxvt*color6: #418179
    urxvt*color14: #71bebe
    ! white
    urxvt*color7: #aaaaaa
    urxvt*color15: #eeeeee
    then you save this example file as ~/.vim/colors/xerxes.vim
    " local syntax file - set colors on a per-machine basis:
    hi clear
    set background=dark
    if exists("syntax_on")
    syntax reset
    endif
    let g:colors_name = "xerxes"
    hi Normal guifg=white guibg=black
    hi Scrollbar guifg=darkcyan guibg=cyan
    hi Menu guifg=black guibg=cyan
    hi SpecialKey term=bold cterm=bold ctermfg=2 guifg=Blue
    hi NonText term=bold cterm=bold ctermfg=darkred gui=bold guifg=Blue
    hi Directory term=bold cterm=bold ctermfg=brown guifg=Blue
    hi ErrorMsg term=standout cterm=bold ctermfg=grey ctermbg=blue guifg=White guibg=Red
    hi Search term=reverse ctermfg=white ctermbg=red guifg=white guibg=Red
    hi MoreMsg term=bold cterm=bold ctermfg=darkgreen gui=bold guifg=SeaGreen
    hi ModeMsg term=bold cterm=bold gui=bold guifg=White guibg=Blue
    hi LineNr term=underline cterm=bold ctermfg=darkcyan guifg=Yellow
    hi Question term=standout cterm=bold ctermfg=darkgreen gui=bold guifg=Green
    hi StatusLine term=bold,reverse cterm=bold ctermfg=4 ctermbg=15 gui=bold guifg=blue guibg=white
    hi StatusLineNC term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue
    hi Title term=bold cterm=bold ctermfg=darkmagenta gui=bold guifg=Magenta
    hi Visual term=reverse cterm=reverse gui=reverse
    hi WarningMsg term=standout cterm=bold ctermfg=red guifg=Red
    hi Cursor guifg=bg guibg=Green
    hi Comment term=bold ctermfg=6 guifg=#80a0ff
    hi Constant term=underline ctermfg=9 guifg=#ffa0a0
    hi Special term=bold ctermfg=1 guifg=Orange
    hi Identifier term=underline ctermfg=14 guifg=#40ffff
    hi Statement term=bold cterm=bold ctermfg=11 gui=bold guifg=#ffff60
    hi PreProc term=underline ctermfg=5 guifg=#ff80ff
    hi Type term=underline cterm=bold ctermfg=lightgreen gui=bold guifg=#60ff60
    hi Error term=reverse ctermfg=darkcyan ctermbg=black guifg=Red guibg=Black
    hi Todo term=standout ctermfg=black ctermbg=darkcyan guifg=Blue guibg=Yellow
    hi link IncSearch Visual
    hi link String Constant
    hi link Character Constant
    hi link Number Constant
    hi link Boolean Constant
    hi link Float Number
    hi link Function Identifier
    hi link Conditional Statement
    hi link Repeat Statement
    hi link Label Statement
    hi link Operator Statement
    hi link Keyword Statement
    hi link Exception Statement
    hi link Include PreProc
    hi link Define PreProc
    hi link Macro PreProc
    hi link PreCondit PreProc
    hi link StorageClass Type
    hi link Structure Type
    hi link Typedef Type
    hi link Tag Special
    hi link SpecialChar Special
    hi link Delimiter Special
    hi link SpecialComment Special
    hi link Debug Special
    now you can start tweaking the theme, use the numbers in .Xdefaults  as your prefered colours in the "ctermfg" and "ctermbg" commands,
    now you can use the "colorscheme" command in vim to enable it,
    colorscheme xerxes

    hello iphitus,
    i've edited the first post and if you use that .Xdefaults the following scheme should give you something close to desert,
    " Vim color file
    set background=dark
    if version > 580
    " no guarantees for version 5.8 and below, but this makes it stop
    " complaining
    hi clear
    if exists("syntax_on")
    syntax reset
    endif
    endif
    let g:colors_name="desert"
    hi Normal guifg=White guibg=grey20
    " highlight groups
    hi Cursor guibg=khaki guifg=slategrey
    "hi CursorIM
    "hi Directory
    "hi DiffAdd
    "hi DiffChange
    "hi DiffDelete
    "hi DiffText
    "hi ErrorMsg
    hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none
    hi Folded guibg=grey30 guifg=gold
    hi FoldColumn guibg=grey30 guifg=tan
    hi IncSearch guifg=slategrey guibg=khaki
    "hi LineNr
    hi ModeMsg guifg=goldenrod
    hi MoreMsg guifg=SeaGreen
    hi NonText guifg=LightBlue guibg=grey30
    hi Question guifg=springgreen
    hi Search guibg=peru guifg=wheat
    hi SpecialKey guifg=yellowgreen
    hi StatusLine guibg=#c2bfa5 guifg=black gui=none
    hi StatusLineNC guibg=#c2bfa5 guifg=grey50 gui=none
    hi Title guifg=indianred
    hi Visual gui=none guifg=khaki guibg=olivedrab
    "hi VisualNOS
    hi WarningMsg guifg=salmon
    "hi WildMenu
    "hi Menu
    "hi Scrollbar
    "hi Tooltip
    " syntax highlighting groups
    hi Comment guifg=SkyBlue
    hi Constant guifg=#ffa0a0
    hi Identifier guifg=palegreen
    hi Statement guifg=khaki
    hi PreProc guifg=indianred
    hi Type guifg=darkkhaki
    hi Special guifg=navajowhite
    "hi Underlined
    hi Ignore guifg=grey40
    "hi Error
    hi Todo guifg=orangered guibg=yellow2
    " color terminal definitions
    hi SpecialKey ctermfg=darkgreen
    hi NonText cterm=bold ctermfg=darkblue
    hi Directory ctermfg=darkcyan
    hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1
    hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green
    hi Search cterm=NONE ctermfg=grey ctermbg=blue
    hi MoreMsg ctermfg=darkgreen
    hi ModeMsg cterm=NONE ctermfg=brown
    hi LineNr ctermfg=3
    hi Question ctermfg=green
    hi StatusLine cterm=bold,reverse
    hi StatusLineNC cterm=reverse
    hi VertSplit cterm=reverse
    hi Title ctermfg=5
    hi Visual cterm=reverse
    hi VisualNOS cterm=bold,underline
    hi WarningMsg ctermfg=1
    hi WildMenu ctermfg=0 ctermbg=3
    hi Folded ctermfg=darkgrey ctermbg=NONE
    hi FoldColumn ctermfg=darkgrey ctermbg=NONE
    hi DiffAdd ctermbg=4
    hi DiffChange ctermbg=5
    hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
    hi DiffText cterm=bold ctermbg=1
    hi Comment ctermfg=12
    hi Constant ctermfg=9
    hi Special ctermfg=5
    hi Identifier ctermfg=10
    hi Statement cterm=bold ctermfg=11
    hi PreProc ctermfg=1
    hi Type ctermfg=2
    hi Underlined cterm=underline ctermfg=5
    hi Ignore cterm=bold ctermfg=7
    hi Ignore ctermfg=darkgrey
    hi Error cterm=bold ctermfg=7 ctermbg=1

  • [Solved]vim colorschemes not working

    Vim colorschemes are not working.When I set a colorscheme with ":color name" colors change just a bit but it don't get nothing even near the theme preview.
    I'm using rxvt with zsh.I already tested urxvt colors with a perl script,they're working fine.
    Sorry for my bad english and for being such a fucking newbie.
    Last edited by instinct (2013-03-13 21:17:32)

    I recommend firstly to define all your terminal colors in your ~/.Xdefaults accordingly. Here's a sample from my own ~/.Xdefaults - I'm using urxvt terminal with standard terminal colors:
    URxvt.background: rgb:00/00/00
    URxvt.foreground: rgb:c2/c2/c2
    *color0: rgb:00/00/00
    *color1: rgb:a8/00/00
    *color2: rgb:00/a8/00
    *color3: rgb:a8/54/00
    *color4: rgb:00/00/a8
    *color5: rgb:a8/00/a8
    *color6: rgb:00/a8/a8
    *color7: rgb:42/42/42
    *color8: rgb:00/00/00
    *color9: rgb:f8/54/50
    *color10: rgb:50/fc/50
    *color11: rgb:f8/fc/50
    *color12: rgb:50/54/f8
    *color13: rgb:f8/54/f8
    *color14: rgb:50/fc/f8
    *color15: rgb:f8/fc/f8
    You can test your terminal colors with a color script found here.
    After that you should set up vim. Start with ~/.vimrc and ~/.vim/colors/yourcolor_scheme.vim.
    In ~/.vimrc you should have
    set t_Co=256
    syntax on
    And then you can find yourself a colorscheme that fits you. Now here's the tricky part: the colors in here are defined for terminals (cterm colors) and for gvim (gui colors). I find it hard to get the desired colors using cterm colors, so I am using a script that converts guicolors to the equivalent terminal colors - its called guicolorscheme. After you download the script, put it in ~/.vim/plugin, and add this to the bottom of your ~/.vimrc:
    if (&t_Co == 256 || &t_Co == 88) && !has('gui_running') &&
    \ filereadable(expand("$HOME/.vim/plugin/guicolorscheme.vim"))
    " Use the guicolorscheme plugin to makes 256-color or 88-color
    " terminal use GUI colors rather than cterm colors.
    runtime! plugin/guicolorscheme.vim
    GuiColorScheme hax
    else
    " For 8-color 16-color terminals or for gvim, just use the
    " regular :colorscheme command.
    colorscheme default
    endif
    I have thinkered with my own colorscheme here to get some nice colors, so you are free to use that one, and remember to put it in ~/.vim/colors/.
    Last edited by roygbiv (2011-06-07 10:53:06)

  • [SOLVED] Emacs Configuration

    I wanted to set my Emacs theme the default Emacs theme. So, I removed the line on my init.el that changed the theme. I reopened Emacs and my background was dark (gray), instead of Emacs's default white. Very strange, I thought. After lots of attempts to fix it, I ended up removing .emacs.d/, and completely uninstalling emacs, which removed /usr/share/emacs too. Total wipe out.
    ~> locate emacs
    /etc/speech-dispatcher/clients/emacs.conf
    /home/david/.emacs-places
    /home/david/.emacs.d
    /home/david/.emacs.e
    /home/david/config_emacs.zip
    /home/david/.config/hexchat/scrollback/FreeNode/#emacs.txt
    /home/david/.emacs.e/.git
    /home/david/.emacs.e/.gitignore
    /home/david/.emacs.e/README
    /home/david/.emacs.e/ac-comphist.dat
    /home/david/.emacs.e/ac-dict
    /home/david/.emacs.e/auto-complete-config.el
    /home/david/.emacs.e/auto-complete-config.elc
    /home/david/.emacs.e/auto-complete.el
    /home/david/.emacs.e/auto-complete.elc
    /home/david/.emacs.e/auto-save-list
    /home/david/.emacs.e/fixme-mode.el
    /home/david/.emacs.e/init.el
    /home/david/.emacs.e/lua-mode.el
    /home/david/.emacs.e/popup.el
    /home/david/.emacs.e/popup.elc
    /home/david/.emacs.e/redo+.el
    /home/david/.emacs.e/session.1023209c8141597e4134217547192611600000006250032
    /home/david/.emacs.e/tq.el
    /home/david/.emacs.e/tramp
    /home/david/.emacs.e/vala-mode.el
    /home/david/.emacs.e/ac-dict/c++-mode
    /home/david/.emacs.e/ac-dict/c-mode
    /home/david/.emacs.e/ac-dict/clojure-mode
    /home/david/.emacs.e/ac-dict/css-mode
    /home/david/.emacs.e/ac-dict/java-mode
    /home/david/.emacs.e/ac-dict/javascript-mode
    /home/david/.emacs.e/ac-dict/php-mode
    /home/david/.emacs.e/ac-dict/python-mode
    /home/david/.emacs.e/ac-dict/ruby-mode
    /home/david/.emacs.e/ac-dict/scheme-mode
    /home/david/.emacs.e/ac-dict/tcl-mode
    /home/david/.emacs.e/auto-save-list/.saves-11111-davidarch~
    /home/david/.emacs.e/auto-save-list/.saves-11933-davidarch~
    /home/david/.emacs.e/auto-save-list/.saves-13866-davidarch~
    /home/david/.emacs.e/auto-save-list/.saves-16864-davidarch~
    /home/david/.emacs.e/auto-save-list/.saves-1935-davidarch~
    /home/david/.emacs.e/auto-save-list/.saves-3635-davidarch~
    /home/david/.emacs.e/auto-save-list/.saves-4124-davidarch~
    /home/david/.emacs.e/auto-save-list/.saves-752-davidarch~
    /home/david/.emacs.e/auto-save-list/.saves-8016-davidarch~
    /home/david/.emacs.e/auto-save-list/.saves-9367-davidarch~
    /home/david/.local/share/Trash/files/vim_emacs.png.png
    /home/david/.local/share/Trash/info/vim_emacs.png.png.trashinfo
    /home/david/Downloads/emacs_resize.png
    /home/david/Downloads/CodeMirror-2.3/demo/emacs.html
    /home/david/Downloads/CodeMirror-2.3/keymap/emacs.js
    /home/david/src/.metadata/.plugins/com.python.pydev.analysis/python_v1_3tswbhuj9gc4kibexhrzgzdx/v1_indexcache/ropemacs.__init___eztp.v1_indexcache
    /opt/komodoedit/lib/mozilla/chrome/komododoc/locale/en-US/emacskeybind.html
    /usr/include/evolution-3.4/e-util/e-text-event-processor-emacs-like.h
    /usr/lib/erlang/lib/tools-2.6.7/emacs
    /usr/lib/erlang/lib/tools-2.6.7/emacs/README
    /usr/lib/erlang/lib/tools-2.6.7/emacs/erlang-eunit.el
    /usr/lib/erlang/lib/tools-2.6.7/emacs/erlang-flymake.el
    /usr/lib/erlang/lib/tools-2.6.7/emacs/erlang-skels-old.el
    /usr/lib/erlang/lib/tools-2.6.7/emacs/erlang-skels.el
    /usr/lib/erlang/lib/tools-2.6.7/emacs/erlang-start.el
    /usr/lib/erlang/lib/tools-2.6.7/emacs/erlang.el
    /usr/lib/erlang/lib/tools-2.6.7/emacs/erlang_appwiz.el
    /usr/lib/erlang/lib/tools-2.6.7/emacs/test.erl.indented
    /usr/lib/erlang/lib/tools-2.6.7/emacs/test.erl.orig
    /usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/tools/Editra/src/extern/pygments/styles/emacs.py
    /usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/tools/Editra/src/extern/pygments/styles/emacs.pyc
    /usr/lib/ruby/1.9.1/x86_64-linux/enc/emacs_mule.so
    /usr/share/fish/completions/emacs.fish
    /usr/share/gettext/styles/po-emacs-x.css
    /usr/share/gettext/styles/po-emacs-xterm.css
    /usr/share/gettext/styles/po-emacs-xterm16.css
    /usr/share/gettext/styles/po-emacs-xterm256.css
    /usr/share/git/emacs
    /usr/share/git/emacs/.gitignore
    /usr/share/git/emacs/Makefile
    /usr/share/git/emacs/README
    /usr/share/git/emacs/git-blame.el
    /usr/share/git/emacs/git-blame.elc
    /usr/share/git/emacs/git.el
    /usr/share/git/emacs/git.elc
    /usr/share/gnome/help/anjuta-manual/C/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/cs/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/da/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/de/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/el/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/es/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/eu/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/fr/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/gl/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/ja/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/oc/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/pt_BR/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/sl/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/sv/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/th/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/uk/language-support-cpp-modelines-emacs.page
    /usr/share/gnome/help/anjuta-manual/zh_CN/language-support-cpp-modelines-emacs.page
    /usr/share/go/misc/emacs
    /usr/share/go/misc/emacs/go-mode-load.el
    /usr/share/go/misc/emacs/go-mode.el
    /usr/share/gtkhtml-4.0/keybindingsrc.emacs
    /usr/share/guile/1.8/ice-9/emacs.scm
    /usr/share/icons/Faenza/apps/16/emacs.png
    /usr/share/icons/Faenza/apps/16/emacs23.png
    /usr/share/icons/Faenza/apps/22/emacs.png
    /usr/share/icons/Faenza/apps/22/emacs23.png
    /usr/share/icons/Faenza/apps/24/emacs.png
    /usr/share/icons/Faenza/apps/24/emacs23.png
    /usr/share/icons/Faenza/apps/32/emacs.png
    /usr/share/icons/Faenza/apps/32/emacs23.png
    /usr/share/icons/Faenza/apps/48/emacs.png
    /usr/share/icons/Faenza/apps/48/emacs23.png
    /usr/share/icons/Faenza/apps/64/emacs.png
    /usr/share/icons/Faenza/apps/64/emacs23.png
    /usr/share/icons/Faenza/apps/96/emacs.png
    /usr/share/icons/Faenza/apps/96/emacs23.png
    /usr/share/icons/Faenza/apps/scalable/emacs.svg
    /usr/share/icons/Faenza/apps/scalable/emacs23.svg
    /usr/share/kbd/keymaps/i386/qwerty/emacs.map.gz
    /usr/share/kbd/keymaps/i386/qwerty/emacs2.map.gz
    /usr/share/mime/text/x-emacs-lisp.xml
    /usr/share/pixmaps/gnome-emacs.png
    /usr/share/speech-dispatcher/conf/clients/emacs.conf
    /usr/share/vim/vim73/colors/xemacs.vim
    That's "locate emacs". ~/.emacs.e/ is just a backup for ~/.emacs.d/, nothing is being loaded from .emacs.e, I'm sure.
    Either way, "pacman -R emacs" followed by "pacman -S emacs", and the background is still dark:
    >>moderator edit: The image is too large. Please read Forum Etiquette: Pasting Pictures and Code. Thanks. --fsckd<<
    I have no idea of what to do. I spent a few hours on this already, it's frustrating me quite a lot.
    Any ideas? Thank you so much.
    Last edited by ephan (2012-08-15 18:48:43)

    x-rix wrote:
    Are you getting any strange output if you are invoking emacs via command line?
    Also, what DE/WM are you using? I've had some funny colours in emacs and KDE in the past (that was the old KDE, though).
    (Btw, why pacman -R and not pacman -Rs?)
    Actually, Emacs isn't outputting a single character to terminal. I am using Openbox, and also tried Awesome WM, it worked the same.
    (I didn't know of -Rs, thank you )

  • [solved] Vim: console and urxvt have different colors

    Well, as you can see, vim in console (vc/1) and in urxvt has different colors:
    I'd like to have the same colors of console in urxvt (and not the opposite), is there a way?
    I don't know from where the colors of urxvt come from. That blue with which is written '#include' and that green/cyan with which is written 'int' aren't even in my .Xdefaults.
    TIA
    Last edited by andre.ramaciotti (2009-03-08 12:17:16)

    andre.ramaciotti wrote:Is there a way to trick vim so it thinks that urxvt is only 16-colours capable? A $parameter or an option I can set in .vimrc?
    set t_Co=16

  • TTY colors problem (only 8 @ vim + weird behaviour after x started)

    Hi,
    I've got a problem with my tty colors. Everything seems to work pretty ok, but I have two weird problems - one is that vim doesn't display colors properly. It seems like it supports only colors 0-7, no more. My vim scheme & zshrc (dunno if helpful) attached below:
    scheme: mustangzill4.vim
    zshrc: .zshrc
    What's more, when I start X, tty colors seem to become totally messed up. I don't know where are those new color settings taken from, but they're changed somehow and stay like that till next reboot.
    Any help/tip appreciated. Thanks in advance.
    edit: I know that "2xx" colors won't work in linux terminal since it supports only 16colors, but even 16 colors don't work for me under vim.
    Last edited by muchzill4 (2010-01-24 21:00:25)

    I just set up vim and my terminal (urxvt-256 via .Xdefaults) and I'm experiencing this. When I start X, TTY2 picks up a grey background. Just curious about how this configuration should affect a console...
    EDIT:
    Apparently this is less reproducible for me than I thought. After a system upgrade and subsequent reboot, this didn't happen again. Maybe the console liked vim's colors and decided to hold on for a while.
    Last edited by nsoodak (2010-02-03 04:52:53)

  • Vim color glitch using Xterm

    Hello,
    I recently started to use Xterm rather than urxvt, and there's a weird glitch when using vim. I have cursorline enabled, so the background of the cursor line is a different color from the regular background, and I used this config in urxvt and termite and it works properly. However, in Xterm, when I scroll down, the cursor line leaves a "trace" on the background where there is no text.
    http://i.imgur.com/9CO522D.png
    This is a screenshot of the issue I'm having, and I am using vim to edit my colorscheme file, urxvt is on the left and xterm is on the right. As I said, this colorscheme gave me no problems on urxvt and termite, but in case I'm missing something I thought I might as well show it.
    Also, the comments in the colorscheme file shouldn't have a separate background either, and they don't in urxvt, and there shouldn't be yellow highlighting on '=dar' at the top of the colorscheme file. I don't understand why there can be so many differences from terminal to terminal.
    Can anyone help me fix this?
    Thanks,
    wadawalnut
    -- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

    Does the problem occur with other vim colorschemes? Perhaps we can eliminate the colorscheme and any .vimrc configurations or plugins as the source of the problem.
    You can create a very basic .vimrc file, perhaps naming it basic.vim
    set nocompatible
    filetype plugin on
    set t_Co=256
    syntax on
    Start vim using basic.vim instead of your .vimrc:
    $ vim -u basic.vim <file_to_edit>
    Vim should open with the default colorscheme. Then add cursorline highlighting and see if the problem exists.
    :se cul
    If the graphical glitch is there, you've pretty much eliminated your .vimrc as the source of the problem. If the "tracing" problem isn't there, change to a colorscheme where you know it has previously occurred.
    :colo <my_colorscheme>
    Try editing different filetypes to make sure the problem isn't a filetype or syntax plugin.
    Edit: Ctrl+l, (Control plus lowercase L) should refresh the screen in vim.
    Last edited by thisoldman (2015-03-08 18:47:05)

  • [SOLVED] vim can't use colorscheme from ~/.vim/colors

    Hello
    I wanted to use the Molokai Theme for vim. So I downloaded molokai.vim from http://www.vim.org/scripts/script.php?script_id=2340 Copied it to ~/.vim/colors folder. In vim I enter :colorscheme molokai.vim but it can't find it.
    Also install molokai-vim from AUR but still. E185: Cannot find color scheme 'molokai.vim'
    Any thoughts?
    Last edited by blackout23 (2013-04-01 08:15:38)

    I'm sure I tried it with and without extension and it didn't work.
    However after creating a .vimrc (didn't have one before) according to this:
    http://dthettich.tumblr.com/post/131989 … rc-molokai
    It worked.
    @WonderWoofy
    The AUR package installed it into that directory.
    Thanks to all!

Maybe you are looking for

  • Wish List for new release

    this would be my wishlist for a new release, maybe you want to add more. - objectnames longer then 30 characters - alter table command to set the column position in a table for an existing or new column - check constraint ability to check against val

  • Can't configure sync my contacts & calendar on iTunes (10.1.0.56)

    The ability to configure Sync my contacts is not avaliable. When I select sync my contacts the configure button does not respond. As for Sync my calendars - this one I even can't select, the option to select the check box is disabled. I have iPhone 4

  • Use COM (Component Object Model) libraries

    I am new in Java but can write simple application already. Now I have a need to write a simple application to manage my Nokia cellphone via a cable. I have downloaded the Nokia PC Connectivities SDK already. In the manual, it states that "all the lib

  • Restore a mac mini from the disk but getting error

    hi, im trying to restore a mac mini from the disk but its giving me the error "You cant open the app "Install Mac OS X" b/c Power PC apps are no longer supported. What can i do? Trying to sell computer.

  • Flex DataGrid last empty column dynamic width

    Goal: have a blank right-most column in a DataGrid that takes up the slack in case the other columns do not total 100% of the overall grid width. This is what I have, which seems to work: <mx:DataGridColumn editable="false" sortable="false" minWidth=