0

i use tmux + vim in xshell, When I use it will cause display exception

set laststatus=2 
  • use vim without tmux in xshell, it works ok
  • use vim + tmux in xshell without use statusline, it works ok
  • use in putty or mobaxterm, it works ok
tmux version
tmux 2.9a
vim version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 11 2019 09:13:18)
Included patches: 1-1517
server version
Linux version 3.13.0-32-generic (buildd@kissel) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014

enter image description here

phd
  • 82,685
  • 13
  • 120
  • 165
rdwr
  • 1
  • 1
  • This is a non-standard status line. Is this lightline plugin? Any special setup for it? What's about standard status line? Is it broken too? – Matt Jun 11 '19 at 07:13
  • i use itchyny/lightline.vim and my vimrc is: https://github.com/xyrh/vimrc.git – rdwr Jun 11 '19 at 08:33
  • when i not use plugin, under set laststatus=2. it looks work ok – rdwr Jun 11 '19 at 08:44
  • If the issue doesn't persist without the plugin then this is probably a better question to raise with the author of the plugin. – Randy Morris Jun 11 '19 at 18:41
  • When I use dynamic parameters in statusline such as %p, Keep searching for display exception, not use plugin ``` set statusline=%<%f\ set statusline+=%w%h%m%r set statusline+=\ [%{&ff}/%Y] set statusline+=\ [%{getcwd()}] set statusline+=\ %p%% ``` if i not use set statusline+=\ %p%%, it works ok – rdwr Jun 12 '19 at 03:27
  • set statusline=%<%F\ %w%h%m%r%=[%{&ff}/%Y/%{&enc}] final, i use this and thanks. – rdwr Jun 12 '19 at 06:09

1 Answers1

0

I solved the problem that has troubled me for three years.

.bashrc:

export TERM=screen-256color

.tmux.conf:

set -g default-terminal "screen-256color"
Android
  • 1,420
  • 4
  • 13
  • 23
rdwr
  • 1
  • 1