erotourtes / Harpooner

Apache License 2.0
14 stars 1 forks source link

Harpooner

![Build](https://github.com/erotourtes/Harpooner/workflows/Build/badge.svg) [![Version](https://img.shields.io/jetbrains/plugin/v/com.github.erotourtes.harpoon.svg)](https://plugins.jetbrains.com/plugin/21796-harpooner) [![Downloads](https://img.shields.io/jetbrains/plugin/d/com.github.erotourtes.harpoon.svg)](https://plugins.jetbrains.com/plugin/21796-harpooner)

Harpooner - the Harpoon by Erotourtes for JetBrains products

Inspired by ThePrimeagen/harpoon

Preview

Preview.webm

Description

Harpooner is a navigation plugin. You can "harpoon" a file and quickly open it later in the Tools menu or through the keyboard shortcuts.

Note: you need to configure the keyboard shortcuts yourself. See the example section.

Features

This plugin is inspired by Harpoon

Example

You need to use IdeaVim plugin to use the following keybindings.

" Harpoon
nmap <M-j> <action>(HarpoonerOpenFile0)
nmap <M-k> <action>(HarpoonerOpenFile1)
nmap <M-l> <action>(HarpoonerOpenFile2)
nmap <M-;> <action>(HarpoonerOpenFile3)

nmap <leader>hm <action>(HarpoonerQuickMenu)
nmap <leader>ha <action>(HarpoonerAddFile)

nmap <leader>hn <action>(HarpoonerNextFileAction)
nmap <leader>hp <action>(HarpoonerPreviousFileAction)

" nmap <M-4> <action>(HarpoonerOpenFile4)
" nmap <M-5> <action>(HarpoonerOpenFile5)
" nmap <M-6> <action>(HarpoonerOpenFile6)
" nmap <M-7> <action>(HarpoonerOpenFile7)
" nmap <M-8> <action>(HarpoonerOpenFile8)
" nmap <M-9> <action>(HarpoonerOpenFile9)

[!TIP] You can move code with

vmap J <action>(MoveLineDown)
vmap K <action>(MoveLineUp)
nmap <C-j> <action>(MoveLineDown)
nmap <C-k> <action>(MoveLineUp)

Settings

You can change the settings: Settings/Preferences > Tools > Harpooner Settings

settings1

With show project path on settings2

With the number of visible words: 1
settings3

With save on type off
Changes are saved after and only after closing the file

Installation


Plugin based on the IntelliJ Platform Plugin Template.