You are not logged in.

#1 2008-11-18 16:51:40

niller
Member
From: Denmark
Registered: 2008-02-12
Posts: 91

urxvt and vim bothering

I'm trying desperately to make urxvt show some nice colors AND use my vim color scheme (gentooish) !

But no matter what I do I cant have both !

I want to use urxvt because i like the tabmode, but somehow it breaks my vim theme !

I know this issue has been brougth here in this forum, and I've read all of them, but I cant find a solution that works properly with my setup.

Help is needed !!


/Niels
Registered Linux user #133791
Get counted at http://counter.li.org

Offline

#2 2008-11-18 16:53:58

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: urxvt and vim bothering

vim (as used in a terminal) supports only 16-colour themes by default--the same 16 colours that you define in ~/.Xdefaults.  Gvim, on the other hand, provides full theming capabilities.

Last edited by thayer (2008-11-18 16:54:21)


thayer williams ~ cinderwick.ca

Offline

#3 2008-11-18 16:57:17

niller
Member
From: Denmark
Registered: 2008-02-12
Posts: 91

Re: urxvt and vim bothering

Thanks for replying smile

Could you be more specific please ?

My .Xdefaults looks like this

! Colours
!URxvt*foreground:       #BBBBBB
URxvt*foreground:       #FFFFFF
URxvt*background:       #191919

URxvt*colorBD:          #EEEEEF

! Black
URxvt*color0:           #404040
!URxvt*color8:           #252525

! Red
URxvt*color1:           #C12121
URxvt*color9:           #E50E0E

! Green
URxvt*color2:           #75BD00
URxvt*color10:          #89b83f

! Yellow
URxvt*color3:           #EDD76A
URxvt*color11:          #efef60

! Blue
URxvt*color4:           #4F6FAE
URxvt*color12:          #3F6FD0

! Magenta
URxvt*color5:           #706c9a
URxvt*color13:          #826ab1

! Cyan
URxvt*color6:           #508695
URxvt*color14:          #a1cdcd

! White
URxvt*color7:           #BBBBBB
URxvt*color15:          #EEEEEF

! Settings
URxvt*termName:             xterm
URxvt*loginShell:           false
URxvt*scrollBar:            false
URxvt*saveLines:            10000
URxvt*font:                 xft:Terminus:size=11


!URxvt*shading:              +10
URxvt*geometry:             90x35
URxvt*internalBorder:       0
!URxvt*perl-ext-common:      default,matcher
URxvt*colorUL:              white
URxvt*urlLauncher:          firefox
URxvt*matcher.button:       1
URxvt*cursorUnderline:      false
URxvt*boldFont:             xft:Terminus:size=11
URxvt*scrollTtyOutput:      false
URxvt*scrollTtyKeypress:    true
URxvt*scrollKey:            true
URxvt*scrollWithBuffer:     false
Xft.dpi:                   96

XTerm*font:                9x15
XTerm*background:          black
XTerm*foreground:          white

/Niels
Registered Linux user #133791
Get counted at http://counter.li.org

Offline

#4 2008-11-18 19:57:45

niller
Member
From: Denmark
Registered: 2008-02-12
Posts: 91

Re: urxvt and vim bothering

Nevermind I think I'll try to get used to gvim smile


/Niels
Registered Linux user #133791
Get counted at http://counter.li.org

Offline

#5 2008-11-18 20:02:16

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: urxvt and vim bothering

You can enable 256 colors in vim, if your terminal supports it.  :set t_Co=256.  You then need to use a colorscheme that also supports 256 colors such as inkpot.

See: http://vim.wikia.com/wiki/256_colors_in_vim

Last edited by rson451 (2008-11-18 22:21:11)


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#6 2008-11-18 22:12:35

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: urxvt and vim bothering

thayer wrote:

vim (as used in a terminal) supports only 16-colour themes by default--the same 16 colours that you define in ~/.Xdefaults.  Gvim, on the other hand, provides full theming capabilities.

Actually, vim has support for 88 and 256 color modes. It *should* detect this just fine and do things properly.

The root of the problem: setting termName to something that is NOT the terminal you're using. I have no idea where people get this idea from, but it's wrong wrong wrong. If you're using urxvt, the termname is not "xterm". Just delete that line. The terminal knows it's own name very well.

