m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

Updated Examples (vim) (markdown)

Junegunn Choi
2015-07-28 23:22:16 +09:00
parent a35a6a718e
commit d56b533f98

@@ -60,6 +60,8 @@ nnoremap <silent> <Leader><Enter> :call fzf#run({
### Simple MRU search
#### `v:oldfiles`
```vim
command! FZFMru call fzf#run({
\'source': v:oldfiles,
@@ -68,6 +70,23 @@ command! FZFMru call fzf#run({
\})
```
#### Filtered `v:oldfiles` and open buffers
```vim
command! FZFMru call fzf#run({
\ 'source': reverse(s:all_files()),
\ 'sink': 'edit',
\ 'options': '-m --no-sort -x',
\ 'down': '40%' })
function! s:all_files()
return extend(
\ filter(copy(v:oldfiles),
\ "v:val !~ 'fugitive:\\|NERD_tree\\|^/tmp/\\|.git/'"),
\ map(filter(range(1, bufnr('$')), 'buflisted(v:val)'), 'bufname(v:val)'))
endfunction
```
### Jump to tags
```vim