mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 08:13:40 -05:00
Updated Examples (vim) (markdown)
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user