Tweak fzf geometry
Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
This commit is contained in:
parent
ed21f52088
commit
b3c9d145f4
|
@ -12,15 +12,15 @@ function! FloatingFZF()
|
||||||
let buf = nvim_create_buf(v:false, v:true)
|
let buf = nvim_create_buf(v:false, v:true)
|
||||||
call setbufvar(buf, '&signcolumn', 'no')
|
call setbufvar(buf, '&signcolumn', 'no')
|
||||||
|
|
||||||
let height = float2nr(10)
|
let width = float2nr(&columns * 0.8)
|
||||||
let width = float2nr(80)
|
let height = float2nr(&lines * 0.6)
|
||||||
let horizontal = float2nr((&columns - width) / 2)
|
let horizontal = 1
|
||||||
let vertical = 1
|
let vertical = 1
|
||||||
|
|
||||||
let opts = {
|
let opts = {
|
||||||
\ 'relative': 'editor',
|
\ 'relative': 'editor',
|
||||||
\ 'row': vertical,
|
\ 'row': (&lines - height) / 2,
|
||||||
\ 'col': horizontal,
|
\ 'col': (&columns - width) / 2,
|
||||||
\ 'width': width,
|
\ 'width': width,
|
||||||
\ 'height': height,
|
\ 'height': height,
|
||||||
\ 'style': 'minimal'
|
\ 'style': 'minimal'
|
||||||
|
@ -30,8 +30,7 @@ function! FloatingFZF()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Looks
|
" Looks
|
||||||
let $FZF_DEFAULT_OPTS=' --color=dark --color=fg:15,bg:-1,hl:1,fg+:#ffffff,bg+:0,hl+:1 --color=info:0,prompt:0,pointer:12,marker:4,spinner:11,header:-1 --layout=reverse --margin=1,4'
|
"let $FZF_DEFAULT_OPTS=' --color=dark --color=fg:15,bg:-1,hl:1,fg+:#ffffff,bg+:0,hl+:1 --color=info:0,prompt:0,pointer:12,marker:4,spinner:11,header:-1 --layout=reverse --margin=1,4'
|
||||||
let g:fzf_layout = { 'window': 'call FloatingFZF()' }
|
|
||||||
|
|
||||||
" Keybinds
|
" Keybinds
|
||||||
nmap <C-f> :Files<CR>
|
nmap <C-f> :Files<CR>
|
||||||
|
|
Loading…
Reference in a new issue