m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 16:45:38 -05:00

Updated Examples (vim) (markdown)

Junegunn Choi
2015-04-15 23:27:47 +09:00
parent 77fba753f6
commit 4df4c01f2d

@@ -1,4 +1,4 @@
### Configuring `:FZF` command
## Configuring `:FZF` command
- `g:fzf_action`
- `g:fzf_height`
@@ -41,7 +41,7 @@ launcher. Refer to the [this wiki page][macvim-iterm2] to see how to set up.
[macvim-iterm2]: https://github.com/junegunn/fzf/wiki/On-MacVim-with-iTerm2
### `locate` command integration
## `locate` command integration
```vim
command! -nargs=1 Locate call fzf#run(
@@ -50,7 +50,7 @@ command! -nargs=1 Locate call fzf#run(
`: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 splits
*Deprecated. Use `CTRL-X/V/T` with `:FZF` command instead.*
@@ -66,7 +66,7 @@ nnoremap <silent> <Leader>v :call fzf#run({
\ 'sink': 'vertical botright split' })<CR>
```
### Choose color scheme
## Choose color scheme
```vim
nnoremap <silent> <Leader>C :call fzf#run({
@@ -79,7 +79,7 @@ nnoremap <silent> <Leader>C :call fzf#run({
\ })<CR>
```
### Select buffer
## Select buffer
```vim
function! s:buflist()
@@ -101,7 +101,7 @@ nnoremap <silent> <Leader><Enter> :call fzf#run({
\ })<CR>
```
### Simple MRU search
## Simple MRU search
```vim
command! FZFMru call fzf#run({
@@ -111,7 +111,7 @@ command! FZFMru call fzf#run({
\})
```
### Jump to tags
## Jump to tags
```vim
command! FZFTag if !empty(tagfiles()) | call fzf#run({
@@ -120,7 +120,7 @@ command! FZFTag if !empty(tagfiles()) | call fzf#run({
\ }) | else | echo 'No tags' | endif
```
### Search lines in all open vim buffers
## Search lines in all open vim buffers
```vimL
function! s:line_handler(l)
@@ -146,7 +146,7 @@ command! FZFLines call fzf#run({
\})
```
### Narrow ag results within vim
## Narrow ag results within vim
Add this to your .vimrc
@@ -170,7 +170,7 @@ endfunction
Then use `:AgFZF` followed by an ag-recogizable regex to pipe ag results into fzf for narrowing. Selected results are opened in new tabs so that you can open multiple positions within the same file (perhaps there's a better way of doing this).
### Fuzzy cmdline completion
## Fuzzy cmdline completion
```vimL
cnoremap <silent> <c-l> <c-\>eGetCompletions()<cr>