121

How to jump back and forward through the cursor position history in Sublime Text?

I google a lot and find BufferScroll. But it doesn't work for me. I can't find any shortcut or how to use it in the document.

Update:

Every time I try to use Jump Forward (SHIFT+ALT+-), my editor always says "Already at the newest position" while actually not in the newest position. Jump Back (ALT+-) works well.

Basj
  • 41,386
  • 99
  • 383
  • 673
cruelcage
  • 2,044
  • 6
  • 19
  • 19

1 Answers1

187

If you mean jumping back and forward through the cursor position history, then in Sublime Text 3 it's built in via the GoTo menu or keyboard shortcuts:

Jump Back and Jump Forward – Jump Back allows you to go to previous editing positions. This goes hand in hand with Goto Definition: you can now inspect a symbol definition, and quickly jump back to where you were previously. Jump Back is bound to Alt+Minus by default. The menu entry is Goto > Jump Back

There are plugins available for ST2, for example navigationHistory.

Oskar
  • 1,597
  • 4
  • 19
  • 38
Jeremy Halliwell
  • 3,295
  • 1
  • 15
  • 13
  • Thanks,but every time I try to use Jump Forward,my editor always says "Already at the newest position" while actually not in the newest position.Jump Back works well. – cruelcage Nov 16 '13 at 00:18
  • 54
    On Macbook it's Control+- "^-", fwiw – Matt Joiner Dec 28 '14 at 00:44
  • 3
    While (from other users comments) the Windows & Mac versions do not appear to be affected, at least the Ubuntu Linux build (14.04, Sublime 3 build 3065) has the following problem: jump forward (i.e. Alt + Shift + -) does not work, with the editor reporting: 'already at the newest position'. The bug report is available here: http://www.sublimetext.com/forum/viewtopic.php?f=3&p=66465 – david.barkhuizen May 05 '15 at 11:25
  • 1
    ST3 built-in only has history size 1 for cursor position; https://github.com/timjrobinson/SublimeNavigationHistory is better since it has unlimited history (works with ST2 and ST3) – timotheecour Jan 11 '17 at 21:38
  • 1
    And if you want to change the default keymap to your own, add the following in Packages/User/Default (Linux).sublime-keymap ` { "keys": ["ctrl+1"], "command": "jump_back" }, { "keys": ["ctrl+2"], "command": "jump_forward" }, ` – chinmay Jul 10 '17 at 13:51
  • 5
    has anyone else noticed the built in navigation history is absolute garbage? It seem to only navigate back to where you last CLICKED the MOUSE??? – Farzher Aug 29 '17 at 21:06
  • 4
    On Mac: go back: `Ctrl+-` go forward: `Ctrl+Shift+-` – Ascendant Feb 24 '18 at 06:48