Jump to existing window/tab when using :Files
- Category
- [ ] Question
- [ ] Bug
- [x] Suggestion
- Vim
- [x] Vim
- [x] Neovim
The same way #98 added an option to jump to already opened buffers, would it be possible to have the same for :Files?
This suggestion is really helpful because I use :Files very often. Just like ctrlp, if we can jump to the already opened buffer/window, this could make my life better.
BTW, someone posted a vim script to work around this, from reddit:
let g:fzf_buffers_jump = 1
function! s:GotoOrOpen(command, ...)
for file in a:000
if a:command == 'e'
exec 'e ' . file
else
exec "tab drop " . file
endif
endfor
endfunction
command! -nargs=+ GotoOrOpen call s:GotoOrOpen(<f-args>)
let g:fzf_action = {
\ 'ctrl-t': 'GotoOrOpen tab',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
However, an easier way is something like this:
let g:fzf_action = {
\ 'ctrl-t': 'tab drop',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
Hi, after applying this configuration:
nmap <C-F> :Files<CR>
let g:fzf_action = {
\ 'enter': 'tab drop',
\ 'ctrl-t': 'tab split',
\ 'ctrl-s': 'split',
\ 'ctrl-v': 'vsplit'
\ }
let g:fzf_layout = {'down':'30'}
I have a little problem with the :Buffers command
Error detected while processing function 286[30]..<SNR>44_callback[25]..function 286[30]..<SNR>44_callback:
line 23:
Vim(drop):E471: Argument required: silent tab drop
Error detected while processing function 293[30]..<SNR>44_callback[25]..function 293[30]..<SNR>44_callback:
I am a total vim script newbie and I find it hard to figure out what is wrong.