Sublime Forum

Programmatic access to jump list

#1

Hi there,

I have a special file format where a file contains named regions. I would like to write a plugin that accesses the user’s jump list, and offers the user a menu of previous jump positions annotated with the given region information. Is there a way to access the jump list as eg a series of character offsets?

Thanks

0 Likes

#2

Any ideas?

0 Likes

#3

What specifically do you mean by “jump list”?

0 Likes

#4

I mean the list of locations in the current view that get visited when the user presses Control-Hyphen

0 Likes

#5

In case you are interested in symbols of the current view, they can be accessed via view.symbols() method.

0 Likes

#6

Hi, not quite what I’m looking for, I’d like to get an array of the locations in the file that the user has previously accessed, which is used in the native “Jump forward” and “Jump back” command. Thank you

0 Likes

#7

That is accessible by importing the Default history_list plugin. Note however that this plugin is not part of the stable API, as such there is no guarantee of backwards compatibility. Here’s an example of getting the jump history for a view:

import history_list
history_list.get_jump_history_for_view(view).history_list
0 Likes

#8

Thanks so much!

0 Likes