junegunn / fzf.vim

fzf :heart: vim
MIT License
9.59k stars 582 forks source link

[New Feature, Question] auto run `:History` when run nvim without assigning any file name #1383

Open xyecoding opened 2 years ago

xyecoding commented 2 years ago

Desired Function: Auto list the history files waiting to be choose when run nvim without assigning a file name. If a file name is assigned, for example, run nvim xxx, the recent file woud not be listed, and xxx is just being opened.

I tried to add autocmd BufNewFile :History in my init file. It does not work. I added autocmd BufNewFile *.vim :History in my init file. When I created a new file by run nvim xxx.vim. The FZF_History terminal interface opened. However, I can't choose the history files. Because instead of entering a Terminal mode by run the command :History in an existing nvim interface, it entered an insert mode. Thus, I can't typing anyting into the FZF_History terminal interface.

thw26 commented 2 years ago

I'd like to second this, or something similar to it if I'm understanding right. It would be great to have the most recently accessed files, the :History, be integrated into the :Files command somehow (Supplied files list equals :Files + :History appended?) before a search is begun. Thus when I open the search prompt, my option would be to use a recently accessed :History file, or proceed to a fuller search through the current directory.

My use case is simple. I am using vim with wiki.vim and fzf + fzf.vim. Sometimes I am simply bouncing back and forth between say five and ten files.