Skip to content
Myr

[vim] Update README-VIM

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 85ae745 · Browse files · 2 files+91 added−27 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+91 added−27 removed

  • other:+91 added−27 removed

2 files+91 added−27 removed

modified:doc/fzf.txt+50 added-12 removed
1fzf.txt fzf Last change: April 17 20211fzf.txt fzf Last change: May 19 20212FZF - TABLE OF CONTENTS *fzf* *fzf-toc*3==============================================================================45 FZF Vim integration |fzf-vim-integration|
7 unmodified lines
13 fzf#wrap |fzf#wrap|14 Global options supported by fzf#wrap |fzf-global-options-supported-by-fzf#wrap|15 Tips |fzf-tips|16 fzf inside terminal buffer |fzf-inside-terminal-buffer|17 Starting fzf in a popup window |fzf-starting-fzf-in-a-popup-window|18 Hide statusline |fzf-hide-statusline|17 Starting fzf in a popup window |fzf-starting-fzf-in-a-popup-window|18 Hide statusline |fzf-hide-statusline|19 License |fzf-license|2021FZF VIM INTEGRATION *fzf-vim-integration*22==============================================================================
395 unmodified lines
418 - On GVim419 - On Terminal Vim with a non-default layout420 - `call fzf#run({'left': '30%'})` or `let g:fzf_layout = {'left': '30%'}`421422On the latest versions of Vim and Neovim, fzf will start in a terminal buffer.423If you find the default ANSI colors to be different, consider configuring the424colors using `g:terminal_ansi_colors` in regular Vim or `g:terminal_color_x`425in Neovim.426423Starting fzf in a popup window~427 *g:terminal_color_15* *g:terminal_color_14* *g:terminal_color_13*428*g:terminal_color_12* *g:terminal_color_11* *g:terminal_color_10* *g:terminal_color_9*429 *g:terminal_color_8* *g:terminal_color_7* *g:terminal_color_6* *g:terminal_color_5*430 *g:terminal_color_4* *g:terminal_color_3* *g:terminal_color_2* *g:terminal_color_1*431 *g:terminal_color_0*432>433 " Terminal colors for seoul256 color scheme434 if has('nvim')435 let g:terminal_color_0 = '#4e4e4e'436 let g:terminal_color_1 = '#d68787'437 let g:terminal_color_2 = '#5f865f'438 let g:terminal_color_3 = '#d8af5f'439 let g:terminal_color_4 = '#85add4'440 let g:terminal_color_5 = '#d7afaf'441 let g:terminal_color_6 = '#87afaf'442 let g:terminal_color_7 = '#d0d0d0'443 let g:terminal_color_8 = '#626262'444 let g:terminal_color_9 = '#d75f87'445 let g:terminal_color_10 = '#87af87'446 let g:terminal_color_11 = '#ffd787'447 let g:terminal_color_12 = '#add4fb'448 let g:terminal_color_13 = '#ffafaf'449 let g:terminal_color_14 = '#87d7d7'450 let g:terminal_color_15 = '#e4e4e4'451 else452 let g:terminal_ansi_colors = [453 \ '#4e4e4e', '#d68787', '#5f865f', '#d8af5f',454 \ '#85add4', '#d7afaf', '#87afaf', '#d0d0d0',455 \ '#626262', '#d75f87', '#87af87', '#ffd787',456 \ '#add4fb', '#ffafaf', '#87d7d7', '#e4e4e4'457 \ ]458 endif459<460461< Starting fzf in a popup window >____________________________________________~462 *fzf-starting-fzf-in-a-popup-window*463>464 " Required:465 " - width [float range [0 ~ 1]] or [integer range [8 ~ ]]
17 unmodified lines
483 let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }484 endif485<486449Hide statusline~487< Hide statusline >___________________________________________________________~488 *fzf-hide-statusline*489490When fzf starts in a terminal buffer, the file type of the buffer is set to491`fzf`. So you can set up `FileType fzf` autocmd to customize the settings of492the window.493456For example, if you use a non-popup layout (e.g. `{'down': '40%'}`) on Neovim,457you might want to temporarily disable the statusline for a cleaner look.494For example, if you open fzf on the bottom on the screen (e.g. `{'down':495'40%'}`), you might want to temporarily disable the statusline for a cleaner496look.497>459 if has('nvim') && !exists('g:fzf_layout')460 autocmd! FileType fzf461 autocmd FileType fzf set laststatus=0 noshowmode noruler462 \| autocmd BufLeave <buffer> set laststatus=2 showmode ruler463 endif498 let g:fzf_layout = { 'down': '30%' }499 autocmd! FileType fzf500 autocmd FileType fzf set laststatus=0 noshowmode noruler501 \| autocmd BufLeave <buffer> set laststatus=2 showmode ruler502<503504LICENSE *fzf-license*505==============================================================================
7 unmodified lines
modified:README-VIM.md+41 added-15 removed
397 unmodified lines
398----399400### fzf inside terminal buffer401402The latest versions of Vim and Neovim include builtin terminal emulator403(`:terminal`) and fzf will start in a terminal buffer in the following cases:402On the latest versions of Vim and Neovim, fzf will start in a terminal buffer.403If you find the default ANSI colors to be different, consider configuring the404colors using `g:terminal_ansi_colors` in regular Vim or `g:terminal_color_x`405in Neovim.406405- On Neovim406- On GVim407- On Terminal Vim with a non-default layout408 - `call fzf#run({'left': '30%'})` or `let g:fzf_layout = {'left': '30%'}`407```vim408" Terminal colors for seoul256 color scheme409if has('nvim')410 let g:terminal_color_0 = '#4e4e4e'411 let g:terminal_color_1 = '#d68787'412 let g:terminal_color_2 = '#5f865f'413 let g:terminal_color_3 = '#d8af5f'414 let g:terminal_color_4 = '#85add4'415 let g:terminal_color_5 = '#d7afaf'416 let g:terminal_color_6 = '#87afaf'417 let g:terminal_color_7 = '#d0d0d0'418 let g:terminal_color_8 = '#626262'419 let g:terminal_color_9 = '#d75f87'420 let g:terminal_color_10 = '#87af87'421 let g:terminal_color_11 = '#ffd787'422 let g:terminal_color_12 = '#add4fb'423 let g:terminal_color_13 = '#ffafaf'424 let g:terminal_color_14 = '#87d7d7'425 let g:terminal_color_15 = '#e4e4e4'426else427 let g:terminal_ansi_colors = [428 \ '#4e4e4e', '#d68787', '#5f865f', '#d8af5f',429 \ '#85add4', '#d7afaf', '#87afaf', '#d0d0d0',430 \ '#626262', '#d75f87', '#87af87', '#ffd787',431 \ '#add4fb', '#ffafaf', '#87d7d7', '#e4e4e4'432 \ ]433endif434```435410#### Starting fzf in a popup window436### Starting fzf in a popup window437438```vim439" Required:440" - width [float range [0 ~ 1]] or [integer range [8 ~ ]]
19 unmodified lines
460 let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }461endif462```463438#### Hide statusline464### Hide statusline465466When fzf starts in a terminal buffer, the file type of the buffer is set to467`fzf`. So you can set up `FileType fzf` autocmd to customize the settings of468the window.469444For example, if you use a non-popup layout (e.g. `{'down': '40%'}`) on Neovim,445you might want to temporarily disable the statusline for a cleaner look.470For example, if you open fzf on the bottom on the screen (e.g. `{'down':471'40%'}`), you might want to temporarily disable the statusline for a cleaner472look.473474```vim448if has('nvim') && !exists('g:fzf_layout')449 autocmd! FileType fzf450 autocmd FileType fzf set laststatus=0 noshowmode noruler451 \| autocmd BufLeave <buffer> set laststatus=2 showmode ruler452endif475let g:fzf_layout = { 'down': '30%' }476autocmd! FileType fzf477autocmd FileType fzf set laststatus=0 noshowmode noruler478 \| autocmd BufLeave <buffer> set laststatus=2 showmode ruler479```480481[License](LICENSE)482------------------
4 unmodified lines