mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
Updated Configuring FZF command (vim) (markdown)
@@ -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.
|
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_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`
|
- `g:fzf_launcher`
|
||||||
|
- (Only in GVim) Terminal emulator to open fzf with
|
||||||
- `g:Fzf_launcher` for function reference
|
- `g:Fzf_launcher` for function reference
|
||||||
|
|
||||||
### Key bindings
|
### Examples
|
||||||
|
|
||||||
```vim
|
```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 = {
|
let g:fzf_action = {
|
||||||
\ 'ctrl-m': 'e',
|
\ 'ctrl-t': 'tab split',
|
||||||
\ 'ctrl-t': 'tabedit',
|
\ 'ctrl-x': 'split',
|
||||||
\ 'alt-j': 'botright split',
|
\ 'ctrl-v': 'vsplit' }
|
||||||
\ 'alt-k': 'topleft split',
|
|
||||||
\ 'alt-h': 'vertical topleft split',
|
" Default fzf layout
|
||||||
\ 'alt-l': 'vertical botright split' }
|
" - 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
|
### GVim
|
||||||
|
|
||||||
In GVim, you need an external terminal emulator to start fzf with. `xterm`
|
In GVim, you need an external terminal emulator to start fzf with. `xterm`
|
||||||
|
|||||||
Reference in New Issue
Block a user