More to the point - xterm does not support more than 16 colors. So telling every other application that "this terminal is xterm" is ALSO telling those apps to use 16 colors. Again... just delete this line.

Offline

#7 2008-11-19 07:48:44

niller
Member
From: Denmark
Registered: 2008-02-12
Posts: 91

Re: urxvt and vim bothering

Well, I delete this line and colors went back into vim smile

But the colorscheme still isn't right hmm

I also deleted the colorlines in .Xdefaults, but still the colors isn't as it is supposed to be.

Apparently the gentooish colorscheme makes trouble in a terminal, like the author says on his website:
http://briancarper.net/2008/05/10/vim-c … gentooish/

Should have noticed this hmm sorry.

I thought it was a problem with my terminal setup beacuse I have problems with the backspacekey and Alt+d when deleting words in xterm, but I will start a new thread about this.

I am going to use gvim instead smile

Last edited by niller (2008-11-19 07:52:28)


/Niels
Registered Linux user #133791
Get counted at http://counter.li.org

Offline

#8 2008-11-19 17:16:27

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: urxvt and vim bothering

nothing to do with colours, but ...
I can no longer (vi/vim) use the mouse to select/paste *big sigh*
I must've been using it more than I realized!!

Can anyone tell me how to get that behaviour back?

Offline

#9 2008-11-19 17:50:10

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: urxvt and vim bothering

:set mouse=a ?


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#10 2008-11-19 18:13:59

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: urxvt and vim bothering

Regarding GUI colorschemes on the terminal. You can try: http://www.vim.org/scripts/script.php?script_id=1809

Offline

#11 2008-11-20 03:25:34

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: urxvt and vim bothering

:set mouse=a ???

OK, I tried that but no luck.
doing a ':set all', the only reference (that I could see) to 'mouse' was 'set ttymouse=xterm2' - I tried that as well but with equal result (ie no dice)

This is really starting to annoy me big time. What the hell has happened - and exactly _which_ update did it?
As far as I can remember, it must have been at least a couple of months ago - I did notice it at one point, but I had other fish to fry at the time, so didn't think too much about it. Now I really _do_ miss it!!
For the record, I'm running xfce - but I do believe this is more a vi/vim problem - I can use the mouse to select/paste easily enough in 'terminal/gnome-terminal/konsol' when using the cli ...

[edit]
Humble apologies - 'set mouse=a' _does work_ in vim, but not vi ... and I do prefer vi, though that might just be old habit - I could always alias it ...

Last edited by perbh (2008-11-20 03:39:08)

Offline

#12 2008-11-20 05:44:43

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: urxvt and vim bothering

The vi binary loads ~/.virc not ~/.vimrc. You could try symlinking them

Offline

#13 2008-11-20 14:46:01

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: urxvt and vim bothering

