add the old snippet md files
This commit is contained in:
parent
fc0dd204c7
commit
bcf8313a4b
110 changed files with 3048 additions and 0 deletions
36
old_snippets/vim-fzf-plugin.en.md
Normal file
36
old_snippets/vim-fzf-plugin.en.md
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
title: "vim fzf plugin"
|
||||
date: 2020-01-30T14:57:50+01:00
|
||||
draft: false
|
||||
snippet_types: ["vim", "search"]
|
||||
---
|
||||
|
||||
I've used several fuzzy finder utilities in vim over the years like
|
||||
[Command T](https://github.com/wincent/Command-T) or
|
||||
[CtrlP](https://github.com/ctrlpvim/ctrlp.vim). They both have there pluses and
|
||||
minuses but never found them to be that fast especially with large code bases
|
||||
I'm often working in. Fzf for me is superior so I was excited to see a plugin
|
||||
that integrates Fzf so well into vim. Its not just useful for finding files but
|
||||
works great with buffers, files with git changes, commands, marks, and even
|
||||
lines in open buffers.
|
||||
|
||||
My vim config for Fzf is as follows:
|
||||
|
||||
```vim script
|
||||
nnoremap <Leader>pb :Buffers<CR>
|
||||
nnoremap <Leader>pf :GFiles<CR>
|
||||
nnoremap <Leader>pg :GFiles?<CR>
|
||||
nnoremap <Leader>pm :Marks<CR>
|
||||
nnoremap <Leader>pc :History:<CR>
|
||||
nnoremap <Leader>pl :Lines<CR>
|
||||
```
|
||||
|
||||
This allows me to easily zip around my code base with speed.
|
||||
|
||||
{{< asciicast-with-caption id="296788" title="demo using fzf in vim" >}}
|
||||
|
||||
sources:
|
||||
|
||||
- https://github.com/wincent/Command-T
|
||||
- https://github.com/ctrlpvim/ctrlp.vim
|
||||
- https://github.com/junegunn/fzf.vim
|
||||
Loading…
Add table
Add a link
Reference in a new issue