You are not logged in.

#1 2013-03-21 19:32:46

soulrainX
Member
Registered: 2013-03-20
Posts: 48

[SOLVED] Vim Color Schemes

Been at this for a few hours have run out of ideas.

I am trying to get change vim color scheme and it only works for the the default pre-loaded ones that come with vim
which are located: /usr/share/vim/vim73/colors/

I created ~/.vim/colors and downloaded additional themes from vim.org and they load :color <theme name> but nothing changes.

I use xterm and ran a perl script which checks for 256 color and I think it is fine:
http://i48.tinypic.com/6sg8ar.jpg

I have no idea why I would be able to use the preinstalled color schemes and not new ones... If anyone has any ideas I would love to know.




-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

Last edited by soulrainX (2013-03-22 15:58:08)


n00b learning linux
arch + lxde

Offline

#2 2013-03-21 19:44:40

MagicSkyFairy
Member
Registered: 2013-03-14
Posts: 79

Re: [SOLVED] Vim Color Schemes

Try vivify, maybe?

edit: This manual way might work too.

http://vim.wikia.com/wiki/Change_the_color_scheme

I THINK that the file you would put the "colorscheme <colorscheme>" is /usr/share/vim/vimfiles/archlinux.vim.

Also, is it showing ANY syntax highlighting?  Or is it just the system's default colors(not vim's, SYSTEM'S)?

If it's the latter then maybe try typing this in vim:

:syntax on

These are just ideas I'm throwing at you.  Good luck.

Last edited by MagicSkyFairy (2013-03-21 19:51:12)


I have wasted atleast a second of your time by making you read my signature.

Offline

#3 2013-03-21 19:44:43

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [SOLVED] Vim Color Schemes

Try setting the following in your .vimrc:

set t_Co=256
colorscheme <your_theme>

BTW, fix your locale and set the language properly (relevant Wiki entry).

Edit:

MagicSkyFairy wrote:

Try vivify, maybe?

What for? The OP has to set his environment properly, not edit existing / create new color schemes...

Last edited by bohoomil (2013-03-21 19:46:50)


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#4 2013-03-21 20:27:46

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

Thanks for the locale link .... just got it fixed!

I added, as you suggested,

set t_Co=256

Already had color scheme ... still unable to load new color schemes

As per vim wiki even tried:

