Recently I was watching the following YouTube video https://youtu.be/fP_ckZ30gbs?t=1365 and got confused at the part where he is talking about opening multiple files at once. I tried this on my own with the following files in my working directory.
*clock.txt* Don't watch the clock; do what it does. Keep going. -- Sam Levenson *tough.txt* When the going gets tough, the tough get going. -- Billy Ocean *where.txt* If you don't know where you are going, you might wind up someplace else. -- Yogi Berra
I first navigated to the directory containing these files. I then opened up vim and ran the
:Rg going command to search for all instances of
going in the pwd. It showed the above three files which I then selected with Shift + Tab. (Tab also seems to work for me.)
After the pink '>' shows that all three files are selected, I try to open them all up at once in a horizontal split via Ctrl + x.
However, only the current selection 'tough.txt' shows up, the current selection being whichever file the bright red arrow is pointing at. The quickfix list has been populated with the three files, but they do not show up in horizontal split windows.
I do have fzf.vim installed and I placed this code at the bottom of my .vimrc:
" Enable FZF to search for strings within hidden files command! -bang -nargs=* Rg \ call fzf#vim#grep( \ 'rg --hidden --column --line-number --no-heading --color=always --smart-case -- '.shellescape(<q-args>), 1, \ fzf#vim#with_preview(), <bang>0)
As far as I can tell, the Rg command has not been customized to suppress the opening of multiple files at once. Any idea why I can't open multiple files with an Rg command?