You are not logged in.
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] --
Offline
Post the content of your terminal configurations file(s) (.Xresources?) plz.
Jin, Jîyan, Azadî
Offline
Sorry, here is my .Xdefaults (for some reason .Xresources never works)
URxvt*geometry: 120x50
URxvt*depth: 32
URxvt*background: [80]#000000
URxvt*foreground: #bed6ff
URxvt*color12: #ffff00
URxvt*color4: #bbbbff
URxvt*scrollBar: false
URxvt*font: xft:Monkey:size=18
!URxvt*font: xft:nexus-font:size=18
URxvt*letterSpace: 3
xterm*background: #060607
xterm*foreground: #bbbbee
!xterm*foreground: #bbffaa
xterm*color12: #444499
xterm*color4: #8888cc
xterm*scrollbar: false
xterm*faceName: Inconsolata:size=14:antialias=true
xterm*font: 80x30
Offline
Are you using a compositor?
If so, which one?
If you are using compton, post the configuration file for that as well.
Jin, Jîyan, Azadî
Offline
I am using compton!
But as far as I'm concerned, I'm not using a custom configuration file.
I'm calling compton in .xinitrc like this:
compton -b -z -c -r 32 -o 0.75 &
Other than that, I haven't played around with compton at all.
Thanks a lot for the help.
EDIT: I tried turning off compton to see if I still had the problems, but unfortunately it didn't work.
Also, I noticed that it seems like vim isn't "refreshing" or clearing the graphics buffer. What I mean by that is if I enter insert mode and then enter normal mode, it still says --INSERT-- on the bottom of the window. If I type :wq, the bottom of the terminal window looks like :wqINSERT --, and if I use the ? search function, the cursor moves to the pattern I searched for, but the text above the cursor is the text from the top of the file.
Last edited by wadawalnut (2015-03-07 19:17:37)
Offline
Are you declaring $TERM in any of your shell profiles?
Last edited by Head_on_a_Stick (2015-03-07 19:20:44)
Jin, Jîyan, Azadî
Offline
I don't think so... I'm not even sure what that means. What does the $TERM variable do? And what should I declare it to, if I should at all?
Offline
I don't think so... I'm not even sure what that means. What does the $TERM variable do? And what should I declare it to, if I should at all?
You should never declare it because it causes all sorts of weird problems -- just let your terminal emulator set it.
For both xterm & rxvt-unicode, look at the output of:
echo $TERM
For rxvt-unicode it should be "rxvt-unicode-256color" and for xterm it should be "xterm"
I have no idea what's going on here and I don't use a colour scheme file for vim so I don't think I can actually help you here, sorry.
Hopefully someone else can.
Jin, Jîyan, Azadî
Offline
Both $TERM variables are what they should be...
But thanks for the help.
Offline
What is this?
URxvt*background: [80]#000000
Also, what is the output of `tput colors` in xterm and urxvt?
You can add this to your .Xresources:
xterm*termName: xterm-256color
Offline
The $TERM variable reports which terminfo file is being used. The terminfo file is a database of the capabilities of the terminal display: the number of available colors, escape sequences, how to erase, etc. The database files are stored under /usr/share/terminfo/.
I had display refreshing problems with vim in xterm in the past, and found that xterm-256color worked better as $TERM than a plain xterm. You can try this for yourself by starting a new xterm instance with the command:
$ xterm -tn xterm-256color &
If this clears the problem, add the line suggested by jasonwryan to your resource file:
xterm*termName: xterm-256color
Offline
The xterm-256color term name didn't change anything unfortunately.
URxvt*background: [80]#000000 is to set the background to black, with 80% opacity I believe. I don't remember exactly what the number inside the square brackets means, I wrote that a long time ago.
The output of tput colors in urxvt is 256.
The output of tput colors in xterm is also 256.
Thanks for the help guys
Offline
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)
Offline
With the basic vimrc, I had no problems!
I'm going to try editing my vimrc because I don't have some of the "basic vimrc" lines in mine.
Thanks a lot for the help!
Offline