From 26a8fff66ed8e996e60dd8ee896a23b49e860796 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Mon, 28 Oct 2019 09:47:24 +0000 Subject: Minor changes --- vim/.vimrc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'vim') diff --git a/vim/.vimrc b/vim/.vimrc index abf20f6..dc878f7 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -553,3 +553,25 @@ endif "" Experimental {{{1 set wildcharm= nnoremap ,e :e **/* + +let $FZF_DEFAULT_OPTS='--layout=reverse' +let g:fzf_layout = { 'window': 'call FloatingFZF()' } + +function! FloatingFZF() + let buf = nvim_create_buf(v:false, v:true) + call setbufvar(buf, '&signcolumn', 'no') + + let height = &lines - 10 + let width = float2nr(&columns - (&columns * 2 / 10)) + let col = float2nr((&columns - width) / 2) + + let opts = { + \ 'relative': 'editor', + \ 'row': 5, + \ 'col': col, + \ 'width': width, + \ 'height': height + \ } + + call nvim_open_win(buf, v:true, opts) +endfunction -- cgit v1.2.3