V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
xinali
V2EX  ›  Vim

tmux 下 vim 数据显示残留

  •  
  •   xinali · 2016-06-17 16:45:25 +08:00 · 2756 次点击
    这是一个创建于 2880 天前的主题,其中的信息可能已经有所发展或是发生改变。

    系统

    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 [email protected]
    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 打开文件,并向下浏览时会出现如下的问题 error

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

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

    11 条回复    2016-06-24 23:44:18 +08:00
    nisbme
        1
    nisbme  
       2016-06-17 16:49:25 +08:00
    原来是在 tmux 下才有,我也有这种情况, TERM 变量调过也没有用
    xinali
        2
    xinali  
    OP
       2016-06-17 16:51:19 +08:00
    @nisbme 对,正常情况下, vim 没有任何的问题,而且在使用 tmux ,不是全屏的情况下,也可以比较正常的使用
    hanxiV2EX
        3
    hanxiV2EX  
       2016-06-17 18:16:04 +08:00 via iPhone
    为何不升级下 tmux 试试
    arakashic
        4
    arakashic  
       2016-06-17 23:36:35 +08:00
    1. 你的$TERM 可能设置的有问题
    2. 试一下 set-window-option -g alternate-screen on
    3. tmux 1.8 这个版本也太老了,换新版本试试
    cxbig
        5
    cxbig  
       2016-06-18 05:26:10 +08:00
    v2 的解决方案应该是:换 MacBook Pro
    SpicyCat
        6
    SpicyCat  
       2016-06-20 09:24:53 +08:00
    开个新 tab 来回切换下就好。
    xinali
        7
    xinali  
    OP
       2016-06-23 10:44:02 +08:00
    @hanxiV2EX 升级了,问题也是一样
    xinali
        8
    xinali  
    OP
       2016-06-23 10:45:14 +08:00
    @SpicyCat 你这个办法也没用
    xinali
        9
    xinali  
    OP
       2016-06-23 16:43:48 +08:00
    @nisbme 我的问题解决了,我的 vimrc 设置了如下代码
    ```
    set lines=40 columuns=100
    ```
    因为这个配置代码导致了刷新问题,注释了就行了
    nisbme
        10
    nisbme  
       2016-06-23 17:54:12 +08:00
    @xinali 我用 @arakashic 的 set-window-option -g alternate-screen on ,应该也是可以了
    rashawn
        11
    rashawn  
       2016-06-24 23:44:18 +08:00
    要不换个显卡试试 XD
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1037 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:20 · PVG 03:20 · LAX 12:20 · JFK 15:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.