Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karimaziev/ivy-ag
Ivy interface for ag searching.
https://github.com/karimaziev/ivy-ag
emacs ivy ivy-plugin silver-searcher
Last synced: 4 days ago
JSON representation
Ivy interface for ag searching.
- Host: GitHub
- URL: https://github.com/karimaziev/ivy-ag
- Owner: KarimAziev
- License: gpl-3.0
- Created: 2022-05-02T10:03:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-09T13:02:09.000Z (5 days ago)
- Last Synced: 2024-11-09T13:24:16.229Z (5 days ago)
- Topics: emacs, ivy, ivy-plugin, silver-searcher
- Language: Emacs Lisp
- Homepage:
- Size: 81.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* ivy-ag
A front-end for [[https://github.com/ggreer/the_silver_searcher][ag]] (the silver searcher) with [[https://github.com/abo-abo/swiper][ivy]] interface. The package provides functionality like ~counsel-ag~ but allows to traverse upwards search directory and some extra switches.
** Requirements:
+ [[https://github.com/ggreer/the_silver_searcher][ag]] (the silver searcher)
+ [[https://github.com/abo-abo/swiper][ivy]]
+ emacs >= 26.1** Installation
*** With straight-use-package
#+begin_src elisp
(use-package ivy-ag
:init (setq ivy-ag-switchable-directories
(list user-emacs-directory org-directory))
:straight (ivy-ag
:type git
:host github
:repo "KarimAziev/ivy-ag")
:bind (("C-c C-s" . ivy-ag)
("C-c M-s" . ivy-ag-default-dir)
(:map ivy-ag-map
("C-l" . ivy-ag-up)
("M-." . ivy-ag-toggle-vcs-ignores)
("C->" . ivy-ag-switch-next-dir)
("C-<" . ivy-ag-switch-prev-dir)
("C-c o" . ivy-ag-open-in-other-window)
("C-M-." . ivy-ag-change-file-type)
("C-." . ivy-ag-cd))))
#+end_src*** Manually
Or download the repository and add it to your ~load-path~.
#+begin_src elisp
(add-to-list 'load-path "/path/to/ivy-ag/")
(require 'ivy-ag)
(define-key global-map (kbd "C-c C-s") 'ivy-ag)
(define-key global-map (kbd "C-c M-s") 'ivy-ag-default-dir)(define-key ivy-ag-map (kbd "C-l") 'ivy-ag-up)
(define-key ivy-ag-map (kbd "M-.") 'ivy-ag-toggle-vcs-ignores)
(define-key ivy-ag-map (kbd "C->") 'ivy-ag-switch-next-dir)
(define-key ivy-ag-map (kbd "C-<") 'ivy-ag-switch-prev-dir)
(define-key ivy-ag-map (kbd "C-.") 'ivy-ag-cd)
#+end_src** Usage
There are two main commands: ~ivy-ag~ and ~ivy-ag-default-dir~.
The first one performs a search starting at the current project's root and ~ivy-ag-default-dir~ - at the current directory.
During executing ~ivy-ag~ and ~ivy-ag-default-dir~, such commands are available in the minibuffer:
| Key | Command |
|---------------+-------------------------------|
| C-l | =ivy-ag-up= |
| C-. | =ivy-ag-cd= |
| C-< | =ivy-ag-switch-prev-dir= |
| C-> | =ivy-ag-switch-next-dir= |
| C- | =ivy-ag-up= |
| C-c C-o | =ivy-ag-open-in-other-window= |
| M-. | =ivy-ag-toggle-vcs-ignores= |
| C-M-. | =ivy-ag-change-file-type= |To change keybindings, modify the variable ~ivy-ag-map~, e.g.:
#+begin_src emacs-lisp
(define-key ivy-ag-map (kbd "C-") 'ivy-ag-up)
#+end_src** Customization
+ ~ivy-ag-switchable-directories~
List of directories for switching with ~ivy-ag-switch-next-dir~ and ~ivy-ag-switch-prev-dir~.+ ~ivy-ag-initial-input-chars~
Chars in the same format as for ~skip-chars-forward~. They are used to determine initial input.