liuchengxu / space-vim

:four_leaf_clover: Lean & mean spacemacs-ish Vim distribution
https://liuchengxu.github.io/space-vim/
MIT License
2.85k stars 255 forks source link

:Rg is scoped to current directory #434

Closed basicBrogrammer closed 5 years ago

basicBrogrammer commented 5 years ago

Before you continue, ensure you have read the README and wiki carefully. Note that low quality issue feedback might be closed directly.

Environment

Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your issue:

Put the contents of :version below:

NVIM 0.3.4

Put the contents of :SpaceInfo below:

I've pin pointed the "issue" its more of a feature request. 

Problem Description

No errors. I was noticing that coming from my original vim config that :Rg something would be scoped to the current buffer's directory. This included <leader>pr and <leader>ps. My current work around is to comment out layers/+tools/fzf/config.vim:51 command! -bang -nargs=* Rg call spacevim#plug#fzf#Rg(<q-args>, <bang>0)

I was wondering if we could create some type of config for this g:spacevim#fzf_scoped_by_current_directory or something. I can work on a PR with some guidance.

liuchengxu commented 5 years ago

I always open files from the root of project, normally .git, so I didn't notice this glitch. I was intended to wrap the original Rg command in https://github.com/junegunn/fzf.vim with the custom prompt option added and always starts the search from the root directory of a project. Let me know if you still have issues.