How do I jump (scroll) back in history in a file ?

Is there a way to use the history of the scroller to jump back and forth ?

For example, if I have a method :

function method () {

}


...

far down below in the same file

...

method(); // Call ( hold CTRL and click on the word "method" )


The scroller takes me up to the implementation of "method"... which is nice... but how can I get back to the caller ( where I just was ) in an easy way ?

Is there a scroll history that can be used ?


Cheers, Hamidam

10 comments
Comment actions Permalink

Hi Hamidam,

There are visited locations navigation facilities. Also there is a very convenient feature - editor bookmarks.

Denis

0
Comment actions Permalink

Hello Hamidam,

The toolbar has Back and Forward buttons that can be used for exactly that
purpose. The default keyboard shortcuts for those are Ctrl-Alt-Left/Right.

Is there a way to use the history of the scroller to jump back and
forth ?

For example, if I have a method :

function method () {

}

..

far down below in the same file

..

method(); // Call ( hold CTRL and click on the word "method" )

The scroller takes me up to the implementation of "method"... which is
nice... but how can I get back to the caller ( where I just was ) in
an easy way ?

Is there a scroll history that can be used ?

Cheers, Hamidam

---
Original message URL:
http://devnet.jetbrains.net/message/5281921#5281921


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks, but the first link was about tabs and the other about having to set up some bookmarks.. which could be an option... but requires me to set up stuff which will never happen :)

However I did find what I was looking for... CTRL + ALT LEFT and RIGHT ARROW

Those are however default binding on Ubuntu so I had to change the keys for it.

Thanks, Hamidam

0
Comment actions Permalink

Hamidam wrote:

Thanks, but the first link was about tabs ...


I'm afraid the documentation is a little inconsistent here. It says 'To go back and forth through the history of visited tabs, do one of the following... Press Alt+Shift+Left or Alt+Shift+Right' but 'Alt+Shift+Left or Alt+Shift+Right' navigate you through the locations history, not tabs history.

I mentioned editor bookmarks because I consider them to be a very convenient and my experience says that most of IJ users don't know about big number of the IDE facilities :)

Denis

0
Comment actions Permalink

Yes, thanks :)

May I just ( as always ) highlight what I consider an issue or bug now that I have started to use it.

It's not file related but seems to scroll other windows ( file editors in other groups as well as switches to tabs and scroll those ( not sure if it's even correct behaviour, one of the files being switched to hasn't been touched in a long while, yet it's switching and scrolling in that file editor, and even opening it up if I close it)...

Correction: I have not edited the other file editor but I have been experementing with the scroller there.. so that's not incorrect behaviour.. it's more a matter of having the scroller local to one editor window.. it seems to be more useful for me... or at least offer us both :) )

Cheers, Hamidam

0
Comment actions Permalink

Yes, It seems as if bookmarks might be useful once you learn how to use them..

However.. After having created a bookmark using CTRL + F11 and assigned a number or key ( alphabetic ) I understand that I should use
CTRL + assigned key..

There is a problem with the CTRL key though since it's a main key for many applications (including intellij ) and system hotkeys ( CTRL + C ) ... CTRL + UP and DOWN doesn't work in intellij either because of it's use on scroll editor window.

Is there a way to change this key ? That is, instead of CTRL, switch to ALT GR or WIN key ( on Linux this would be useful ) ...
I understand I can change the CTRL + {0..9} keysin settings > keymap, but what about the alphabet ones ?

Cheers, Hamidam

0
Comment actions Permalink

There is no way to change that at the moment.

However, I can say that ten bookmarks is more than enough for me during every-day programming (i.e. I reassign them rather often on current task change).

P.S. You can create new number-based bookmark via Ctrl+Shift+{0..9} shortcut.

Denis

0
Comment actions Permalink

Hello Hamidam,

Ctrl+assigned key works only with bookmarks labeled with numbers (which don't
intersect with system or IntelliJ hotkeys). To jump to a bookmark labeled
with a letter, press F11 and then the letter.

Yes, It seems as if bookmarks might be useful once you learn how to
use them..

However.. After having created a bookmark using CTRL + F11 and
assigned a number or key ( alphabetic ) I understand that I should use
CTRL + assigned key..

There is a problem with the CTRL key though since it's a main key for
many applications (including intellij ) and system hotkeys ( CTRL + C
) ... CTRL + UP and DOWN doesn't work in intellij either because of
it's use on scroll editor window.

Is there a way to change this key ? That is, instead of CTRL, switch
to ALT GR or WIN key ( on Linux this would be useful ) ...

I understand I can change the CTRL + {0..9} keys but what about the
alphabet ones ?

Cheers, Hamidam

---
Original message URL:
http://devnet.jetbrains.net/message/5282001#5282001


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Would the Go To | Last Edit Location (Ctrl+Shift+Backspace) action be useful for you. If you did some editing in caller, did a Ctrl+Click (or the equivalent Ctrl+B) to go into "method", then once "finished" there, you can then type Ctrl+Shift+Backspace to go back to your edit point in the caller. It would take you back to the place where you were editing, and not to the call to method() in the caller.  If you really want to go back to the method() declaration in the caller, you can use this hack: before doing ctrl+Click/Ctrl+B, type a space and then a backspace (or basically do and then undo anything). This registers that spot as the last edit point. That way when you later do Ctrl+Shift+Backspace, you are taken back to that spot. Note that Go to Last Edit Location action stores the last few edit points (I am not sure how many). So you can jump back 4 or 5 edit points (perhaps more).

That might help do what you want.

0
Comment actions Permalink

I have to say.. there needs to a scrolling back and forth thats relative to the currently editing file.
To much headache jumping between windows.
To much headache scrolling up and down in the same file. Take me back

0

Please sign in to leave a comment.