How to default Vim :Files command to open file in a new tab? #2519
-
When I use Vim, I prefer to use tabs instead of buffers. For that reason, I'd like the default action of :Files to be "open the file in a new tab". I've dug through the code and doc and tried a few things on a private branch, but I can't seem to make it work. Is there any way to do it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi, Just to be clear, in vim "buffers" refer to actual documents that vim currently works with. A document is often a file, but could also be some automatically generated text that exists in VIM memory only. Same buffer can be open in multiple tabs, for example. You are probably talking about "windows" in VIM terminology - a rectangle inside vim that shows some buffer. I could not find tab support in the source code of fzf.vim either. Moreover, VIM's "tab" command does not work with :Files too. That being said, you could cheat the system with: :tabnew | Files |
Beta Was this translation helpful? Give feedback.
-
You can set up let g:fzf_action = { 'enter': 'tab split' } |
Beta Was this translation helpful? Give feedback.
You can set up
g:fzf_action
as described in https://github.com/junegunn/fzf/blob/master/README-VIM.md#configuration