SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to use a different vim color scheme and I am running into issues.
1) I don't have a ~/.vimrc file; should I copy the file located in /usr/share/vim/vimrc?
2) I am not sure where vim is looking for the color scheme files. I see a few .vim files (color scheme files) in the /usr/share/vim/vim74/colors directory, but when I run :colorscheme delek.vim, for example, it give me a color scheme not found error.
You can create your own ~/.vimrc from scratch, or try to work from the copy you mentioned, or examples found on the net.
My own started a long time ago when using Mandrake 7.2 and I have brought it along and modified it and it is among the first things I install with a new Slackware installation.
Color schemes are found in /usr/share/vim/vim74/colors/... in Slackware 14.1, as you have noted. Try it like this (without the .vim file extension):
Code:
:colorscheme delek
Here too I have my own I always install as /usr/share/vim/vim7x/colors/robert.vim. Then in my ~/.vimrc I add the line:
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 928
Rep:
Some color schemes (256 colors I guess) only work in gvim, they look a little bit awful in vim.
You can maintain only one .vimrc for both, instead .vimrc and .gvimrc,
this if does the magic
Code:
if has("gui_running")
" GUI is running or is about to start.
" Maximize gvim window.
"set lines=999 columns=999
set lines=45 columns=120
colorscheme peachpuff
else
" This is console Vim.
"if exists("+lines")
" set lines=50
"endif
"if exists("+columns")
" set columns=100
"endif
colorscheme blue
endif
This needs a terminal that supports 88 or 256 colours (Slackware's xterm is compiled with 88 and 256 colours support; KDE's konsole should work as well. Here is a script which can be used to test for 256 colour support: https://gist.github.com/justinabrahms/1047767.)
lems
p.s. One might need to use:
Code:
set t_Co=256
Last edited by lems; 02-02-2014 at 06:11 AM.
Reason: 265 -> 256
I had more luck with the following code (from this link) on the linux console:
Code:
for x in 0 1 4 5 7 8; do for i in `seq 30 37`; do for a in `seq 40 47`; do echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "; done; echo; done; done; echo "";
lems
Last edited by lems; 02-02-2014 at 09:03 AM.
Reason: Quote was wrong
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 928
Rep:
Quote:
Originally Posted by lems
Hi Paulo2,
I had more luck with the following code (from this link) on the linux console:
Code:
for x in 0 1 4 5 7 8; do for i in `seq 30 37`; do for a in `seq 40 47`; do echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "; done; echo; done; done; echo "";
lems
You're right, I forgot that we have the normal colors, plus the bold ones, plus the background colors.
I tried once write a color scheme with only console colors but it is very hard and time consuming,
then I chose the blue scheme.
I am not sure if this is the appropriate place to post this, but I like to use xfce4-terminal, and I was looking for a way to change the color scheme for that as well. It comes with some pre-set color schemes that you can change through the menu within xfce4-terminal, but you can also edit the file located at ~./config/xfce4/terminal/terminalrc. What I did was just copied these lines (minus the first configuration line) to that file:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.