Vim colorscheme issues

Hi,
I'm trying to get the solarized theme for Vim working in the terminal http://ethanschoonover.com/solarized.
The problem I'm having is that it doesn't look like the pictures which are on the site; the colors are off. However, the solarized theme claims to support Vim terminal fine. I followed the readme about the setup.
I have copied the Xresources file provided with the solarized theme to my home folder, and I've set up my Vim appropriately. The colors are close, but not quite the same. My TERM setting is set to xterm, not xterm-256color, does this matter if my Xresources file is set up correctly? If not, how do I set up xfce4-terminal so that it does use xterm-256color? I tried changing the environment variable for it in the options instead of setting it in bashrc, but I just get VTE errors. I exported it manually in a terminal session and made sure tput colors outputted 256, but this made no difference when running Vim.
I tried using urxvt but it didn't work correctly and the fonts are really ugly, so I'd rather stick to xfce4-terminal if I can cause it doesn't require as much configuration.
I feel as if I'm missing something, this seems a lot more complicated than it should be to just get a colorscheme working in Vim terminal. Am I missing something?

What do you mean when you say you've set up your vim appropriately? Terminal colorschemes from .Xresources and vim colorschemes from .vim files are different. Did you install the solarized colorscheme for vim? More precisely, did you install solarized.vim file in either ~/.vim/colors or /usr/share/vim/vim73/colors, or alternately install vim-solarized-git from the AUR? Did you add "colorscheme solarized" to your .vimrc? You can check if you've got the solarized colorscheme properly installed for vim by issuing the command "colorscheme solarized" in vim. If solarized isn't recognized as a colorscheme, it's not installed.
Last edited by bananagranola (2013-05-04 18:14:18)