set t_AB=^[[48;5;%dm
set t_AF=^[[38;5;%dm

which they suggest may be necessary
http://vim.wikia.com/wiki/256_colors_in_vim
Still nothing...

The search continues!


n00b learning linux
arch + lxde

Offline

#5 2013-03-21 20:34:31

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

MagicSkyFairy wrote:

Try vivify, maybe?

edit: This manual way might work too.

http://vim.wikia.com/wiki/Change_the_color_scheme

I THINK that the file you would put the "colorscheme <colorscheme>" is /usr/share/vim/vimfiles/archlinux.vim.

Also, is it showing ANY syntax highlighting?  Or is it just the system's default colors(not vim's, SYSTEM'S)?

If it's the latter then maybe try typing this in vim:

:syntax on

These are just ideas I'm throwing at you.  Good luck.

I don't think you are supposed to mess with /usr/share/vim/vimfiles/archlinux.vim as per the comments in said file:

" NEVER EDIT THIS FILE, IT'S OVERWRITTEN UPON UPGRADES, GLOBAL CONFIGURATION
" SHALL BE DONE IN /etc/vimrc, USER SPECIFIC CONFIGURATION IN ~/.vimrc


I already had

sytax on

in my .virmc file


Thanks for the post though never knew that file even existed!


n00b learning linux
arch + lxde

Offline

#6 2013-03-21 20:37:14

MagicSkyFairy
Member
Registered: 2013-03-14
Posts: 79

Re: [SOLVED] Vim Color Schemes

soulrainX wrote:

Thanks for the locale link .... just got it fixed!

I added, as you suggested,

set t_Co=256

Already had color scheme ... still unable to load new color schemes

As per vim wiki even tried:

set t_AB=^[[48;5;%dm
set t_AF=^[[38;5;%dm

which they suggest may be necessary
http://vim.wikia.com/wiki/256_colors_in_vim
Still nothing...

The search continues!

This is a long shot, but did you try adding just one theme, or have you tried different ones?  Maybe it's the theme itself.  Other than that, I'm out of ideas.  I'll leave you with these two links I found on Google. Maybe they'll help...

http://stackoverflow.com/questions/4037 … eme-change

http://superuser.com/questions/196689/c … ork-in-vim

edit: Good call on the archlinux.vim file, man!  I didn't even read the all caps text.  Maybe if it was bold and blinking I would of seen it. haha

Last edited by MagicSkyFairy (2013-03-21 21:07:27)


I have wasted atleast a second of your time by making you read my signature.

Offline

#7 2013-03-21 22:05:35

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

MagicSkyFairy wrote:
soulrainX wrote:

Thanks for the locale link .... just got it fixed!

I added, as you suggested,

set t_Co=256

Already had color scheme ... still unable to load new color schemes

As per vim wiki even tried:

set t_AB=^[[48;5;%dm
set t_AF=^[[38;5;%dm

which they suggest may be necessary
http://vim.wikia.com/wiki/256_colors_in_vim
Still nothing...

The search continues!

This is a long shot, but did you try adding just one theme, or have you tried different ones?  Maybe it's the theme itself.  Other than that, I'm out of ideas.  I'll leave you with these two links I found on Google. Maybe they'll help...

http://stackoverflow.com/questions/4037 … eme-change

http://superuser.com/questions/196689/c … ork-in-vim

edit: Good call on the archlinux.vim file, man!  I didn't even read the all caps text.  Maybe if it was bold and blinking I would of seen it. haha

Hey thanks MagicSkyFairy... Ya the links you posted I have already read but I appreciate the help nonetheless. I am also out of ideas but will work on it tomorrw a bit. Even though I did not figure it out still learned a lot so
was worthwhil. Oh and to your question about how many themes I tried... I though about that too and tried a bunch... For whatever reason the default ones work the other ones I dld don't... no idea.


n00b learning linux
arch + lxde

Offline

#8 2013-03-21 22:10:31

FreeTheBee
Member
Registered: 2011-01-02
Posts: 125

Re: [SOLVED] Vim Color Schemes

Did you try using :colorscheme instead of :color ?

Offline

#9 2013-03-21 23:08:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,414

Re: [SOLVED] Vim Color Schemes

soulrainX wrote:

    Yup there are the same command.

Moderator comment: I think you hit the 'report' link rather than the 'Reply' link.  (Just in case you are wondering where your post went smile )


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#10 2013-03-21 23:33:38

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

ewaller wrote:
soulrainX wrote:

    Yup there are the same command.

Moderator comment: I think you hit the 'report' link rather than the 'Reply' link.  (Just in case you are wondering where your post went smile )

lol sorry!


n00b learning linux
arch + lxde

Offline

#11 2013-03-21 23:34:16

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

FreeTheBee wrote:

Did you try using :colorscheme instead of :color ?

they are the same command...thanks for the suggestion though!


n00b learning linux
arch + lxde

Offline

#12 2013-03-21 23:56:14

dag
Member
From: US
Registered: 2013-01-20
Posts: 216

Re: [SOLVED] Vim Color Schemes

customs work for me

mkdir -p ~/vim/color

then just put it in the color dir and add it to vimrc with no .vim extension


--------------------------------------
alcoves wonder creates the wonder unto the ages; never lose that.

Offline

#13 2013-03-22 00:04:59

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

dag wrote:

customs work for me

mkdir -p ~/vim/color

then just put it in the color dir and add it to vimrc with no .vim extension

yup exactly what I have done thus my confusion...


n00b learning linux
arch + lxde

Offline

#14 2013-03-22 00:13:19

dag
Member
From: US
Registered: 2013-01-20
Posts: 216

Re: [SOLVED] Vim Color Schemes

what does your vimrc look like?


--------------------------------------
alcoves wonder creates the wonder unto the ages; never lose that.

Offline

#15 2013-03-22 00:56:03

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

dag wrote:

what does your vimrc look like?

syntax on
set t_Co=256
colorscheme zmrok

n00b learning linux
arch + lxde

Offline

#16 2013-03-22 01:02:15

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [SOLVED] Vim Color Schemes

Try adding '~/.vim' to your runtime path. In your .vimrc:

set nocompatible

set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME

set t_Co=256
syntax on
colorscheme zmrok

Offline

#17 2013-03-22 01:28:18

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,273

Re: [SOLVED] Vim Color Schemes

Just in case it was not a mere typo. Vim looks in the ~/vim/colors directory (not color) for colorschemes.


To know or not to know ...
... the questions remain forever.

Offline

#18 2013-03-22 04:22:49

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [SOLVED] Vim Color Schemes

bernarcher wrote:

Just in case it was not a mere typo. Vim looks in the ~/vim/colors directory (not color) for colorschemes.

I will go even further and say: ~/.vim/colors...


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#19 2013-03-22 09:10:59

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

ya I have it as /home/userName/.vim/colors


n00b learning linux
arch + lxde

Offline

#20 2013-03-22 09:20:14

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

thisoldman wrote:

Try adding '~/.vim' to your runtime path. In your .vimrc:

set nocompatible

set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME

set t_Co=256
syntax on
colorscheme zmrok

just copy and pasted into my .vimrc did not remedy the situtation.

once again the oddity is like

:color blue
:color desert

work fine which I believe are the stock vim colorschemes that vim works with but additional ones do not work.

You can tab through them and it shows there are set

:color <tab>

but the changes do not take efffect... Could it be that somehow my .Xresources is overwriting them somehow? And if this is the case why wouldn't they prevent the stock color schemes?

Anyway I do appreciate the suggestions.

Last edited by soulrainX (2013-03-22 09:21:03)


n00b learning linux
arch + lxde

Offline

#21 2013-03-22 09:55:57

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

UPDATE:

so the txt highlilghting seems to be fine now, just removed and reinstalled vim, but backgrounds are giving me an issue.

So just randomly doing :color <someColorScheme> these are the ones that actually change the background from the ones I tested:

Mustang
autumn
autumn2
autumnleaf
baycolmb
...
wombat does not work but wombat256 works could it be that only 256 color themes work?

So ya I think it has to do with either being 256 or there is something else in the colorsheme.vim that I am not addressing.

Will definitely learn more about the files as I want to cobble together a few of my own.

If anyone has any ideas would love to hear.

cheers.

Last edited by soulrainX (2013-03-22 09:57:16)


n00b learning linux
arch + lxde

Offline

#22 2013-03-22 11:02:07

dag
Member
From: US
Registered: 2013-01-20
Posts: 216

Re: [SOLVED] Vim Color Schemes

my custom is dark solarized with my default background; solarized has a nice syntax.

wombat does not work but wombat256 works could it be that only 256 color themes work?

you do have set t_Co=256 maked wouldnt it depend on you terminal and thus A  256 terminal would work with 256 themes and backwords compadible. maybe somthing like

set term=xterm-256color

just a quess


--------------------------------------
alcoves wonder creates the wonder unto the ages; never lose that.

Offline

#23 2013-03-22 11:14:32

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [SOLVED] Vim Color Schemes

Some colorschemes are gvim only, they will not work in a terminal emulator.  In xterm, run the following (that's a lowercase 'L' in the first command):

$ grep -l cterm ~/.vim/colors/*.vim    ## Colorschemes that should work
$ grep -L cterm ~/.vim/colors/*.vim    ## Colorschemes that will not work

Please don't set the TERM variable from a dotfile. Use xterm's 'termName' resource:

$ xterm -tn xterm-256color    ## Command line
    -- OR --
! Resource file:
xterm*termName: xterm-256color

Offline

#24 2013-03-22 12:17:06

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

thisoldman wrote:

Some colorschemes are gvim only, they will not work in a terminal emulator.  In xterm, run the following (that's a lowercase 'L' in the first command):

$ grep -l cterm ~/.vim/colors/*.vim    ## Colorschemes that should work
$ grep -L cterm ~/.vim/colors/*.vim    ## Colorschemes that will not work

Please don't set the TERM variable from a dotfile. Use xterm's 'termName' resource:

$ xterm -tn xterm-256color    ## Command line
    -- OR --
! Resource file:
xterm*termName: xterm-256color

Ah makes sense! Thanks for the dotfile advice just changed.


n00b learning linux
arch + lxde

Offline

#25 2013-03-22 12:30:09

soulrainX
Member
Registered: 2013-03-20
Posts: 48

Re: [SOLVED] Vim Color Schemes

dag wrote:

my custom is dark solarized with my default background; solarized has a nice syntax.

wombat does not work but wombat256 works could it be that only 256 color themes work?

you do have set t_Co=256 maked wouldnt it depend on you terminal and thus A  256 terminal would work with 256 themes and backwords compadible. maybe somthing like

set term=xterm-256color

just a quess

ya solarized looks pretty cool and ya it should be backward compatible I believe thisoldman hit the nail on the head.


n00b learning linux
arch + lxde

Offline

Board footer

Powered by FluxBB