srusskih / SublimeJEDI

awesome Python autocompletion with SublimeText
MIT License
938 stars 109 forks source link

Ability to go back after goto #155

Closed danihodovic closed 7 years ago

danihodovic commented 10 years ago

User/Default.sublime-mousemap

[{ "modifiers": ["ctrl"], "button": "button1", "command": "sublime_jedi_goto", "press_command": "drag_select" }]

Gives us the ability to go to a function definition. Is it possible to go back from there?

FichteFoll commented 10 years ago

If it's on ST3 and within the same file, you can do it with ctrl+u (which is "soft undo" and covers selection changes).

Or you could use a plugin for keeping a selection history that disregards edits completely. I'm sure I've seen one in the past week but can't seem to find it right now.

danihodovic commented 10 years ago

Ctrl+U doesn't work across files.

FichteFoll commented 10 years ago

When moving across files, ST has a command for that too. By default it's shift+tab, but some people remap those to go in visual order instead of last used.

danihodovic commented 10 years ago

Found it!

{ "keys": ["alt+-"], "command": "jump_back" },

Thanks!

Edit: Doesn't work as expected, goes to where sublime kept the last cursor (i.e the user), not where Jedi went. So instead of going one cursor back it goes two cursors back.

Edit2: Was fixed on Github but never pushed to the package management system. It actually works. alt + -

danihodovic commented 10 years ago

Could this be reopened? There seems to be no viable fix

FichteFoll commented 10 years ago

Since this is your own issue (and you also closed it), you can re-open this yourself.