README-VIM.md
This file
Path
README-VIM.md
552 lines · 20.0 KiB · Markdown
Last changed by
[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
History of this fileTake it
The walk stopped after 200 commits: lines older than 76efddd point at it.
bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 1–3why, one step back1FZF Vim integration2===================3[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
lines 4–23why, one step back4<!-- vim-markdown-toc GFM -->56* [Installation](#installation)7* [Summary](#summary)8* [`:FZF[!]`](#fzf)9 * [Configuration](#configuration)10 * [Examples](#examples)11 * [Explanation of `g:fzf_colors`](#explanation-of-gfzf_colors)12* [`fzf#run`](#fzfrun)13* [`fzf#wrap`](#fzfwrap)14 * [Global options supported by `fzf#wrap`](#global-options-supported-by-fzfwrap)15* [Tips](#tips)16 * [fzf inside terminal buffer](#fzf-inside-terminal-buffer)17 * [Starting fzf in a Vim popup window](#starting-fzf-in-a-vim-popup-window)18 * [Starting fzf in a tmux/Zellij popup window](#starting-fzf-in-a-tmuxzellij-popup-window)19 * [Hide statusline](#hide-statusline)20* [License](#license)2122<!-- vim-markdown-toc -->23bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 24–155why, one step back24Installation25------------2627Once you have fzf installed, you can enable it inside Vim simply by adding the28directory to `&runtimepath` in your Vim configuration file. The path may29differ depending on the package manager.3031```vim32" If installed using Homebrew33set rtp+=/usr/local/opt/fzf3435" If installed using Homebrew on Apple Silicon36set rtp+=/opt/homebrew/opt/fzf3738" If you have cloned fzf on ~/.fzf directory39set rtp+=~/.fzf40```4142If you use [vim-plug](https://github.com/junegunn/vim-plug), the same can be43written as:4445```vim46" If installed using Homebrew47Plug '/usr/local/opt/fzf'4849" If installed using Homebrew on Apple Silicon50Plug '/opt/homebrew/opt/fzf'5152" If you have cloned fzf on ~/.fzf directory53Plug '~/.fzf'54```5556But if you want the latest Vim plugin file from GitHub rather than the one57included in the package, write:5859```vim60Plug 'junegunn/fzf'61```6263The Vim plugin will pick up fzf binary available on the system. If fzf is not64found on `$PATH`, it will ask you if it should download the latest binary for65you.6667To make sure that you have the latest version of the binary, set up68post-update hook like so:6970```vim71Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }72```7374Summary75-------7677The Vim plugin of fzf provides two core functions, and `:FZF` command which is78the basic file selector command built on top of them.79801. **`fzf#run([spec dict])`**81 - Starts fzf inside Vim with the given spec82 - `:call fzf#run({'source': 'ls'})`832. **`fzf#wrap([spec dict]) -> (dict)`**84 - Takes a spec for `fzf#run` and returns an extended version of it with85 additional options for addressing global preferences (`g:fzf_xxx`)86 - `:echo fzf#wrap({'source': 'ls'})`87 - We usually *wrap* a spec with `fzf#wrap` before passing it to `fzf#run`88 - `:call fzf#run(fzf#wrap({'source': 'ls'}))`893. **`:FZF [fzf_options string] [path string]`**90 - Basic fuzzy file selector91 - A reference implementation for those who don't want to write VimScript92 to implement custom commands93 - If you're looking for more such commands, check out [fzf.vim](https://github.com/junegunn/fzf.vim) project.9495The most important of all is `fzf#run`, but it would be easier to understand96the whole if we start off with `:FZF` command.9798`:FZF[!]`99---------100101```vim102" Look for files under current directory103:FZF104105" Look for files under your home directory106:FZF ~107108" With fzf command-line options109:FZF --reverse --info=inline /tmp110111" Bang version starts fzf in fullscreen mode112:FZF!113```114115Similarly to [ctrlp.vim](https://github.com/kien/ctrlp.vim), use enter key,116`CTRL-T`, `CTRL-X` or `CTRL-V` to open selected files in the current window,117in new tabs, in horizontal splits, or in vertical splits respectively.118119Note that the environment variables `FZF_DEFAULT_COMMAND` and120`FZF_DEFAULT_OPTS` also apply here.121122### Configuration123124- `g:fzf_action`125 - Customizable extra key bindings for opening selected files in different ways126- `g:fzf_layout`127 - Determines the size and position of fzf window128- `g:fzf_colors`129 - Customizes fzf colors to match the current color scheme130- `g:fzf_history_dir`131 - Enables history feature132133#### Examples134135```vim136" This is the default extra key bindings137let g:fzf_action = {138 \ 'ctrl-t': 'tab split',139 \ 'ctrl-x': 'split',140 \ 'ctrl-v': 'vsplit' }141142" An action can be a reference to a function that processes selected lines143function! s:build_quickfix_list(lines)144 call setqflist(map(copy(a:lines), '{ "filename": v:val, "lnum": 1 }'))145 copen146 cc147endfunction148149let g:fzf_action = {150 \ 'ctrl-q': function('s:build_quickfix_list'),151 \ 'ctrl-t': 'tab split',152 \ 'ctrl-x': 'split',153 \ 'ctrl-v': 'vsplit' }154155" Default fzf layout[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
lines 156–165why, one step back156if exists('$TMUX') || exists('$ZELLIJ')157 " The Vim plugin will try to open fzf in a tmux or Zellij popup158 " if possible (requires recent fzf and tmux/zellij) using --popup option,159 " with the following argument:160 let g:fzf_layout = { 'popup': '90%,60%' }161else162 " If --popup option is not available, it will open in a popup window inside163 " Vim (center of the screen)164 let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }165endifbash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
line 166why, one step back166[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
lines 167–175why, one step back167" Here are some more layout examples:168169" - Tmux or Zellij popup at the bottom 40%170let g:fzf_layout = { 'popup': 'bottom,40%' }171172" - Tmux or Zellij popup at the top with a different size173let g:fzf_layout = { 'popup': 'top,90%,40%' }174175" - Vim popup window: at the center of the current window (relative)bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 176–177why, one step back176let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true } }177[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
line 178why, one step back178" - Vim popup window: anchored to the bottom of the current windowbash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 179–180why, one step back179let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true, 'yoffset': 1.0 } }180[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
line 181why, one step back181" - Vim split window: down / up / left / rightbash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 182–183why, one step back182let g:fzf_layout = { 'down': '40%' }183[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
line 184why, one step back184" - Vim window using a Vim commandbash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 185–334why, one step back185let g:fzf_layout = { 'window': 'enew' }186let g:fzf_layout = { 'window': '-tabnew' }187let g:fzf_layout = { 'window': '10new' }188189" Customize fzf colors to match your color scheme190" - fzf#wrap translates this to a set of `--color` options191let g:fzf_colors =192\ { 'fg': ['fg', 'Normal'],193 \ 'bg': ['bg', 'Normal'],194 \ 'query': ['fg', 'Normal'],195 \ 'hl': ['fg', 'Comment'],196 \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],197 \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],198 \ 'hl+': ['fg', 'Statement'],199 \ 'info': ['fg', 'PreProc'],200 \ 'border': ['fg', 'Ignore'],201 \ 'prompt': ['fg', 'Conditional'],202 \ 'pointer': ['fg', 'Exception'],203 \ 'marker': ['fg', 'Keyword'],204 \ 'spinner': ['fg', 'Label'],205 \ 'header': ['fg', 'Comment'] }206207" Enable per-command history208" - History files will be stored in the specified directory209" - When set, CTRL-N and CTRL-P will be bound to 'next-history' and210" 'previous-history' instead of 'down' and 'up'.211let g:fzf_history_dir = '~/.local/share/fzf-history'212```213214##### Explanation of `g:fzf_colors`215216`g:fzf_colors` is a dictionary mapping fzf elements to a color specification217list:218219 element: [ component, group1 [, group2, ...] ]220221- `element` is an fzf element to apply a color to:222223 | Element | Description |224 | --- | --- |225 | `fg` / `bg` / `hl` | Item (foreground / background / highlight) |226 | `fg+` / `bg+` / `hl+` | Current item (foreground / background / highlight) |227 | `preview-fg` / `preview-bg` | Preview window text and background |228 | `hl` / `hl+` | Highlighted substrings (normal / current) |229 | `gutter` | Background of the gutter on the left |230 | `pointer` | Pointer to the current line (`>`) |231 | `marker` | Multi-select marker (`>`) |232 | `border` | Border around the window (`--border` and `--preview`) |233 | `header` | Header (`--header` or `--header-lines`) |234 | `info` | Info line (match counters) |235 | `spinner` | Streaming input indicator |236 | `query` | Query string |237 | `disabled` | Query string when search is disabled |238 | `prompt` | Prompt before query (`> `) |239 | `pointer` | Pointer to the current line (`>`) |240241- `component` specifies the component (`fg` / `bg`) from which to extract the242 color when considering each of the following highlight groups243244- `group1 [, group2, ...]` is a list of highlight groups that are searched (in245 order) for a matching color definition246247For example, consider the following specification:248249```vim250 'prompt': ['fg', 'Conditional', 'Comment'],251```252253This means we color the **prompt**254- using the `fg` attribute of the `Conditional` if it exists,255- otherwise use the `fg` attribute of the `Comment` highlight group if it exists,256- otherwise fall back to the default color settings for the **prompt**.257258You can examine the color option generated according the setting by printing259the result of `fzf#wrap()` function like so:260261```vim262:echo fzf#wrap()263```264265`fzf#run`266---------267268`fzf#run()` function is the core of Vim integration. It takes a single269dictionary argument, *a spec*, and starts fzf process accordingly. At the very270least, specify `sink` option to tell what it should do with the selected271entry.272273```vim274call fzf#run({'sink': 'e'})275```276277We haven't specified the `source`, so this is equivalent to starting fzf on278command line without standard input pipe; fzf will traverse the file system279under the current directory to get the list of files. (If280`$FZF_DEFAULT_COMMAND` is set, fzf will use the output of the command281instead.) When you select one, it will open it with the sink, `:e` command. If282you want to open it in a new tab, you can pass `:tabedit` command instead as283the sink.284285```vim286call fzf#run({'sink': 'tabedit'})287```288289You can use any shell command as the source to generate the list. The290following example will list the files managed by git. It's equivalent to291running `git ls-files | fzf` on shell.292293```vim294call fzf#run({'source': 'git ls-files', 'sink': 'e'})295```296297fzf options can be specified as `options` entry in spec dictionary.298299```vim300call fzf#run({'sink': 'tabedit', 'options': '--multi --reverse'})301```302303You can also pass a layout option if you don't want fzf window to take up the304entire screen.305306```vim307" up / down / left / right / window are allowed308call fzf#run({'source': 'git ls-files', 'sink': 'e', 'left': '40%'})309call fzf#run({'source': 'git ls-files', 'sink': 'e', 'window': '30vnew'})310```311312`source` doesn't have to be an external shell command, you can pass a Vim313array as the source. In the next example, we pass the names of color314schemes as the source to implement a color scheme selector.315316```vim317call fzf#run({'source': map(split(globpath(&rtp, 'colors/*.vim')),318 \ 'fnamemodify(v:val, ":t:r")'),319 \ 'sink': 'colo', 'left': '25%'})320```321322The following table summarizes the available options.323324| Option name | Type | Description |325| -------------------------- | ------------- | ---------------------------------------------------------------- |326| `source` | string | External command to generate input to fzf (e.g. `find .`) |327| `source` | list | Vim list as input to fzf |328| `sink` | string | Vim command to handle the selected item (e.g. `e`, `tabe`) |329| `sink` | funcref | Function to be called with each selected item |330| `sinklist` (or `sink*`) | funcref | Similar to `sink`, but takes the list of output lines at once |331| `exit` | funcref | Function to be called with the exit status of fzf (e.g. 0, 1, 2, 130) |332| `options` | string/list | Options to fzf |333| `dir` | string | Working directory |334| `up`/`down`/`left`/`right` | number/string | (Layout) Window position and size (e.g. `20`, `50%`) |Run fzf asynchronously in the Vim plugin (#4897)Junegunn Choibefore adoption5cb7bab
line 335why, one step back335| `popup`/`tmux` | string | (Layout) `--popup` options (e.g. `90%,70%`) |bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 336–446why, one step back336| `window` (Vim 8 / Neovim) | string | (Layout) Command to open fzf window (e.g. `vertical aboveleft 30new`) |337| `window` (Vim 8 / Neovim) | dict | (Layout) Popup window settings (e.g. `{'width': 0.9, 'height': 0.6}`) |338339`options` entry can be either a string or a list. For simple cases, string340should suffice, but prefer to use list type to avoid escaping issues.341342```vim343call fzf#run({'options': '--reverse --prompt "C:\\Program Files\\"'})344call fzf#run({'options': ['--reverse', '--prompt', 'C:\Program Files\']})345```346347When `window` entry is a dictionary, fzf will start in a popup window. The348following options are allowed:349350- Required:351 - `width` [float range [0 ~ 1]] or [integer range [8 ~ ]]352 - `height` [float range [0 ~ 1]] or [integer range [4 ~ ]]353- Optional:354 - `yoffset` [float default 0.5 range [0 ~ 1]]355 - `xoffset` [float default 0.5 range [0 ~ 1]]356 - `relative` [boolean default v:false]357 - `border` [string default `rounded` (`sharp` on Windows)]: Border style358 - `rounded` / `sharp` / `horizontal` / `vertical` / `top` / `bottom` / `left` / `right` / `no[ne]`359360`fzf#wrap`361----------362363We have seen that several aspects of `:FZF` command can be configured with364a set of global option variables; different ways to open files365(`g:fzf_action`), window position and size (`g:fzf_layout`), color palette366(`g:fzf_colors`), etc.367368So how can we make our custom `fzf#run` calls also respect those variables?369Simply by *"wrapping"* the spec dictionary with `fzf#wrap` before passing it370to `fzf#run`.371372- **`fzf#wrap([name string], [spec dict], [fullscreen bool]) -> (dict)`**373 - All arguments are optional. Usually we only need to pass a spec dictionary.374 - `name` is for managing history files. It is ignored if375 `g:fzf_history_dir` is not defined.376 - `fullscreen` can be either `0` or `1` (default: 0).377378`fzf#wrap` takes a spec and returns an extended version of it (also379a dictionary) with additional options for addressing global preferences. You380can examine the return value of it like so:381382```vim383echo fzf#wrap({'source': 'ls'})384```385386After we *"wrap"* our spec, we pass it to `fzf#run`.387388```vim389call fzf#run(fzf#wrap({'source': 'ls'}))390```391392Now it supports `CTRL-T`, `CTRL-V`, and `CTRL-X` key bindings (configurable393via `g:fzf_action`) and it opens fzf window according to `g:fzf_layout`394setting.395396To make it easier to use, let's define `LS` command.397398```vim399command! LS call fzf#run(fzf#wrap({'source': 'ls'}))400```401402Type `:LS` and see how it works.403404We would like to make `:LS!` (bang version) open fzf in fullscreen, just like405`:FZF!`. Add `-bang` to command definition, and use `<bang>` value to set406the last `fullscreen` argument of `fzf#wrap` (see `:help <bang>`).407408```vim409" On :LS!, <bang> evaluates to '!', and '!0' becomes 1410command! -bang LS call fzf#run(fzf#wrap({'source': 'ls'}, <bang>0))411```412413Our `:LS` command will be much more useful if we can pass a directory argument414to it, so that something like `:LS /tmp` is possible.415416```vim417command! -bang -complete=dir -nargs=? LS418 \ call fzf#run(fzf#wrap({'source': 'ls', 'dir': <q-args>}, <bang>0))419```420421Lastly, if you have enabled `g:fzf_history_dir`, you might want to assign422a unique name to our command and pass it as the first argument to `fzf#wrap`.423424```vim425" The query history for this command will be stored as 'ls' inside g:fzf_history_dir.426" The name is ignored if g:fzf_history_dir is not defined.427command! -bang -complete=dir -nargs=? LS428 \ call fzf#run(fzf#wrap('ls', {'source': 'ls', 'dir': <q-args>}, <bang>0))429```430431### Global options supported by `fzf#wrap`432433- `g:fzf_layout`434- `g:fzf_action`435 - **Works only when no custom `sink` (or `sinklist`) is provided**436 - Having custom sink usually means that each entry is not an ordinary437 file path (e.g. name of color scheme), so we can't blindly apply the438 same strategy (i.e. `tabedit some-color-scheme` doesn't make sense)439- `g:fzf_colors`440- `g:fzf_history_dir`441442Tips443----444445### fzf inside terminal buffer446[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
lines 447–450why, one step back447When fzf is configured to start in a terminal buffer inside Vim or Neovim, you448may find the default ANSI colors to be different. In that case, configure the449colors using `g:terminal_ansi_colors` in regular Vim or `g:terminal_color_x` in450Neovim.bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 451–480why, one step back451452```vim453" Terminal colors for seoul256 color scheme454if has('nvim')455 let g:terminal_color_0 = '#4e4e4e'456 let g:terminal_color_1 = '#d68787'457 let g:terminal_color_2 = '#5f865f'458 let g:terminal_color_3 = '#d8af5f'459 let g:terminal_color_4 = '#85add4'460 let g:terminal_color_5 = '#d7afaf'461 let g:terminal_color_6 = '#87afaf'462 let g:terminal_color_7 = '#d0d0d0'463 let g:terminal_color_8 = '#626262'464 let g:terminal_color_9 = '#d75f87'465 let g:terminal_color_10 = '#87af87'466 let g:terminal_color_11 = '#ffd787'467 let g:terminal_color_12 = '#add4fb'468 let g:terminal_color_13 = '#ffafaf'469 let g:terminal_color_14 = '#87d7d7'470 let g:terminal_color_15 = '#e4e4e4'471else472 let g:terminal_ansi_colors = [473 \ '#4e4e4e', '#d68787', '#5f865f', '#d8af5f',474 \ '#85add4', '#d7afaf', '#87afaf', '#d0d0d0',475 \ '#626262', '#d75f87', '#87af87', '#ffd787',476 \ '#add4fb', '#ffafaf', '#87d7d7', '#e4e4e4'477 \ ]478endif479```480[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
line 481why, one step back481### Starting fzf in a Vim popup windowbash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
line 482why, one step back482[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
lines 483–485why, one step back483You can configure fzf to start in a Vim popup window by setting the `window` key484in `g:fzf_layout`.485bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 486–499why, one step back486```vim487" Required:488" - width [float range [0 ~ 1]] or [integer range [8 ~ ]]489" - height [float range [0 ~ 1]] or [integer range [4 ~ ]]490"491" Optional:492" - xoffset [float default 0.5 range [0 ~ 1]]493" - yoffset [float default 0.5 range [0 ~ 1]]494" - relative [boolean default v:false]495" - border [string default 'rounded']: Border style496" - 'rounded' / 'sharp' / 'horizontal' / 'vertical' / 'top' / 'bottom' / 'left' / 'right'497let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }498```499[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
line 500why, one step back500### Starting fzf in a tmux/Zellij popup windowbash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
line 501why, one step back501[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
lines 502–517why, one step back502fzf can also start in a popup of the multiplexer instead of a window inside503Vim, by putting a `--popup` option value in the `popup` key. `tmux` is504accepted as a synonym, just as `--tmux` is an alias of `--popup`.505506The layout works on tmux 3.3 or above, or on Zellij 0.44 or above with fzf5070.71.0 or above. It is the default on tmux 3.7 or above with fzf 0.74.0 or508above, and on Zellij, where the pane is not modal: Vim keeps the window fzf509was started from visible, and you can switch to it while fzf is open. Below510those versions tmux gives a popup that cannot be left, so a window inside Vim511is the default there. On tmux, an explicit `--border` style also gives a modal512popup rather than a floating pane, because the native border of a tmux513floating pane cannot be removed. Drop `--border` to keep the floating pane and514its native border. Zellij keeps the floating pane either way, and hides its515native border when fzf draws one. Set `g:fzf_layout` yourself to choose either516one.517bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
line 518why, one step back518```vimRun fzf asynchronously in the Vim plugin (#4897)Junegunn Choibefore adoption5cb7bab
line 519why, one step back519if exists('$TMUX') || exists('$ZELLIJ')[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
lines 520–521why, one step back520 " See `--popup` option in `man fzf` for available options521 " [center|top|bottom|left|right][,SIZE[%]][,SIZE[%]]Run fzf asynchronously in the Vim plugin (#4897)Junegunn Choibefore adoption5cb7bab
line 522why, one step back522 let g:fzf_layout = { 'popup': '90%,70%' }bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
line 523why, one step back523else[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
lines 524–525why, one step back524 " Configure the Vim popup window in case not on the multiplexer525 let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.7 } }bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 526–532why, one step back526endif527```528529### Hide statusline530531When fzf starts in a terminal buffer, the file type of the buffer is set to532`fzf`. So you can set up `FileType fzf` autocmd to customize the settings of[vim] Open fzf in a tmux or Zellij floating pane by default (#4905)Junegunn Choibefore adoptiona52ac84
lines 533–534why, one step back533the window. This applies to the layouts that open inside Vim, not to the tmux534or Zellij pane the default uses, which is not a buffer.bash: shift-delete to delete history entries during CTRL-RJunegunn Choibefore adoption76efddd
lines 535–552why, one step back535536For example, if you open fzf on the bottom on the screen (e.g. `{'down':537'40%'}`), you might want to temporarily disable the statusline for a cleaner538look.539540```vim541let g:fzf_layout = { 'down': '30%' }542autocmd! FileType fzf543autocmd FileType fzf set laststatus=0 noshowmode noruler544 \| autocmd BufLeave <buffer> set laststatus=2 showmode ruler545```546547[License](LICENSE)548------------------549550The MIT License (MIT)551552Copyright (c) 2013-2026 Junegunn Choi