helm-rg-occur
is elisp package to enhance the performace of helm-swoop
https://github.com/emacsorphanage/helm-swoop and helm-occur
https://github.com/emacs-helm/helm on
large size file, by using the ripgrep to do the grep on the file content.
If the file is in large size, such as 10M, both helm-swoop
or helm-occur
is quite slow, and
Emacs will be blocked. But with helm-rg-occur
, it is quite fast, and no performance issue.
helm
is needed.
- Clone this git repo to “${user-emacs-directory}/packages/helm-rg-occur”, and add folowing lines to
your Emacs config file:
(use-package helm-rg-occur :after (helm) :ensure nil ; it is github package ;; If the path is relative, it is expanded within `user-emacs-directory' :load-path "packages/helm-rg-occur" :custom (helm-rg-occur-file-size (* 2 1024 1024)) ; 2M )
helm-rg-occur
is the major command, which will userg
to do the grep on current file.helm-swoop-with-rg-occur
is to replace the commandhelm-swoop
.
The command “helm-swoop” in global keymap is rebound to this command.helm-occur-with-rg-occur
is to replace the commandhelm-occur
.
The command “helm-occur” in global keymap is rebound to this command.
If file size is larger than helm-rg-occur-file-size
, both helm-swoop-with-rg-occur
and
helm-occur-with-rg-occur
will switch to use helm-rg-occur
for improving the performace.