tmux 下 vim 数据显示残留

2016-06-17 16:45:25 +08:00
 xinali

系统

ubuntu 14.04.1

vim 版本信息

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:32)
Included patches: 1-52
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            -ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl    -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions

tmux

tmux 1.8

vim 正常下使用是正常的,没有任何问题,当使用 tmux 时,用 vim 打开文件,并向下浏览时会出现如下的问题

感觉屏幕刷新更不上,导致残留,并且只有在终端最大化才会出现上述问题

不知道为什么会有这么严重的残留问题

2783 次点击
所在节点    Vim
11 条回复
nisbme
2016-06-17 16:49:25 +08:00
原来是在 tmux 下才有,我也有这种情况, TERM 变量调过也没有用
xinali
2016-06-17 16:51:19 +08:00
@nisbme 对,正常情况下, vim 没有任何的问题,而且在使用 tmux ,不是全屏的情况下,也可以比较正常的使用
hanxiV2EX
2016-06-17 18:16:04 +08:00
为何不升级下 tmux 试试
arakashic
2016-06-17 23:36:35 +08:00
1. 你的$TERM 可能设置的有问题
2. 试一下 set-window-option -g alternate-screen on
3. tmux 1.8 这个版本也太老了,换新版本试试
cxbig
2016-06-18 05:26:10 +08:00
v2 的解决方案应该是:换 MacBook Pro
SpicyCat
2016-06-20 09:24:53 +08:00
开个新 tab 来回切换下就好。
xinali
2016-06-23 10:44:02 +08:00
@hanxiV2EX 升级了,问题也是一样
xinali
2016-06-23 10:45:14 +08:00
@SpicyCat 你这个办法也没用
xinali
2016-06-23 16:43:48 +08:00
@nisbme 我的问题解决了,我的 vimrc 设置了如下代码
```
set lines=40 columuns=100
```
因为这个配置代码导致了刷新问题,注释了就行了
nisbme
2016-06-23 17:54:12 +08:00
@xinali 我用 @arakashic 的 set-window-option -g alternate-screen on ,应该也是可以了
rashawn
2016-06-24 23:44:18 +08:00
要不换个显卡试试 XD

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/286496

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX