2014-01-07 66 views
0

最近我遇到了gvim的一個功能。當我按shift並單擊某個單詞時,單詞突出顯示類似於Notepad++(我知道*或#)。vim mousemodel問題

但是,如果我把我的.vimrc

set mousemodel=popup 

這種行爲很奇怪停止。有人遇到過這個?

使用

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 29 2013 13:30:15) 
+0

呵呵http://www.reddit.com/r/vim/comments/1u​​m8xu/issue_with_vim_mousemodel/ – Drasill

回答

1

這實際上是由設計根據:h mousemodel

     *'mousemodel'* *'mousem'* 
'mousemodel' 'mousem' string (default "extend", "popup" for MS-DOS and Win32) 
      global 
      {not in Vi} 
    Sets the model to use for the mouse. The name mostly specifies what 
    the right mouse button is used for: 
     extend Right mouse button extends a selection. This works 
      like in an xterm. 
     popup Right mouse button pops up a menu. The shifted left 
      mouse button extends a selection. This works like 
      with Microsoft Windows. 
(...) 
    Overview of what button does what for each model: 
    mouse   extend  popup(_setpos) ~ 
    left click  place cursor place cursor 
    left drag  start selection start selection 
    shift-left  search word  extend selection 
    right click  extend selection popup menu (place cursor) 
    right drag  extend selection - 
    middle click  paste  paste 

基本上,彈出模擬了一個典型的Windows應用程序的鼠標行爲,和Windows應用程序不突出的轉變的話-clicking。

在正常的Windows應用程序上,突出顯示一個單詞由雙擊完成。我並不完全確定彈出式模型是否對此行爲負責,或者如果它發生在其他地方,但它應該很容易讓您測試。