Similar Messages

  • [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)

  • 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 only undo most recent change

    Howdy-ha, folks.  So I've been (very) gradually making the transition from Geany to Vim over several months, mostly without issue.  However, I've been reluctant to use Vim for anything other than quick, simple operations for one reason: The "u" key will only undo the most recent change, as though there aren't any other changes in the history.  Hitting "u" a second time reverses the "undo" command, so that repeatedly hitting it will just remove and add the same small change over and over again.  No matter how much time I spend looking into this it seems I'm the only person who's ever had this problem, and it occurs regardless of whether /etc/vimrc and ~/.vimrc exist.  As a result, I can't do any complex editing for fear of botching something and needing to spend hours backtracing my mistakes.  Any help on this is appreciated.
    Last edited by ANOKNUSA (2012-05-18 15:22:06)

    skanky wrote:It should do. There's a comment in /etc/vimrc recommending against changing, so it's worth looking into. There are other settings there that could affect some behaviour, apparently.
    That would likely be the issue: I overwrote the default with my own config file, without including runtime! archlinux.vim in my own config.  As far as I can tell, things are working as both user and root.  I suppose I should have paid more attention, but then again, there's no mention in the Arch wiki entry about not altering/deleting any of those files:
    Arch Wiki Vim Entry wrote:
    Vim's personal configuration file is located in the home directory: ~/.vimrc. Advanced users tend to keep a well-tailored ~/.vimrc. The global configuration file is located at /etc/vimrc. The fall-back $VIM variable is defined as /usr/share/vim/. For example, to create a global colorscheme the *.vim colorscheme file should be stored in /usr/share/vim/vimfiles/.
    Currently, the vim global configuration in Arch Linux is very basic and differs from many other distributions' default vim configuration file. To get some commonly expected behaviors (like syntax highlighting, return to the line of the last edit...), consider using vim's example configuration file:
    cp /etc/vimrc /etc/vimrc.bak
    cp /usr/share/vim/vim73/vimrc_example.vim /etc/vimrc
    It seems the comment in /usr/share/vim/vimfiles/archlinux.vim is all new users have to go on, and it's not usually the first place anyone looks.

  • [Solved] ViM colors

    How do I have a ViM colorscheme inherit the background colour that is prescribed in Xresources?---Ideally there would be a command like
    hi Normal ctermfg=$XFGLOL ctermbg=$XBG_LOL
    Last edited by tomgg (2013-12-24 03:40:46)

    Glad that worked, please remember to mark the thread as [SOLVED] by clicking "edit" on the first post.

  • "sudo" suspend problem in shell

    env:
    1, whatever shell, here bash and dash
    2, whatever program with a cui itself (vim, mutt, etc..)
    3, sudo (tested 1.8.0-3 and 1.8.0-4)
    1, "sudo vim"
    2, ^Z (ctrl + Z)
    3, "fg"
    4, no problem, type any key pls...
    i can't get my vim back when i once suspend "sudo vim".
    it's fine on a Fedora computer.
    dose anyone have idea to solve this problem?
    thanks!

    firecat53 wrote:We should also see if it affects any other applications (less, ummmm mind blank) or if its a vim configuration issue.
    Every interactive program fails on my machine. Even plain old ed(1).
    I think sudo is to blame. I went back to 1.7.4.p6-1 and it's working again. If you can confirm this, I guess it's best to file a bug report upstream.
    Funny side note: mutt even fails without sudo. I ran mutt via a simple script:
    #!/bin/bash
    mutt
    ^Z, fg, same problem. However, I think this is mutt's own fault. I went back to the last version which uses slang instead of ncurses (1.5.21-1) and that's working. I'll do some more research on this tomorrow.

  • Vim issues...meta keys and colorscheme not working correctly

    The first issue isn't really a vim problem, but it's related.  When running Vim in a terminal, my meta key bindings don't work.  I've tracked it down to a problem with Xfce's Terminal as noted here: http://vimdoc.sourceforge.net/htmldoc/m … p-alt-keys
    ...but I'm not sure exactly how to fix it.  I suppose I could always switch to another terminal, but I'd like to stick with Xfce's version if possible.
    The second issue is that my color scheme isn't being set when I first load up gVim.  As soon as I open a file, it properly displays, but the "splash" page doesn't show it.  I'm using desert (who doesn't) and this is what it looks like when I first load up gVim:
    I did stop using a separate <code>.gvimrc</code> in favor of putting everything in my <code>.vimrc</code> file under a conditional, and all the other settings work just fine.  Here's what that conditional looks like:
    if has( "gui_running" )
    set columns=84 " Set the window's width
    set lines=43 " Set the window's height
    set guioptions-=T " Remove the toolbar from the window
    set guifont=Terminus 12 " Use a clean monospaced font
    colorscheme desert
    else
    set background=dark
    colorscheme desert
    endif
    In case you're curious, here's my entire <code>.vimrc</code> file.

    phrakture wrote:IIRC this happens for because gvim does not find a ~/.gvimrc and reads /etc/gvimrc after ~/.vimrc (I think).
    Try symlinking ~/.vimrc to ~/.gvimrc
    That solved the problem for me. Thanks 

  • [SOLVED] Problem with vim and wombat colorscheme

    Hi there,
    I'm having some problems with wombat colorscheme for vim. It's just working on gvim.
    I read somewhere that wombat just work in gvim. Is that right ? I'm already using a 256-colors terminal (rxvt-unicode).
    I looked here in the forum, but I didn't find anything about.
    Just for information I downloaded it from http://www.vim.org/scripts/script.php?script_id=1778
    Last edited by lsathler (2011-07-06 18:11:00)

    yngwin wrote:You can use wombat256: http://www.vim.org/scripts/script.php?script_id=2465
    Thanks for helping. It worked like a charm !

  • [PART SOLVED] Random j, k characters appearing on lines. A vim issue?

    Hi There,
    I recently noticed that when scrolling around a file using the keys j and k in normal mode that random j and k characters appear at the end of lines. Initially I thought this was a terminal issue so I switched terminals, no luck. I removed all erroneous crap from .vim, no luck. I have googled around a bit, and it appears this is a known issue with jslint, but this is occuring with no plugins. Ctrl-l removes the random characters, and they don't appear to be getting written to the file, but it is annoying non the less.
    Any thoughts?
    Thanks.
    Last edited by ZombieX (2012-05-25 12:36:50)

    Thanks for the reply. In my case, it appears more frequent when you scroll back and forth over pages using j and k. I haven't noticed anything with the 'O' command but I will keep an I out. I haven't been able to find the root cause of this, nor have I found any 'real' fixes so I either deal with it or use emacs with VIM bindings. I'll consider this closed.

  • [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!

  • Vim issue

    Hello everyone
    Recently I experience some issue with Vim. It does not allow me to properly edit a file.
    Direction buttons instead of proper cursor movement produces "ABCD" letters in new lines.
    There are more strange behaviours. The only way to prevent file spoilage is to just close Vim without saving.
    I reinstalled Vim several times and both normal and root user terminals are affected. New user is affected too.

    Are you sure you are running vim and not vi. Vi isn't designed for arrow keys so you get that exact output when running it.

  • Weird issue backgrounding "sudo vim"

    I'm having a strange issue backgrounding vim when executed using sudo. I'll try my best to explain it, because I'm stumped. When I attempt to foreground the process, the console draws the vim interface, but as soon as I type, the process is backgrounded again. I've ruled out my user's .vimrc/vim directory, as well as the type of terminal I'm using (tested in VT, rxvt-unicode, and XFCE terminal).
    I appreciate any insight anyone may have regarding this, it's driving me nuts because this worked on my system a month ago.

    Look at the "-e" argument, or the sudoedit command. The manpage states that when using this argument/command, the environment should remain unmodified, but the problem persists. Again, I can confirm that I used this heavily on my Arch system in the past, and can also confirm that it works using my Debian server (which is using software from their testing repository).
    Thanks for the input either way .

  • (g)vim issue (replaces vim binary with symlink to vim-big)

    Why does the installation of gvim replaces the binary (or not binary, or whatever it is, even if it is a text file, maybe i want to keep a text file at this location …) located at /usr/bin/vim with a symlink to /usr/bin/vim-big without asking the user to do so?
    Last edited by Dirk Sohler (2010-02-05 19:19:18)

    It is a symlink.   The symlink is owned by the vim package.  As vim is a dep for gvim, that file is being managed by the package manager.
    Saying I want to store a file there is like saying I want to store a text file at /bin/bash...   Sure you could, but do not expect bash to keep working.
    So what exactly is your issue here?

  • [solved] VIM and colorschemes

    Hi Everybody
    I try to setup up vim on my machine. Everything works fine but the colorscheme has wrong colors. (I am working with konsole)
    in my .vimrc
    set t_Co=256
    syntax on
    set background=light
    colorscheme solarized
    No matter what i try, konsole seems to override the colorscheme... I already tried to add TERM=xterm-256color ...
    May someone point out the mistake I made?
    Thank you!
    Last edited by wucherpfennig (2014-08-25 20:38:43)

    Thanks for your quick answer
    somehow I missed that...
    #~/.bashrc
    TERM=konsole-256color
    #~/.vimrc
    let g:solarized_termcolors=256
    syntax enable
    set background=light
    colorscheme solarized

  • Unreadable Vim tab completion bar with default colorscheme in console

    Hi,
    I am talking about the bar in Vim that shows up when I type, for example, ":colorscheme <Tab>".
    When using the default color scheme, a dark background and t_Co=8 in the console, this bar is light gray on white, which is barely readable.
    I have this in my .vimrc:
    if &term=~'linux'
    set t_Co=8
    set background=dark
    else
    set t_Co=256
    set background=light
    endif
    Though when in X, I can manually set t_Co=8 and background=dark and the tab completion bar has high contrast, i.e. black on white. (Obviously, for this test I set my terminal background color to black.)
    Last edited by LovelyAlien (2011-11-07 12:17:28)

    frabjous wrote:
    Try opening the file with:
    vim -u NONE filename.tex
    (This will disable your .vimrc and other scripts from loading for the session.)
    ....and see if it's slow then.
    Thanks for the reply.
    Hmm.. Indeed, by doing something like that to the same .tex file, vim is fully responsive.
    So it seems that the .vimrc is 'causing all that. I guess that I should start commenting
    out things in the .vimrc until I see where the problem is...

Maybe you are looking for

  • Approver time sheet - buyer purchase order

    Hi guru, I have the following problem. I'm the buyer of purchase order for external services.  The external employees compile the time sheet filling the field "sender purchase order" with my purchase order. When I use the transaction CATS_APPR_LITE,

  • Upgrade Mac OS 10.5.8

    I heard that once I upgrade from 10.5.8 to snow leopard certain features like iPhoto will no longer be there. Is this true?

  • MAC OS X 10.4.7, where can I buy? ORIGINAL LOST! :(

    Hi trying to install my version of 10.4.7 which works on my ibook G4. But I recently bought a 2nd Hand G5 iMac 1.83 Ghz Intel duo. I loaded the disk and it does'nt seem to want to work? It's saying the destination is not suitable? Would I need to buy

  • Hash Joins

    I was wondering if someone can give me an example of how hash join works in java... some code wld be really helpful How do I apply a hashing function? Does it mean just get the hashcode of the object ?

  • Another ORA-12560

    I keep getting a ORA-12560 error when connecting via SQL+. I know my TNSNames file is good because its the same one I use on my laptop. My TNS file is located here: D:\app\staomappadmin\product\11.2.0\network\ADMIN TNS_ADMIN env variable is set to: D