I have a complex text serarch in files:
command! fzfinfiles :!rg --files-with-matches --no-messages "test" | fzf --preview "highlight -O ansi -l {} 2> /dev/null | rg --colors 'match:bg:yellow' --ignore-case --pretty --context 10 'test' || rg --ignore-case --pretty --context 10 'test' {}"
How can I solve it so that when the file is selected, it jumps to that file?
I try this, but not work: Invalid command name:
command! fzfinfiles :execute '!rg --files-with-matches --no-messages "test" | fzf --preview "highlight -O ansi -l {} 2> /dev/null | rg --colors 'match:bg:yellow' --ignore-case --pretty --context 10 'test' || rg --ignore-case --pretty --context 10 'test' {}"' | gf
I think there are a lot of apostrophes, but how could this be eliminated?