Home Download Buy Blog Forum Support

Web browser-like history to go back to the previous focus

Web browser-like history to go back to the previous focus

Postby isatis39871 on Mon May 09, 2011 7:15 pm

When you work on a code, you usually work on 3/4 spots at the same time. You tweak, then you go to the next part, and you tweak, then you go back to the previous part. Then you click on another tab to check something. You scroll. You then go back, etc.

Having some 'back' and 'forward' arrows like in a browser would really ease this process. Every time you click on some part of a text file, it's like when you enter a URL in the web browser: you change location, and the location get added to the history.

The history should go across tabs of course, as you usually edit several files at the same time.
isatis39871
 
Posts: 7
Joined: Mon May 09, 2011 7:08 pm

Re: Web browser-like history to go back to the previous focus

Postby jbrooksuk on Mon May 09, 2011 8:56 pm

Or you can use bookmarks, Ctrl+F2 to set a bookmark and F2 to jump back to them.
jbrooksuk
 
Posts: 771
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Web browser-like history to go back to the previous focus

Postby isatis39871 on Mon May 09, 2011 9:28 pm

Yeah, and you can use bookmark in a webrowser too. But would it be practical to not have history ?
isatis39871
 
Posts: 7
Joined: Mon May 09, 2011 7:08 pm

Re: Web browser-like history to go back to the previous focus

Postby jbrooksuk on Mon May 09, 2011 10:56 pm

I don't really see how this would work though. You'd have to keep a separate buffer to that of the "undo/redo" stack. And then how would they interlink?
jbrooksuk
 
Posts: 771
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Web browser-like history to go back to the previous focus

Postby isatis39871 on Tue May 10, 2011 6:42 am

This is where the web browser analogy dies: URL are not supposed to change while your are browsing, while your code does.

The best I can think of is to save the last line number that lost focus and consider it "good enough". It will be a time saver 99% of the cases since like in every history, the first and the second entry would be the most used. In the other cases, you will arrive far away from the edit and have to scroll as usual. It's not a big deal, you just have to be aware of the limitation.
isatis39871
 
Posts: 7
Joined: Mon May 09, 2011 7:08 pm

Re: Web browser-like history to go back to the previous focus

Postby johnboiles on Fri Jun 03, 2011 9:55 pm

XCode has this feature. I find it to be useful.
johnboiles
 
Posts: 1
Joined: Fri Jun 03, 2011 9:53 pm

Re: Web browser-like history to go back to the previous focus

Postby HerbCSO on Wed Jun 29, 2011 10:00 am

Totally agree, this would be ultra-useful! Eclipse does it as well and I use it all the time to jump back and forth between bits of code. Would love to see this feature implemented.

I think I need to start poking around the API to see if this could be a plugin... ;]
HerbCSO
 
Posts: 5
Joined: Tue Nov 24, 2009 5:06 am

Re: Web browser-like history to go back to the previous focus

Postby andreh on Thu Aug 04, 2011 3:04 pm

Try the "soft_undo" and "soft_redo" commands. Per default, both are mapped to "ctrl-u" and "ctrl+shift+u" and available from the "Edit"->"Undo Selection" menu.
andreh
 
Posts: 1
Joined: Thu Aug 04, 2011 3:02 pm

Re: Web browser-like history to go back to the previous focus

Postby ehamiter on Wed Aug 10, 2011 2:13 am

sublimator wrote:http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/src/history/editorhistory.py

Now all we have to do is build it. 8-)
ehamiter
 
Posts: 67
Joined: Wed Apr 27, 2011 2:42 am

Re: Web browser-like history to go back to the previous focus

Postby Kronuz on Thu Aug 11, 2011 12:29 pm

Yes, Open Komodo is full of useful, well tested, maintained code... The license for it, however, is MPL and GPL, which makes it impossible for Jon to bundle stuff from it into the ST2 official distribution... but we can always have plugins! :-D
Kronuz
 
Posts: 98
Joined: Mon Feb 14, 2011 3:14 pm

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 9 guests