Comments (3)
Is it limited to current directory only using
:Rg [PATTERN]
Yes. The default implementation of :Rg
command treats the whole arguments as a single pattern string.
This allows you to omit quotes when you search for a query with spaces or quote characters. I find it extremely useful when searching for lines that print logs.
:Rg cannot proceed
:Rg "Failed to
But you can override this behavior by redefining :Rg
command or defining a command with a different name, so each argument is directly passed to the ripgrep process.
command! -complete=file -bang -nargs=* Rg
\ call fzf#vim#grep("rg --with-filename --column --line-number --no-heading --color=always --smart-case -- ".<q-args>, fzf#vim#with_preview(), <bang>0)
Note
Compared to this original :Rg
,
--with-filename
was added so that the file name is always printed even when you pass a file pathfzf#shellescape
around<q-args>
is removed
With this version, you can do something like :Rg pattern ./location/to/file.extension
, but :Rg
(no arguments), :Rg cannot proceed
(query string with spaces), :Rg "Failed to
(query string with quote characters), etc will no longer work. So you probably want to define it with a different name.
from fzf.vim.
RG is taken. https://github.com/junegunn/fzf.vim?tab=readme-ov-file#commands
from fzf.vim.
Idea: this seems to be a common use-case. Can fzf.vim
add a new command called :RG
that behaves like that?
In other words, out-of-the-box people will have :Rg
that behaves as usual, and :RG
that allows specifying files.
from fzf.vim.
Related Issues (20)
- `preview.sh` is inaccessible under Windows by default. HOT 3
- [Rg] Is there a way to open the file and navigate to a line without having paths and line numbers in the output? HOT 1
- GitBranchFiles ?
- :Tags<cr>Query behaves differently from :Tags Query<cr> HOT 6
- The preview window pops up and then crashes before you can see it clearly on Windows 10 HOT 8
- [bug] :Commands command do not fuzzy find in windows HOT 2
- [bug] g:fzf_vim.preview_bash forced to always use backlash in windows
- Show enclosing object for line in preview window
- Use <C-enter> in fzf_actions HOT 2
- Errors running any command inside neovim HOT 4
- rfv works in vim HOT 1
- Using Ctrl+R to paste from a register in the fzf window
- support skim/fzy as fzf is really too slow HOT 14
- tagpreview.sh - preview error with awk syntax error HOT 3
- BCommits Ctrl+D suddenly doesn't work properly HOT 3
- suggestion: refuse to open `:Files` (and other commands) if `'hidden'` is off and window has unsaved changes HOT 2
- Cursor does not stop blinking after :FZF (Windows, Git Bash)
- Get current fzf.vim colorscheme HOT 2
- Files ignores multiselection on Enter HOT 1
- abbreviate long paths with --with-nth chages search results HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fzf.vim.