OS X Lion中的终端Vim重绘问题 [英] Terminal Vim redraw issues in OS X Lion

查看:103
本文介绍了OS X Lion中的终端Vim重绘问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近从MacVim切换到标准vim,因此我可以强迫自己在Vim中移动,而无需MacVim包装器的帮助.这样做以来,我遇到了一些奇怪的重绘问题.我已经在iTerm2和Lion的标准终端中对此进行了测试.

Recently switched from MacVim to standard vim so I can force myself to move around in vim without the help of the MacVim wrapper. Since doing so, I'm having some weird redraw issues. I've tested this in both iTerm2 and standard Terminal in Lion.

当我编辑文件,打开NERDTree等时,最后一个窗口的片段会出现在当前缓冲区中.有时,"..(向上目录)"会留在新缓冲区中.底部状态栏会自我复制.看来唯一要摆脱的是手动调用:redraw!".

When I'm editing files, opening NERDTree etc, fragments of the last window appear in my current buffer. Sometimes the ".. (up a dir)" gets left in the new buffer. The bottom status bar duplicates itself. The only thing that seems to get rid of this is manually calling ":redraw!".

我整理了一个快速视频,展示了我在说什么,因为我的Google-fu没有产生任何结果. 视频演示

I put together a quick video to show what I'm talking about since my Google-fu has yielded no results. Video Demo

这真的使我烦恼.任何人都对导致这种情况的原因有什么想法?

This is really bugging the hell out of me. Anyone have any ideas on what might be causing this?

更新

我仔细检查了一下,将Vim和iTerm2/Terminal都设置为UTF-8进行字符编码.我什至在iTerm2中启用了此设置:双角字符:将模棱两可的字符视为双倍宽度.

I double checked and both Vim and iTerm2/Terminal are set to UTF-8 for character encoding. I even enabled this setting in iTerm2: Double-Width Characters: Treat ambiguous-width characters as double width.

ECHO $TERM输出(与iTerm2和标准终端相同)xterm-256color

ECHO $TERM output (same for both iTerm2 and standard Terminal) xterm-256color

:version输出

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug  5 2011 10:58:31)
MacOS X (unix) version
Included patches: 1-260
Compiled by chris@nix
Huge version with MacVim GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs
+dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +fullscreen -gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent
 +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg +odbeditor +path_extra +perl
+persistent_undo +postscript +printer +profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl
+terminfo +termresponse +textobjects +title +toolbar +transparency +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp -xterm_clipboard
-xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -arch x86_64 -D_FORTIFY_SOURCE=1
     -I/System/Library/Frameworks/Tcl.framework/Headers  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_DARWIN_C_SOURCE=1
Linking: gcc   -L.  -L.       -Wl,-syslibroot,/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -arch x86_64 -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon      -lncurses -liconv -framework Cocoa    -fstack-protector -L
/usr/local/lib  -L/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -framework Python  -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -lruby.1.9.1 -lobjc -L/Users/chris/.rvm/rubies/ruby
-1.9.2-p290/lib

更多更新 更新状态行似乎没有任何改变.仍然吓坏了,并有同样的问题.还有其他想法吗?

More Updates Updating the status line seems to change nothing. Still freaks out and has the same issue. Any other ideas?

推荐答案

看来我终于明白了.似乎是Lion和我的MBP的硬件/驱动程序问题. Lion 10.7.1发布了,自更新以来,问题就消失了.我对背景颜色有些奇怪,但是一旦我将终端bg颜色与我的vim配色方案相匹配,一切就变得很桃红色.感谢大家的建议.

Looks like I finally got it figured out. Appears to have been a hardware/driver issue with Lion and my MBP. Lion 10.7.1 came out and since the update the issues have disappeared. I had a little weirdness with background colors, but as soon as I matched my terminal bg color to my vim color scheme, all has been peachy. Thanks to everyone for the suggestions.

这篇关于OS X Lion中的终端Vim重绘问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