m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 00:53:42 -05:00

Updated Configuring FZF command (vim) (markdown)

Junegunn Choi
2016-07-21 01:54:20 +09:00
parent c5ec2547c1
commit 8372d831ee

@@ -1,29 +1,32 @@
If you set up Vim plugin for fzf, `:FZF` command will become available. The following variables are used to configure its behavior.
- `g:fzf_action`
- `g:fzf_height`
- Customizable extra key bindings for opening selected files in different ways
- ~~`g:fzf_height`~~ (deprecated, use `g:fzf_layout` instead)
- `g:fzf_layout`
- Determines the size and position of fzf window (tmux pane or Neovim split)
- `g:fzf_launcher`
- (Only in GVim) Terminal emulator to open fzf with
- `g:Fzf_launcher` for function reference
### Key bindings
### Examples
```vim
" ctrl-[a-z], alt-[a-z], f[1-4], or any single character
" This is the default extra key bindings
let g:fzf_action = {
\ 'ctrl-m': 'e',
\ 'ctrl-t': 'tabedit',
\ 'alt-j': 'botright split',
\ 'alt-k': 'topleft split',
\ 'alt-h': 'vertical topleft split',
\ 'alt-l': 'vertical botright split' }
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
" Default fzf layout
" - down / up / left / right
let g:fzf_layout = { 'down': '~40%' }
" In Neovim, you can set up fzf window using a Vim command
let g:fzf_layout = { 'window': 'enew' }
let g:fzf_layout = { 'window': '-tabnew' }
```
### Window size
If you're on a tmux session or using Neovim, `:FZF` will launch fzf in a
split-window whose height can be adjusted with `g:fzf_height` (default:
'40%'). However, the bang version (`:FZF!`) will always start in fullscreen.
### GVim
In GVim, you need an external terminal emulator to start fzf with. `xterm`