From 95aea6b533e71e478d61d18fac71cca116c56a4d Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 22 May 2022 22:47:23 +0100 Subject: Add all the plugins I currently use --- start/Main/autoload/coreplug/fzf.vim | 19 +++++++++++++++++++ start/Main/plugin/init.vim | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 start/Main/autoload/coreplug/fzf.vim create mode 100644 start/Main/plugin/init.vim (limited to 'start/Main') diff --git a/start/Main/autoload/coreplug/fzf.vim b/start/Main/autoload/coreplug/fzf.vim new file mode 100644 index 0000000..0253dd3 --- /dev/null +++ b/start/Main/autoload/coreplug/fzf.vim @@ -0,0 +1,19 @@ +function! coreplug#fzf#create_window() + let buf = nvim_create_buf(v:false, v:true) + call setbufvar(buf, '&scl', 'no') + + let width = float2nr(&columns - (&columns * 2 / 5)) + let height = &lines < 18 ? &lines : 18 + let opts = { + \ 'relative': 'editor', + \ 'row': float2nr((&lines - height) / 2), + \ 'col': float2nr((&columns - width) / 2), + \ 'width': width, + \ 'height': height + \} + let win = nvim_open_win(buf, v:true, opts) + call setwinvar(win, '&nu', 0) + call setwinvar(win, '&rnu', 0) +endfunction + +" vi: sw=4 ts=4 noet tw=80 cc=80 diff --git a/start/Main/plugin/init.vim b/start/Main/plugin/init.vim new file mode 100644 index 0000000..e4639e7 --- /dev/null +++ b/start/Main/plugin/init.vim @@ -0,0 +1,3 @@ +let $FZF_DEFAULT_OPTS='--layout=reverse --margin=1' +let g:fzf_layout = {'window': 'call coreplug#fzf#create_window()'} +nn :call fzf#vim#files([], 0) -- cgit v1.2.3