From ab0fbcadba9b2bc5e714e52816e760b785260ce8 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 20 Jun 2024 04:02:23 +0200 Subject: Added fzf integration --- vimrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 26d9d47..e980e8a 100644 --- a/vimrc +++ b/vimrc @@ -14,7 +14,6 @@ syntax enable nnoremap :bnext nnoremap :bprevious nnoremap :buffers:buffer -nnoremap :Explore nnoremap :copen " Personal tabs/spaces settings. @@ -42,3 +41,12 @@ function! Format() endfunction command! Format call Format() +" FZF integration. +function! FZF() + let t=tempname() + silent execute '!fzf --preview=''cat {}'' --multi|awk ''{print $1":1:0"}'' > '.fnameescape(t) + execute 'cfile '.t|redraw! + call delete(t) +endfunction +nnoremap :call FZF() + -- cgit v1.2.3