💾 Archived View for tilde.team › ~m040601 › mirrorz › fzf_wiki › clone_fzf.wiki › Examples-(vim).md captured on 2023-04-26 at 14:29:34.
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
### `fzf.vim` repository If you're not familiar with Vimscript or don't have time to write your own commands, check out [fzf.vim](https://github.com/junegunn/fzf.vim) project which provides a set of ready-made commands. ### Basic tutorial See https://github.com/junegunn/fzf/blob/master/README-VIM.md ### `locate` command integration
command! -nargs=1 -bang Locate call fzf#run(fzf#wrap(
\ {'source': 'locate <q-args>', 'options': '-m'}, <bang>0))
`:Locate /` will list every file on the system. So make sure that you're using Go version of fzf which is significantly faster than the old Ruby version. ### Open files in splits
" Open files in horizontal split
nnoremap <silent> <Leader>s :call fzf#run({
\ 'down': '40%',
\ 'sink': 'botright split' })<CR>
" Open files in vertical horizontal split
nnoremap <silent> <Leader>v :call fzf#run({
\ 'right': winwidth('.') / 2,
\ 'sink': 'vertical botright split' })<CR>
### Choose color scheme
nnoremap <silent> <Leader>C :call fzf#run({
\ 'source':
\ map(split(globpath(&rtp, "colors/*.vim"), "\n"),
\ "substitute(fnamemodify(v:val, ':t'), '\\..\\{-}