Giter Club home page Giter Club logo

ivy-ag's Introduction

ivy-ag

A front-end for ag (the silver searcher) with ivy interface. The package provides functionality like counsel-ag but allows to traverse upwards search directory and some extra switches.

Requirements:

  • ag (the silver searcher)
  • ivy
  • emacs >= 26.1

Installation

With straight-use-package

(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))))

Manually

Or download the repository and add it to your load-path.

(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)

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:

KeyCommand
C-livy-ag-up
C-.ivy-ag-cd
C-<ivy-ag-switch-prev-dir
C->ivy-ag-switch-next-dir
C-<backspace>ivy-ag-up
C-c C-oivy-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.:

(define-key ivy-ag-map (kbd "C-<backspace>") 'ivy-ag-up)

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.

ivy-ag's People

Contributors

karimaziev avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.