You are not logged in.

#1 2013-07-21 22:07:26

oddlogic
Member
Registered: 2013-03-16
Posts: 14

[SOLVED] Terminal Issues After Closing vim

I installed zsh yesterday, moving from bash with oh-my-zsh. Now, whenever I exit vim, my urxvt command prompt is always at the very bottom and the rest of the window is blank in-between where I ran the command that opened vim. This is frustrating because I am used to the behavior where, upon vim's close, the terminal opens a new prompt on the next line under the line that opened vim. I think it has something to do with my $TERM variable, but I'm not sure what is wrong.

Some additional minutiae:
If I log into my ssh server with putty, the problem is still there unless I make putty specify that it is supposed to use TERM=putty. The problem goes away in the remote terminal then, but I haven't been able to figure out why my local terminals still have this problem.

Last edited by oddlogic (2013-07-22 23:23:18)

Offline

#2 2013-07-21 22:16:56

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Terminal Issues After Closing vim

It does sound like a TERM issue, but without any information about your TERM, it is only possible to speculate...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-07-21 22:21:06

oddlogic
Member
Registered: 2013-03-16
Posts: 14

Re: [SOLVED] Terminal Issues After Closing vim

Well, if I do

echo $TERM

on a local terminal, it says

rxvt-unicode

I have something in my .Xresources that might also be relevant:

urxvt*termName:rxvt-unicode

This is a perplexing issue, to say the least.

Offline

#4 2013-07-21 22:25:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Terminal Issues After Closing vim

Are you setting that variable in one of the shell initialization files?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-07-21 22:57:31

oddlogic
Member
Registered: 2013-03-16
Posts: 14

Re: [SOLVED] Terminal Issues After Closing vim

I've grep'd for "TERM=" in everything I can think of in my dotfiles, (.zshrc, .xinitrc) as well as the configs that are sourced from /usr/share/oh-my-zsh/, to no avail. I don't have the variable being set anywhere that I can tell. Does it need to be explicitly set?

Last edited by oddlogic (2013-07-21 23:00:14)

Offline

#6 2013-07-21 23:00:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Terminal Issues After Closing vim

No. It tends to break things if it is set.

Remove all the oh-my-zsh cruft and see if the behaviour persists.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2013-07-21 23:08:12

oddlogic
Member
Registered: 2013-03-16
Posts: 14

Re: [SOLVED] Terminal Issues After Closing vim

Alright, I will try it whenever I am again physically in front of the computer. I am at a remote location now, and I don't want to confuse the issue by testing it from a different terminal. Anyway, the cruft suggestion is a good idea. I kind of don't like oh-my-zsh now that I've installed it. It's very crufty.

Offline

#8 2013-07-21 23:52:28

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

Re: [SOLVED] Terminal Issues After Closing vim

oddlogic wrote:

I've grep'd for "TERM=" in everything I can think of in my dotfiles, (.zshrc, .xinitrc) as well as the configs that are sourced from /usr/share/oh-my-zsh/, to no avail. I don't have the variable being set anywhere that I can tell. Does it need to be explicitly set?

You are setting the TERM variable in your X resource file, with the termName resource.  Without setting termName, my urxvt reports $TERM as 'rxvt-unicode-256color'.

Offline

#9 2013-07-21 23:57:48

oddlogic
Member
Registered: 2013-03-16
Posts: 14

Re: [SOLVED] Terminal Issues After Closing vim

thisoldman wrote:

You are setting the TERM variable in your X resource file, with the termName resource.  Without setting termName, my urxvt reports $TERM as 'rxvt-unicode-256color'.

Oh... Well, I'll simply remove that before trying the removal of the oh-my-zsh cruft. I don't have a very good grasp of how X resources are parsed and used. Thanks for your input as well, and I'll come back soon with more info, positive or negative.

Offline

#10 2013-07-22 00:13:58

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Terminal Issues After Closing vim

thisoldman wrote:
oddlogic wrote:

I've grep'd for "TERM=" in everything I can think of in my dotfiles, (.zshrc, .xinitrc) as well as the configs that are sourced from /usr/share/oh-my-zsh/, to no avail. I don't have the variable being set anywhere that I can tell. Does it need to be explicitly set?

You are setting the TERM variable in your X resource file, with the termName resource.  Without setting termName, my urxvt reports $TERM as 'rxvt-unicode-256color'.

I had always assumed (incorrectly, according to man urxvt) that termName only set the name in the window title, not the $TERM. Thanks thisoldman.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2013-07-22 23:22:35

oddlogic
Member
Registered: 2013-03-16
Posts: 14

Re: [SOLVED] Terminal Issues After Closing vim

Well, folks, I've solved the issue, and it doesn't really seem like it was actually zsh or urxvt at fault after all.  As far as I know, what happened is that I recently changed vim color schemes, around the same time I switched to zsh, with THIS vim script, which was causing the behavior. I am not sure which I changed first, but they apparently do not get along, and I'm not sure if it gets along well with bash either. Anyway, all this is to say I switched themes in my .vimrc and the problem went away. I don't really like those colors all that much anyway.

Thanks for the information, jasonwryan and thisoldman.

Offline

Board footer

Powered by FluxBB