Thanks phrakture, I'll try that ... although ..
When I tested it out in vi I did it inside of vi ':set mouse=a' and it didn't help.
Guess my best bet is to use vim instead and just make vi an alias for vim ... :-(

I don't know about the rest of you - but some of these colour-schemes for vim (and vi for that matter) really sucks. Whether I use a black or white (actually I prefer semi-transparent) background, there is always something that you just cannot see properly. Also the search highlights are always carried over from one session to the next - irritates the life outta me!
Now I've turned off search highlighting and 'syntax off' - just as it used to be in days of yore *chuckles* - and of course, the ~-files which never used to be there and now crops up all over the place.
For anyone suffering from the same woes - add this to your .vimrc
set nobackup
set nowritebackup
set noswapfile  " mind you, swapfiles may be handy - it has saved me on a couple of occasions

Offline

#14 2008-11-20 14:51:36

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: urxvt and vim bothering

I use a theme called darkdot and I've not encountered problems reading with these colors and I use a semi-transparent black term.  The default themes do suck for the most part, you just have to look for something you like.  The ~ file thing is a recent change in the default config I believe.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#15 2008-11-20 16:17:58

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: urxvt and vim bothering

... running off to check for 'darkdot' ...
:-( - alas, it's not there.
In all honesty, I couldn't remember it and I am sure I have tried _every_ colorscheme there is, at least all those in /usr/share/vim/colors

Where did you find your 'darkdot' ?

Offline

#16 2008-11-20 16:49:35

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: urxvt and vim bothering

https://trac.hvergi.net/arnarmisc/brows … arkdot.vim is one place.  If you don't trust the security cert, I'm sure google knows of others.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#17 2008-11-20 17:21:48

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: urxvt and vim bothering

rson - thanks for the link.
I downloaded it and it blew up in my face!! (that's not your fault!) - I need to do some detective work here ..

I have managed to get the mouse to work of-sorts with 'set mouse=a', but there is still a long way to go *sigh*
In the old days - there was a 'mouse cursor' and a 'key cursor' and the mouse was used to select parts of text while the 'key cursor' decided where the selection was pasted. This has been in vi/vim since time immortal - at least since 'X' *chuckles*. Nowadays - the two cursors seem to be the same and there is no rhyme or reason to how they all interact. Heck - I can't even do ctrl/c and ctrl/v (ala nedit). And this is called progress?!?!?! The only advantage is that I can use the mouse to scroll, but quite honestly, my fingers are so used to use arrows or ctrl-keys that I dont even _think_ about the mouse.

Thanks for letting me rant on your forum!!

Offline

#18 2008-11-21 23:37:35

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: urxvt and vim bothering

So going back to the OP, what's the solution?

I'm using rxvt with psuedo-transparency. I like having it on usually, but once I get into VI I get irritated by my background eating up certain shades of color. (My background isn't complicated, but has thin stripes of most of the color spectrum.) So I just use the "evening" color scheme, which uses a solid background.

With TERM=xterm, vi uses the desired black background in rxvt. With TERM=rxvt-unicode, I get a grey background. But with TERM=rxvt I get the desired black background. So for now, I have TERM=rxvt, but I don't know enough about the differences of rxvt vs urxvt to know if, as phrakture aluded to above, I'm not providing the full (enough) truth to shell-run apps.

Offline

#19 2008-11-22 02:46:51

rscholer
Member
From: Gelsenkirchen, Germany
Registered: 2008-07-03
Posts: 48

Re: urxvt and vim bothering

B-Con wrote:

With TERM=xterm, vi uses the desired black background in rxvt. With TERM=rxvt-unicode, I get a grey background. But with TERM=rxvt I get the desired black background. So for now, I have TERM=rxvt, but I don't know enough about the differences of rxvt vs urxvt to know if, as phrakture aluded to above, I'm not providing the full (enough) truth to shell-run apps.

Why don't you set the following alias in your .bashrc?

[ "$TERM" = "rxvt-unicode" ] && alias vim='TERM=xterm vim'

This way you only affect a specific program rather than all of them.

Last edited by rscholer (2008-11-22 02:47:43)

Offline

#20 2010-05-26 13:04:02

VSpike
Member
From: Salisbury, UK
Registered: 2009-10-19
Posts: 12
Website

Re: urxvt and vim bothering

I had a problem with zenburn colorscheme working in xterm but not in urxvt.  The fix for me was to install unicode-rxvt-256color from [community] and now it works fine!

Offline

#21 2010-05-26 13:06:05

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: urxvt and vim bothering

VSpike wrote:

I had a problem with zenburn colorscheme working in xterm but not in urxvt.  The fix for me was to install unicode-rxvt-256color from [community] and now it works fine!

This thread is 2 years old. I bet the op have solved it by now.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#22 2010-05-26 15:08:03

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: urxvt and vim bothering

How do people even find these when looking for stuff? sad

Offline

#23 2010-07-22 04:19:15

print
Member
Registered: 2007-02-27
Posts: 174

Re: urxvt and vim bothering

Daenyth wrote:

How do people even find these when looking for stuff? :(

Google


% whereis whatis whence which whoami whois who

Offline

#24 2010-07-22 10:51:00

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: urxvt and vim bothering

print wrote:
Daenyth wrote:

How do people even find these when looking for stuff? sad

Google

Don't bump necroposted threads......

Oh, wait. /facepalm/


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#25 2010-07-22 11:45:31

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: urxvt and vim bothering

http://wiki.archlinux.org/index.php/For … Bumping.27

2-year old thread is old.  Closing

Offline

Board footer

Powered by FluxBB