dblume commited on 2024-04-08 14:18:04
Showing 2 changed files, with 6 additions and 0 deletions.
Not sure I'll prefer this, but for now map Tab to navingating up and down, and CR to selecting the current PUM item.
... | ... |
@@ -24,6 +24,9 @@ nnoremap k gk |
24 | 24 |
inoremap <expr> jk pumvisible() ? '' : '<esc>' |
25 | 25 |
inoremap <expr> j pumvisible() ? '<Down>' : 'j' |
26 | 26 |
inoremap <expr> k pumvisible() ? '<Up>' : 'k' |
27 |
+inoremap <expr> <Tab> pumvisible() ? '<Down>' : '<Tab>' |
|
28 |
+inoremap <expr> <S-Tab> pumvisible() ? '<Up>' : '<S-Tab>' |
|
29 |
+inoremap <expr> <cr> pumvisible() ? '<C-y>' : '<cr>' |
|
27 | 30 |
|
28 | 31 |
" https://stevelosh.com/blog/2010/09/coming-home-to-vim/#s3-why-i-came-back-to-vim |
29 | 32 |
nnoremap <leader>v <C-w>v<C-w>l |
... | ... |
@@ -33,6 +33,9 @@ nnoremap k gk |
33 | 33 |
inoremap <expr> jk pumvisible() ? '' : '<esc>' |
34 | 34 |
inoremap <expr> j pumvisible() ? '<Down>' : 'j' |
35 | 35 |
inoremap <expr> k pumvisible() ? '<Up>' : 'k' |
36 |
+inoremap <expr> <Tab> pumvisible() ? '<Down>' : '<Tab>' |
|
37 |
+inoremap <expr> <S-Tab> pumvisible() ? '<Up>' : '<S-Tab>' |
|
38 |
+inoremap <expr> <cr> pumvisible() ? '<C-y>' : '<cr>' |
|
36 | 39 |
|
37 | 40 |
" https://stevelosh.com/blog/2010/09/coming-home-to-vim/#s3-why-i-came-back-to-vim |
38 | 41 |
nnoremap <leader>v <C-w>v<C-w>l |
39 | 42 |