From d123b038b3b89deb2154e99cd9467bdd2c981ffe Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 3 Apr 2020 16:32:59 +0530 Subject: [PATCH] nvim: Remove custom floating window function Signed-off-by: Sanchayan Maity --- nvim/.config/nvim/init.vim | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 99d0197..757317a 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -665,7 +665,7 @@ let g:lisp_rainbow=1 " FZF let g:fzf_mru_no_sort = 1 let $FZF_DEFAULT_OPTS='--layout=reverse' -let g:fzf_layout = { 'window': 'call CreateCentredFloatingWindow()' } +let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.6 } } " Quickr let g:quickr_cscope_keymaps = 0 @@ -732,30 +732,6 @@ function! NvimGdbNoTKeymaps() tnoremap endfunction -" Stolen from https://github.com/camspiers/dotfiles/blob/master/files/.config/nvim/init.vim -function! CreateCentredFloatingWindow() - let width = float2nr(&columns * 0.8) - let height = float2nr(&lines * 0.6) - let top = ((&lines - height) / 2) - 1 - let left = (&columns - width) / 2 - let opts = {'relative': 'editor', 'row': top, 'col': left, 'width': width, 'height': height, 'style': 'minimal'} - - let top = "╭" . repeat("─", width - 2) . "╮" - let mid = "│" . repeat(" ", width - 2) . "│" - let bot = "╰" . repeat("─", width - 2) . "╯" - let lines = [top] + repeat([mid], height - 2) + [bot] - let s:buf = nvim_create_buf(v:false, v:true) - call nvim_buf_set_lines(s:buf, 0, -1, v:true, lines) - call nvim_open_win(s:buf, v:true, opts) - set winhl=Normal:Floating - let opts.row += 1 - let opts.height -= 2 - let opts.col += 2 - let opts.width -= 4 - call nvim_open_win(nvim_create_buf(v:false, v:true), v:true, opts) - au BufWipeout exe 'bw '.s:buf -endfunction - function! s:incsearch_config(...) abort return incsearch#util#deepextend(deepcopy({ \ 'modules': [incsearch#config#easymotion#module({'overwin': 1})],