Harpoon
Faster Navigate inside Sublime Text with your favourite list of file
Details
Installs
- Total 4
- Win 1
- Mac 1
- Linux 2
| Jun 29 | Jun 28 | Jun 27 | Jun 26 | Jun 25 | Jun 24 | Jun 23 | Jun 22 | Jun 21 | Jun 20 | Jun 19 | Jun 18 | Jun 17 | Jun 16 | Jun 15 | Jun 14 | Jun 13 | Jun 12 | Jun 11 | Jun 10 | Jun 9 | Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | May 21 | May 20 | May 19 | May 18 | May 17 | May 16 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Harpoon
A Sublime Text plugin for marking files and jumping back to them instantly.
Marks are scoped per project / per session
Features
- Mark/unmark the current file with one hotkey
- Jump to any mark directly by slot number (1, 2, 3, 4…)
- Browse all marks in a quick panel
- Cycle forward/backward through marks
- Marks persist across restarts (saved in the
.sublime-projectfile) - Dead marks (deleted or moved files) are pruned automatically
- Modify list order easily with buffer
Installation
- Open
Preferences > Browse Packages...in Sublime Text. - Create a new folder called
Harpoon. - Copy
Harpoon.pyinto that folder. - Add the key bindings below via
Preferences > Key Bindings.
Recommend
Your window should have a saved .sublime-project file (Project > Save Project As...). Harpoon stores marks inside the project file itself, so without one there's nowhere durable to save them — commands will show an error pointing this out. Easiest way is to install AutoProject Plugin that will automatically create .sublime-project
Update (v1.0.3): Harpoon now utilizes window.settings() to manage your marks. This means data is quietly handled by Sublime's internal session manager and persisted inside your workspace or global session cache. A .sublime-project file is no longer required-Harpoon works completely out of the box in any ad-hoc window or folder without any setup or sidebar flashing!
Commands
| Command | Description |
|---|---|
harpoon_add |
Mark the current file, or unmark it if already marked |
harpoon_list |
Show a quick panel of all marks; select to open |
harpoon_goto |
Jump to a specific mark by slot (index arg, 1-indexed) |
harpoon_next |
Cycle to the next mark |
harpoon_prev |
Cycle to the previous mark |
harpoon_clear |
Clear all marks for the current project |
harpoon_edit |
Open a buffer to edit/re-order harpoon list |
Suggested key bindings
Add to your Default.sublime-keymap (Preferences > Key Bindings):
[
{ "keys": ["ctrl+alt+a"], "command": "harpoon_add" },
{ "keys": ["ctrl+alt+e"], "command": "harpoon_list" },
{ "keys": ["ctrl+alt+]"], "command": "harpoon_next" },
{ "keys": ["ctrl+alt+["], "command": "harpoon_prev" },
{ "keys": ["ctrl+alt+d"], "command": "harpoon_clear" },
{ "keys": ["ctrl+alt+r"], "command": "harpoon_edit" },
{ "keys": ["ctrl+1"], "command": "harpoon_goto", "args": {"index": 1} },
{ "keys": ["ctrl+2"], "command": "harpoon_goto", "args": {"index": 2} },
{ "keys": ["ctrl+3"], "command": "harpoon_goto", "args": {"index": 3} },
{ "keys": ["ctrl+4"], "command": "harpoon_goto", "args": {"index": 4} }
]
Adjust freely — these are just suggestions, not hardcoded defaults. harpoon_goto accepts any index, so you aren't limited to four slots; add more bindings for index: 5, 6, etc. if you want.
Usage
- Open a file you want to keep close at hand.
- Press your
harpoon_addkey (e.g.ctrl+alt+a) to mark it. Press it again on the same file to unmark it. - Switch to another file, mark it too. Repeat as needed.
- Use
ctrl+1–ctrl+4(or your bound keys) to jump straight to a marked file by slot,harpoon_next/harpoon_prevto cycle through the list in order, orharpoon_listto see all marks in a quick panel and pick one.
How it works
Marks are stored under a "harpoon_marks" key inside your window's settings, accessed via Sublime's window.settings() API. Because this data is handled directly by Sublime's internal session manager, it is automatically persisted behind the scenes to your .sublime-workspace file (if using a saved project) or the global auto-save session cache. This completely avoids manual disk writes to a .sublime-project file, keeping your sidebar quiet and your workflow lag-free.
This also means:
- Isolated Environments: Marks are strictly bound to the individual window session, ensuring different projects or folders never mix up or share lists.
- Independent Windows: Multiple windows running side-by-side maintain completely isolated sets of marks.
- Zero Setup Required (v1.0.3+): You no longer need to save a
.sublime-projectfile. Marks persist automatically across application restarts for ad-hoc folders and random windows, living safely within Sublime's workspace history.
Notes
- Marks are stored as absolute file paths. Moving or renaming a project on disk won't break existing marks as long as the paths themselves remain valid; if a file is deleted or moved, its mark is silently dropped the next time you open the list or cycle through marks.
harpoon_addrequires the file to be saved (have a path on disk); it won't mark unsaved buffers.