mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-20 01:23:43 -05:00
Updated Examples (vim) (markdown)
@@ -60,6 +60,8 @@ nnoremap <silent> <Leader><Enter> :call fzf#run({
|
|||||||
|
|
||||||
### Simple MRU search
|
### Simple MRU search
|
||||||
|
|
||||||
|
#### `v:oldfiles`
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
command! FZFMru call fzf#run({
|
command! FZFMru call fzf#run({
|
||||||
\'source': v:oldfiles,
|
\'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
|
### Jump to tags
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
|
|||||||
Reference in New Issue
Block a user