Git Product home page Git Product logo

harpoon's Introduction

About

Harpoon package for emacs, based on the plugin from ThePrimeagen.

This package offers quick bookmarks separated by project and branch. You can quick navigate between your working files and forget about that files opened that you will not use anymore.

Harpoon is more a way to manage and quick navigate between the main files that you are working on than a bookmark system.

harpoon.gif

Installation

Manual

Load harpoon.el in your personal configuration.

MELPA

M-x package-install harpoon

Doom Emacs

Add to package.el:

(package! harpoon)

Features

  • Add, order and delete harpoons in your code.
  • Harpoon is separated by project and branch
  • Quick switch between harpoons

Configuring

Example of how to set the shortcuts:

;; On vanilla (You can use another prefix instead C-c h)

;; You can use this hydra menu that have all the commands
(global-set-key (kbd "C-c a") 'harpoon-quick-menu-hydra)
(global-set-key (kbd "C-c h <return>") 'harpoon-add-file)

;; And the vanilla commands
(global-set-key (kbd "C-c h f") 'harpoon-toggle-file)
(global-set-key (kbd "C-c h h") 'harpoon-toggle-quick-menu)
(global-set-key (kbd "C-c h c") 'harpoon-clear)
(global-set-key (kbd "C-c h 1") 'harpoon-go-to-1)
(global-set-key (kbd "C-c h 2") 'harpoon-go-to-2)
(global-set-key (kbd "C-c h 3") 'harpoon-go-to-3)
(global-set-key (kbd "C-c h 4") 'harpoon-go-to-4)
(global-set-key (kbd "C-c h 5") 'harpoon-go-to-5)
(global-set-key (kbd "C-c h 6") 'harpoon-go-to-6)
(global-set-key (kbd "C-c h 7") 'harpoon-go-to-7)
(global-set-key (kbd "C-c h 8") 'harpoon-go-to-8)
(global-set-key (kbd "C-c h 9") 'harpoon-go-to-9)

;; On doom emacs

;; You can use this hydra menu that have all the commands
(map! :n "C-SPC" 'harpoon-quick-menu-hydra)
(map! :n "C-s" 'harpoon-add-file)

;; And the vanilla commands
(map! :leader "j c" 'harpoon-clear)
(map! :leader "j f" 'harpoon-toggle-file)
(map! :leader "1" 'harpoon-go-to-1)
(map! :leader "2" 'harpoon-go-to-2)
(map! :leader "3" 'harpoon-go-to-3)
(map! :leader "4" 'harpoon-go-to-4)
(map! :leader "5" 'harpoon-go-to-5)
(map! :leader "6" 'harpoon-go-to-6)
(map! :leader "7" 'harpoon-go-to-7)
(map! :leader "8" 'harpoon-go-to-8)
(map! :leader "9" 'harpoon-go-to-9)

Customizing

You can customize by setting this variable:

VariableDescriptionDefault
harpoon-separate-by-branchIf nil, ignores the brancht
harpoon-project-packagePackage used to harpoon to get project stuff. Available: projectile, project‘projectile
harpoon-without-project-functionFunction used to return a name for harpoon cache file when not visiting a project.‘harpoon–package-name

Extra tips for harpoon-without-project-function

If you want that harpoon behaves uses the current file directory, change it to ‘harpoon–current-file-directory

If you use doom , you can set this variable to ‘+workspace-current-name and use the workspace name instead the harpoon global.

You can also create your own function to determine the harpoon cache file and add to this variable.

My other works:

Rails i18n:

https://github.com/otavioschwanck/rails-i18n.el

Rails routes:

https://github.com/otavioschwanck/rails-routes.el

My Personal Config (for rails)

(Very complete, has videos + handbooks of how to use) https://github.com/otavioschwanck/doom-emacs-on-rails/

Do you like my work? Please, buy me a coffee

https://www.buymeacoffee.com/otavioschwanck

harpoon's People

Contributors

joncol avatar martini97 avatar meain avatar otavioschwanck avatar syohex avatar the-moriarty 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.