Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muffinmad/emacs-find-file-rg
Find file in current project using rg --files command
https://github.com/muffinmad/emacs-find-file-rg
emacs ripgrep
Last synced: about 2 months ago
JSON representation
Find file in current project using rg --files command
- Host: GitHub
- URL: https://github.com/muffinmad/emacs-find-file-rg
- Owner: muffinmad
- License: gpl-3.0
- Created: 2018-09-28T20:52:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-05T16:18:30.000Z (over 1 year ago)
- Last Synced: 2024-08-07T18:31:26.574Z (5 months ago)
- Topics: emacs, ripgrep
- Language: Emacs Lisp
- Homepage:
- Size: 43.9 KB
- Stars: 14
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://stand-with-ukraine.pp.ua)
[![License GPL 3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/copyleft/gpl.html)
[![MELPA](https://melpa.org/packages/find-file-rg-badge.svg)](https://melpa.org/#/find-file-rg)# emacs-find-file-rg
This package allows to find file in current project or any directory using `rg --files` command.
## Why?
As a [ripgrep](https://github.com/BurntSushi/ripgrep) user, I have fine-tuned `.ignore` file in my projects folders to exclude certain files from grepping. It turned out that `rg --files` provides the list of only interesting files.
## Usage
### Interactive commands
#### `find-file-rg`
Asks for project dir if needed and reads filename with completing function. `project-current` is used as the default directory to search in. If invoked with prefix argument, always asks for directory to find files in.
#### `find-file-rg-at-point`
Calls `find-file-rg` with active region or filename at point as initial value for completing function.
### Keybindings
No predefined keybindings are provided. I personally use C-c f for `find-file-rg` and C-c g for `find-file-rg-at-point`.
## Installation
### With `package.el`
Download `find-file-rg.el` and run:
M-x `package-install-file` RET `` RET
### Without `package.el`
Put `find-file-rg.el` somewhere in your load path and add this to `init.el`:
``` el
(require 'find-file-rg)
```