diff options
Diffstat (limited to 'vim/.vimrc')
-rw-r--r-- | vim/.vimrc | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -553,3 +553,25 @@ endif "" Experimental {{{1 set wildcharm=<C-z> nnoremap ,e :e **/*<C-z><S-Tab> + +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 |