소스 검색

fix mouse support for vim

screen mouse still broken though, since scrollwheel still doesn't let us view
the buffer for that window
Weiyi Lou 13 년 전
부모
커밋
9abf06a748
2개의 변경된 파일6개의 추가작업 그리고 7개의 파일을 삭제
  1. 3 3
      screen/screenrc
  2. 3 4
      vim/vimrc

+ 3 - 3
screen/screenrc

@@ -58,15 +58,15 @@ term                  linux
 
 # Tweak termcap, terminfo, and termcapinfo  entries for best performance.
 termcap               linux           'AF=\E[3%dm:AB=\E[4%dm'
-termcap               xterm-color     'AF=\E[3%dm:AB=\E[4%dm'
+termcap               xterm*          'AF=\E[3%dm:AB=\E[4%dm'
 terminfo              linux           'AF=\E[3%p1%dm:AB=\E[4%p1%dm'
-terminfo              xterm-color     'AF=\E[3%p1%dm:AB=\E[4%p1%dm'
+terminfo              xterm*          'AF=\E[3%p1%dm:AB=\E[4%p1%dm'
 
 # Allow xterm / Terminal scrollbars to access the scrollback buffer. This
 # enables the behavior you'd expect, instead of losing the content that scrolls
 # out of the window.
 termcapinfo           linux           ti@:te@
-termcapinfo           xterm-color     ti@:te@
+termcapinfo           xterm*          ti@:te@
 
 # Use visual bell instead of audio bell.
 vbell                 on              # default: ???

+ 3 - 4
vim/vimrc

@@ -21,10 +21,9 @@ if has("persistent_undo")
     set undodir=~/.vimundo
 endif
 
-"if version >= 700
-"    set mouse=a "mouse support for 7.x, but don't use this if we use screen
-"    because it has no effect, and then just becomes annoying for copy/paste
-"endif 
+" mouse support. TODO: Are there any checks we should be doing?
+set ttymouse=xterm2
+set mouse=a
 
 if has("autocmd")
     " Enable filetype specific features