summaryrefslogtreecommitdiff
path: root/vim/.vimrc
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2019-10-28 09:47:24 +0000
committerUrbain Vaes <urbain@vaes.uk>2019-10-28 09:47:24 +0000
commit26a8fff66ed8e996e60dd8ee896a23b49e860796 (patch)
treeef3c269d0ffb91b925708b018c2a17ca2b9b77b2 /vim/.vimrc
parentfb5043ffe50a8b53d6f07657224b147019b02e92 (diff)
Minor changes
Diffstat (limited to 'vim/.vimrc')
-rw-r--r--vim/.vimrc22
1 files changed, 22 insertions, 0 deletions
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=<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