I've just setup Neovim v0.4.4 with fzf.vim (commit) on a new machine running Manjaro using sudo pacman -Sy neovim
. Previously (unknown version) the window for FZF has appeared in a split at the bottom but now it appears as a window in the middle of the window as in the screenshot below. How do I configure it to be a split at the bottom instead?
.vimrc:
call plug#begin('~/.vim/plugged')
" PlugInstall and PlugUpdate will clone fzf in ~/.fzf and run install script
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
" Initialize plugin system
call plug#end()
map <C-F> :Files<CR>
There's a number of these available, but fzf (and the matching Vim plugin) does allow you to open in splits with a keybind. Unfortunately, both the above options don't really care about the directory of the file you're editing, unless it happens to be the current working directory.
Here we especially make use of width and height to define the size of the window and anchor, col and row to define where on the screen we will place it. Calling this function with :call BreakHabitsWindow () will spawn a simple empty floating window: My second requirement is to have a box drawn in the buffer to show the borders of the window.
If you have several files relative to your current working directory with the same name, you may need to scroll or search for the path to find what you're actually looking for. Also note that FZF doesn't allow file creation or manipulation (see #107 ), which may be a problem if you have a .ts file you'd like to make a test file from.
and type the file you actually want. If you're open to using fzf-vim, then you can use CTRL + h to open a file in a split. Show activity on this post.
There are five kinds of layout for fzf
according to documentation:
For your requested setup, you should add in your .vimrc
or where you are putting your settings the following line: let g:fzf_layout = { 'down': '~40%' }
where the ~40%
is the percentage of all your nvim window
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With