Home Download Buy Blog Forum Support

[Feature] Cursor Forcus History

[Feature] Cursor Forcus History

Postby bluebruce on Mon Apr 26, 2010 5:00 pm

It will be great to have commands to jump cursor(forcus) back and forth.
Ctrl+u has similar function to jump cursor back, but ctrl+u is part of undo history and can not "redo"(jump forth).
It is something more lilke an "cursor forcus history". With this feature, I can jump to a function B
define from palce A (using search or cTag or any methods which changing the cursor forcus)
and revert forcus back to place A after I finished my work in function B.
I can't find a plugin or command for this feature.
This feature is so helpful when tracing code.

----
A post from "technical support forum".
bluebruce
 
Posts: 8
Joined: Fri Apr 23, 2010 3:37 pm

Re: [Feature] Cursor Forcus History

Postby guillermooo on Mon Apr 26, 2010 7:06 pm

Hey bluebruce,

Have you tried bookmarks? (CTRL+F2, SHIFT+F2) Maybe that can help you?
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: [Feature] Cursor Forcus History

Postby edanm on Mon Apr 26, 2010 7:46 pm

I would really like this feature built as well.

The way I see it, alt+left/right should step through the history, shift+alt+left/right will allow you to select while you jump.
The jump will try to go in blocks, i.e. if I moved down three lines quickly, one press will go up three lines.

@guillermooo: I'll have to look into the bookmarks, but this feature would be a better fit for a lot of things (for basic editing, you're not going to define a bookmark).
edanm
 
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm

Re: [Feature] Cursor Forcus History

Postby bluebruce on Tue Apr 27, 2010 4:38 pm

@guillermooo
I'm a lazy and stupid guy. Bookmarks doesn't work for me. Using bookmark interrupts my thinking flow when tracing code... ^^;
bluebruce
 
Posts: 8
Joined: Fri Apr 23, 2010 3:37 pm

Re: [Feature] Cursor Forcus History

Postby bluebruce on Wed Apr 28, 2010 2:29 pm

@sublimator
Yes! cTags works great and has similar function I'm looking for.
I didn't read the cTags plugin yet (I guess it is too complex to a plugin beginner..^^;)
I checked the API document, but I can't find any API to be able to trace user's cursor history.
I guess I can use view.show() and sublime.region to jump and record the cursor history,
but I can't find the hook to get cursor position changes.....

Any hint?
bluebruce
 
Posts: 8
Joined: Fri Apr 23, 2010 3:37 pm

Re: [Feature] Cursor Forcus History

Postby jps on Wed Apr 28, 2010 2:50 pm

You can get a notification when the cursor position changes via the onSelectionModified callback (subclass from http://www.sublimetext.com/docs/api-ref ... gin.Plugin and just implement the onSelectionModified command). You'll have to do some filtering on the results though, as you'll get all modifications, even those from typing.
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 4 guests