Recent file history in Vim?

后端 未结 14 1600
悲&欢浪女
悲&欢浪女 2021-01-29 18:44

I would like to access recent files that I had opened and then closed in GVim. I open and close GVim frequently. I would like to access recent files from previous sessions as we

14条回答
  •  不要未来只要你来
    2021-01-29 19:16

    Adding my 2 cents here because fzf was was not mentioned earlier, which is such a wonderful tool:
    fzf.vim has a :History command that lets you search the most recent used files in a fuzzy and search while you type manner.
    I customize the (default) behavior of this command by not letting fzf reorder the search results list to the best match: I want the order of all matching filenames to keep being the order in which these files were last used.
    To accomplish this customization, I added the following in my .vimrc to override the default History command defined by the fzf.vim plugin:

        command! -bang -nargs=* History
          \ call fzf#vim#history({'options': '--no-sort'})
    

提交回复
热议问题