Added fzf integration
| Author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-06-20 04:02:23 +0200 |
| Committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-06-20 04:02:23 +0200 |
| Commit | ab0fbcadba9b2bc5e714e52816e760b785260ce8 (patch) |
|
-rw-r--r-- |
vimrc | 10 |
1 files changed, 9 insertions, 1 deletions
| diff --git a/vimrc b/vimrc | |||
| ... | |||
| 14 | nnoremap <C-Right> :bnext<cr> |
14 | nnoremap <C-Right> :bnext<cr> |
| 15 | nnoremap <C-Left> :bprevious<cr> |
15 | nnoremap <C-Left> :bprevious<cr> |
| 16 | nnoremap <C-b> :buffers<cr>:buffer |
16 | nnoremap <C-b> :buffers<cr>:buffer |
| 17 | nnoremap <C-p> :Explore<cr> |
||
| 18 | nnoremap <C-q> :copen<cr> |
17 | nnoremap <C-q> :copen<cr> |
| 19 | 18 | ||
| 20 | " Personal tabs/spaces settings. |
19 | " Personal tabs/spaces settings. |
| ... | |||
| 42 | endfunction |
41 | endfunction |
| 43 | command! Format call Format() |
42 | command! Format call Format() |
| 44 | 43 | ||
| 44 | " FZF integration. |
||
| 45 | function! FZF() |
||
| 46 | let t=tempname() |
||
| 47 | silent execute '!fzf --preview=''cat {}'' --multi|awk ''{print $1":1:0"}'' > '.fnameescape(t) |
||
| 48 | execute 'cfile '.t|redraw! |
||
| 49 | call delete(t) |
||
| 50 | endfunction |
||
| 51 | nnoremap <C-p> :call FZF()<cr> |
||
| 52 | |||