开发者

Mapping mouse events in vim through putty not working

开发者 https://www.devze.com 2022-12-13 22:59 出处:网络
I\'m using Vim 6.3.81 on a x-term through putty. I wanted to map mouse events (like wheel-butt开发者_StackOverflowon click , double click) to specific events using my .vimrc . I\'ve looked at the vim

I'm using Vim 6.3.81 on a x-term through putty. I wanted to map mouse events (like wheel-butt开发者_StackOverflowon click , double click) to specific events using my .vimrc . I've looked at the vim wiki and based on it, defined the following map in my .vimrc:

:nnoremap <2-LeftMouse> :set invnumber<CR>

However , it is not working - double-click is not toggling the line numbers as intended . Do I have to change my X settings to get vim to accept mouse events ?

Thanks...


Have you issued a :set mouse=a or similar?

Vim can accept mouse input through the terminal, but it needs to be explicitly enabled. Both PuTTY and xTerm support it.

:help mouse for more details.

0

精彩评论

暂无评论...
验证码 换一张
取 消