Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我通过 putty 在 x-term 上使用 Vim 6.3.81。我想使用我的 .vimrc 将鼠标事件(如滚轮按钮单击、双击)映射到特定事件。我查看了vim wiki并基于它,在我的 .vimrc 中定义了以下地图:
:nnoremap <2-LeftMouse> :set invnumber<CR>
但是,它不起作用 - 双击不会按预期切换行号。我是否必须更改我的 X 设置才能让 vim 接受鼠标事件?
谢谢...
你有发行过:set mouse=a或类似的吗?
:set mouse=a
Vim 可以通过终端接受鼠标输入,但需要显式启用。PuTTY 和 xTerm 都支持它。
:help mouse更多细节。
:help mouse