title: Working solution for FZF most recent files in Vim?
body: <p>I have a problem with finding a proper solution for most recently used files with the FZF Vim plugin.</p>
  <p>This plugin should have features like:</p>
  <ul>
  <li>show files opened in current vim session(like buffers)</li>
  <li>filter files like NERD_tree, fugitive</li>
  </ul>
  <p>I tried two solutions</p>
  <pre><code>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),
    \        &quot;v:val !~ 'fugitive:\\|\\.svg|NERD_tree\\|^/tmp/\\|.git/'&quot;),
    \ map(filter(range(1, bufnr('$')), 'buflisted(v:val)'), 'bufname(v:val)'))
  endfunction
  </code></pre>
  <p>This one works during open session but when I restart Vim I don't see all last opened files.</p>
  <pre><code>command! FZFMru call s:fzf_wrap({
      \'source':  'bash -c &quot;'.
      \               'echo -e \&quot;'.s:old_files().'\&quot;;'.
      \               'ag -l -g \&quot;\&quot;'.
      \           '&quot;',
      \})
  
  function! s:fzf_wrap(dict)
      let defaults = {
      \'sink' : 'edit',
      \'options' : '+s -e -m',
      \'tmux_height': '40%',
      \}
      call extend(a:dict, defaults, 'keep')
      call fzf#run(a:dict)
  endfunction
  
  function! s:old_files()
      let oldfiles = copy(v:oldfiles)
      call filter(oldfiles, 'v:val !~ &quot;fugitive&quot;')
      call filter(oldfiles, 'v:val !~ &quot;NERD_tree&quot;')
      call filter(oldfiles, 'v:val !~ &quot;^/tmp/&quot;')
      call filter(oldfiles, 'v:val !~ &quot;.git/&quot;')
      call filter(oldfiles, 'v:val !~ &quot;.svg&quot;')
      return join(oldfiles, '\n')
  endfunction
  </code></pre>
  <p>This solution filters files properly but works only for files opened in previous session. So I need to restart Vim to get the current buffer.</p>
  <p>Did you find a working solution for FZFMru in Vim?</p>