Ben Fritz wrote:

On Apr 28, 10:09 am, wei gao<[email protected]>  wrote:
Hi,

In netw file explorer, the click left mouse on the file/folder will open the
file/folder. Is there any way to use doube click to open the file/folder?
Left mouse is usually used to select the file/folder instead of open
file/folder.

Two steps:
1. in .vimrc, add let g:netrw_mousemaps = 0 " disable single-click to
open file
2. in ~/.vim/after/ftplugin/netrw.vim or similar (mine is in ~/.vim/
after/ftplugin/netrw_maps.vim), put nmap<buffer>  <2-leftmouse>  <CR>

Note you must use nmap instead of nnoremap, since you are
intentionally triggering the<CR>  mapping in NetRW.

FYI: this will, of course, disable _all_ mouse mappings that netrw normally provides; please look at :help g:netrw_mousemaps for the list.

Regards,
Chip Campbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to