Sublime Forum

Is there a plugin for "autojump"?

#1

I realized, reading this post, that I’d love to have functionality like described in the “Autojump” section of that post: A command that temporarily replaces the initial letters of each word with a two-letter code, and moves the cursor to the word whose code is entered. There are apparently similar plugins in neovim, but I did not find one for Sublime. Perhaps that is due to not knowing what to search for, so I wanted to ask here if anyone knows such a plugin.

0 Likes

#2

Goto-word is a built-in way to search for a particular word. If you open goto-anything and type # you can type to filter the words in the file.

0 Likes

#3

Thanks @bschaaf, though I’m looking for something that really focuses only on navigation within the currently visible portion of the buffer, ideally with the mentioned “overlay the initial two letters of each word with a two-letter code” mechanism.

0 Likes

#4

Short answer: This is currently not possible.

With existingt API functionality, this function would require a plugin to temporarily remember, modify and restore text content in visible viewport, which would have multiple possibly unwantend (permanent) side effects. At least it would likely cause syntax highlighting to break due to keywords being changed.

This is a feature, which would need to be implemented in ST core or at least requrire an extension to ST’s set_region() API to add custom text as overlay to existing content.

1 Like

#5

You may want to have a look at AceJump https://packagecontrol.io/packages/AceJump which partially does that.

1 Like

#6

https://github.com/Mister7F/sublime-jumper is in the making…

1 Like

#7

Thanks for your replies, AceJump and sublime-jumper look really good for me!

0 Likes