GNU Screen和Vim:使用鼠标调整分割窗口缓冲区大小

时间:2012-01-20 09:15:32

标签: vim gnu-screen

使用Vim处理GNU屏幕时,我无法使用鼠标调整分割窗口大小。所有其余的鼠标操作在Vim中都能正常工作(使用鼠标滚动,选择文本等)。我的se mouse=n中通常有.vimrc。调整GNU屏幕外的窗口缓冲区大小非常合适。

以下是vim信息:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan 19 2012 18:05:29)
Included patches: 1-401
Compiled by root@arun-mu
Normal version without 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 +diff +digraphs -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +float +folding -footer +fork() +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 -mouse_urxvt -multi_byte +multi_lang -mzscheme +netbeans_intg +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 +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset -xim +xsmp_interact
+xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim    -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lnsl

GNU屏幕信息:

4.00.03 (FAU) 23-Oct-06

2 个答案:

答案 0 :(得分:17)

这对我有用。在GNU屏幕中,鼠标在vim内部完全活跃。

:set ttymouse=xterm2

答案 1 :(得分:6)

我使用vim 7.3,GNU屏幕(Ubuntu / debian当前包版本)和gnome-terminal,我可以使用鼠标拖动窗口拆分就好了

 :se mouse=a