Bookmarks are a weird thing since they’re based on a specific line. Which means you can bookmark the start of a function and the add/remove some code above and you no longer have a bookmark that leads to what you thought it should.
Which is why there are now labels you can put in your code, like this:
[lua]–#cpm label Timer Cancel All
helpArr.cancelAll = ‘timer.cancelAll()’
timer.cancelAll = function()
while #timerArray > 0 do
timer.cancel(table.remove(timerArray,1))
end
end[/lua]
Anything after “label” will be shown in the CPM Tags list, like this:
One thing to watch out for is that when you type in a CPM tag it won’t “pick it up” until after you hit return at the end of the line. To try and keep the editor as fast as possible I only check for those things at a carriage return.
The nice thing about the label tag is that it “floats” withe the code, so adding/removing won’t affect it – clicking it in the Tags list will take you back there (the line number shown in the picture is dynamic, it changes as the actual line number changes).
That CPM Tags list will show labels as well as “to do” items as well as a couple other things that aren’t public at this point.
[lua]–#cpm TODO Make a list of new stuff in CPM[/lua]
That will show up in the list, too. And all labels will be grouped together, all To Do items, etc.
As far as the glitchy editor, I still haven’t been able to track that down. As you know, it’s an aesthetic thing only, it doesn’t actually affect the code – but I know it’s still an annoyance.
Jay
PS - There’s a small shortcut for CPM tags, hit – and then the Tab key.
[import]uid: 9440 topic_id: 25717 reply_id: 103964[/import]