Make <MiddleMouse> paste in new empty buffer

References #272.
This commit is contained in:
Marco Hinz 2017-02-22 19:48:42 +01:00
parent 5e9e6a48c9
commit 66d4500576
No known key found for this signature in database
GPG key ID: 1C980A1B657B4A4F

View file

@ -731,6 +731,7 @@ function! s:set_mappings() abort
execute "nnoremap <buffer>". s:nowait ."<silent> v :call <sid>set_mark('V')<cr>"
execute "nnoremap <buffer>". s:nowait ."<silent> <cr> :call startify#open_buffers()<cr>"
execute "nnoremap <buffer>". s:nowait ."<silent> <2-LeftMouse> :call startify#open_buffers()<cr>"
execute "nnoremap <buffer>". s:nowait ."<silent> <MiddleMouse> :enew <bar> normal! gp<cr>"
" Without these mappings n/N wouldn't work properly, since autocmds always
" force the cursor back on the index.