Problem using expand('%:p:h') for ripgrep in Vim #2923
Replies: 2 comments
-
While I'm a (neo)vim user, I'm not an expert in vimscript, and this seems more like a vimscript question. It hinges on what My guess is that ripgrep's and ag's tty detection on stdin are slightly different (please search the issues, it is intentional) and that somehow I also use fzf with ripgrep in neovim, but my config is a lot simpler than yours: https://github.com/BurntSushi/dotfiles/blob/01f959e5bc084ad61ec4df862d5c325041bc42ed/.config/nvim/include/keybinds.vim#L56-L60 It's unclear whether you can use the same kind of simpler config. |
Beta Was this translation helpful? Give feedback.
-
With the ripgrep settings configured, the mapped key Silver-searcher output: ripgrep output: |
Beta Was this translation helpful? Give feedback.
-
I have the following settings in my Vim config file:
These of course are the settings for silver-searcher.
If I replace
findcwd
configuration with"rg " . expand('%:p:h') . " -l -g ''"
it's not working; if I replaceexpand('%:p:h')
with.
it works.Do we know why
expand()
is not working with ripgrep?Beta Was this translation helpful? Give feedback.
All reactions