After switching to Sublime last week I wanted to start developing my own plugins so here I am asking for some advice ... Needs saying that I'm new to Sublime API and Python, so please be benevolent

I'm trying to develop a plugin that would allow user to go back to the last editing position in the current view (a feature I found very interesting in NetBeans) and using only the current line I got stuck here:

With apologies, but I've extended this example a bit, as it's helping me to study Python:

It cycles through the last five edit positions;It won't cause an error if there isn't a position to navigate to;It only stores an edit position if it's on a different line from the previous edit;It only remembers the last 10 edit positions (so that the list doesn't grow continuously).

khrizt wrote:You should publish that in github or something like that, a lot of people will find it useful.

Hello. This is interesting in terms of learning Python, and the ST API. But on further investigation my example is of restricted use. Most significantly, because the last position(s) are stored in a class attribute (rather than an instance attribute), editing in two different tabs will cause mayhem . I'm not sure how to get around this at the moment, although one way might be to store a reference to the current view with each edit position - but this sounds messy.

But many other discrepancies will arise: pressing Enter a few times, deleting text, copying, editing the same line again - all of these actions will make the code less useful.

I notice that someone has already created an editing history plug-in in a recent thread of this forum. Andy.

"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.