mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 12:44:24 +08:00
Update g:fzf_preview_window to be a list with optional toggle keys
- The default preview window option will be ['right', 'ctrl-/'] regardless of screen width or <bang> - This will also fix #1010
This commit is contained in:
21
README.md
21
README.md
@@ -110,16 +110,23 @@ through [README-VIM][README-VIM] to learn more about them.
|
||||
|
||||
#### Preview window
|
||||
|
||||
If the width of the screen is wider than 120 columns, some commands will show
|
||||
the preview window on the right. You can customize the behavior with
|
||||
`g:fzf_preview_window`. Here are some examples:
|
||||
Some commands will show the preview window on the right. You can customize the
|
||||
behavior with `g:fzf_preview_window`. Here are some examples:
|
||||
|
||||
```vim
|
||||
" Empty value to disable preview window altogether
|
||||
let g:fzf_preview_window = ''
|
||||
" This is the default option:
|
||||
" - Preview window on the right with 50% width
|
||||
" - CTRL-/ will toggle preview window.
|
||||
" - Note that this array is passed as arguments to fzf#vim#with_preview function.
|
||||
" - To learn more about preview window options, see `--preview-window` section of `man fzf`.
|
||||
let g:fzf_preview_window = ['right:50%', 'ctrl-/']
|
||||
|
||||
" Always enable preview window on the right with 60% width
|
||||
let g:fzf_preview_window = 'right:60%'
|
||||
" Preview window on the upper side of the window with 40% height,
|
||||
" hidden by default, ctrl-/ to toggle
|
||||
let g:fzf_preview_window = ['up:40%:hidden', 'ctrl-/']
|
||||
|
||||
" Empty value to disable preview window altogether
|
||||
let g:fzf_preview_window = []
|
||||
```
|
||||
|
||||
### Command-local options
|
||||
|
||||
Reference in New Issue
Block a user