diff options
| 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) | |
| tree | d0e2bd5b2944e9afe881fc1ed247099a02959e7c /vimrc | |
| parent | f15fa3fd8f409df7c755f925108c40d6924ed631 (diff) | |
| download | dotfiles-ab0fbcadba9b2bc5e714e52816e760b785260ce8.tar.gz | |
Added fzf integration
Diffstat (limited to 'vimrc')
| -rw-r--r-- | vimrc | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -14,7 +14,6 @@ syntax enable | |||
| 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,3 +41,12 @@ function! Format() | |||
| 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 | |||
