diff options
author | Urbain Vaes <urbain@vaes.uk> | 2019-10-28 09:47:24 +0000 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2019-10-28 09:47:24 +0000 |
commit | 26a8fff66ed8e996e60dd8ee896a23b49e860796 (patch) | |
tree | ef3c269d0ffb91b925708b018c2a17ca2b9b77b2 /vim | |
parent | fb5043ffe50a8b53d6f07657224b147019b02e92 (diff) |
Minor changes
Diffstat (limited to 'vim')
-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 |