I figured it out. I noticed that it worked correctly on the remote system until I started tmux. So, I moved .tmux.conf away. Bam, the problem went away. I moved it back and started commenting out lines in .tmux.conf. I finally found the culprit that way!!
Drum roll... alternate-screen off As soon as I turned commented it out, it started working. There was also this: set -g default-terminal "screen-256color". I commented it out as well just in case. I'll put it back if I notice a problem with "screen", which is the terminal type tmux defaults too (seems like). Though, this was not the reason. Thanks so much!!! Sergei On Wed, Nov 26, 2014 at 7:24 AM, Sergei Gerasenko <[email protected]> wrote: > Gary, thanks for your response. > > Are you sure &term matches "linux"? > > > Yes, I'm sure because I do an echo within that "if" block. I also force it > to be "linux", so the Home and End keys work properly. But I've tried other > terminal types too. tmux has "screen-256color" by default on my system. > > You might try setting &t_ti and &t_te unconditionally and see if that >> helps. > > > No, unfortunately doesn't :( > > That said, I'm surprised that this doesn't "just work" for you. > > > Me too > > >> I am currently running vim in a tmux window over ssh. The local terminal >> is GNOME Terminal 2.32.0. The values of 't_te' and 't_ti' automatically >> set by vim are: > > > >> t_te=^[[?1049l > > > >> t_ti=^[[?1049h > > > > What is your remote operating system? > > > Debian Linux > > >> What terminal are you running locally? > > > I'm connecting from under a VM running Peppermint. The terminal is set to > xterm. > > >> Before you override them, what does vim say the values of 'term', 't_te' >> and 't_ti' are? > > > ^[[?1049l > ^[[?1049h > > Thanks again! > > On Wed, Nov 26, 2014 at 12:43 AM, Gary Johnson <[email protected]> > wrote: > >> On 2014-11-25, surge wrote: >> > Hi, >> > >> > If this has been answered, I'm sorry. Please point me to the right >> > post -- I couldn't find much. >> > >> > I'm using tmux through ssh and the screen is not restored upon >> > exiting from vim. No matter what the terminal type and even with >> > these commands in .vimrc: >> > >> > if &term =~ "linux" >> > let &t_ti = "\<Esc>[?47h" >> > let &t_te = "\<Esc>[?47l" >> > endif >> > >> > Any ideas? >> >> Are you sure &term matches "linux"? "linux" is the value of TERM >> set by a Linux console. Most terminals set TERM to "xterm". Tmux >> sets TERM to "screen". (Vim sets &term to $TERM if TERM is set.) >> >> You might try setting &t_ti and &t_te unconditionally and see if >> that helps. >> >> That said, I'm surprised that this doesn't "just work" for you. I >> am currently running vim in a tmux window over ssh. The local >> terminal is GNOME Terminal 2.32.0. The values of 't_te' and 't_ti' >> automatically set by vim are: >> >> t_te=^[[?1049l >> t_ti=^[[?1049h >> >> What is your remote operating system? What terminal are you running >> locally? Before you override them, what does vim say the values of >> 'term', 't_te' and 't_ti' are? >> >> Regards, >> Gary >> >> -- >> -- >> You received this message from the "vim_use" maillist. >> Do not top-post! Type your reply below the text you are replying to. >> For more information, visit http://www.vim.org/maillist.php >> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "vim_use" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/vim_use/kCYZYl87zSw/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
