Skip to content

Commit 1a8b340

Browse files
author
Scott Pierce
committed
Add binding for double click to open results.
1 parent c32d168 commit 1a8b340

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ navigation mappings using comfortable Vim conventions.
1414

1515
## Buffer Mappings
1616
```
17-
n/N - Cursor to next/prev result
18-
<C-n>/<C-p> - Open next/prev in largest window
19-
<CR> - Open location at cursor in largest window
20-
<C-w><CR> - Open and jump to window
21-
qf - :grep! to Quickfix
17+
n/N - Cursor to next/prev
18+
<C-n>/<C-p> - Open next/prev
19+
<CR>|<DblClick> - Open at cursor
20+
<C-w><CR> - Open and jump to window
21+
qf - :grep! to Quickfix
2222
```
2323

2424
## Prerequisites

plugin/side-search.vim

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ function! s:custom_mappings() abort
8484
nnoremap <buffer> <silent> <C-n> :exec "normal! nzz"<CR>:call <SID>preview_main()<CR>
8585
nnoremap <buffer> <silent> <C-p> :exec "normal! Nzz"<CR>:call <SID>preview_main()<CR>
8686
nnoremap <buffer> <silent> <CR> :call <SID>preview_main()<CR>
87+
nnoremap <buffer> <silent> <2-LeftMouse> :call <SID>preview_main()<CR>
8788
nnoremap <buffer> <silent> <C-w><CR> :call <SID>open_main()<CR>
8889
nnoremap <buffer> <silent> qf :silent exec 'grep!' b:escaped_query<CR>
8990
endfunction
@@ -92,11 +93,11 @@ endfunction
9293
function! s:append_guide() abort
9394
call append(0, [
9495
\ '# Buffer Mappings:',
95-
\ '# n/N - Cursor to next/prev',
96-
\ '# <C-n>/<C-p> - Open next/prev',
97-
\ '# <CR> - Open at cursor',
98-
\ '# <C-w><CR> - Open and jump to window',
99-
\ '# qf - :grep! to Quickfix',
96+
\ '# n/N - Cursor to next/prev',
97+
\ '# <C-n>/<C-p> - Open next/prev',
98+
\ '# <CR>|<DblClick> - Open at cursor',
99+
\ '# <C-w><CR> - Open and jump to window',
100+
\ '# qf - :grep! to Quickfix',
100101
\ ])
101102
" jump to last
102103
call cursor(line('$'), 0)

0 commit comments

Comments
 (0)