It works. Thanks a lot. But I'm wondering why could you make sure the map only applies to netrw plugin? Does this has any affect to other fuctions/pluglins in VIM?
2011/4/28 Ben Fritz <[email protected]> > > > 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. > > -- > 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 > -- 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
