Sublime Forum

Move cursor to next/pevious function

#1

Hi, I am looking for a way to move my cursor to the previous/next function/Class.

Any macro guru would like to help me out with this? I am coding mainly in python.
The logic would be find the previous/next function definition (def) or class definition (class)

Thanks

0 Likes

#2

ctrl/cmd+r. Up/down arrows. Enjoy. :smiley:

1 Like

#3

wow good one!
Never thought of not entering text in the command+r window :smile:

Thanks a lot

0 Likes

#4

I was looking for something similar, but slightly different. Not sure if I should raise a new topic for this, or hijack this one, but I would like to move my cursor to the top/bottom of the current scope. Textmate has this feature and it’s really useful and just about the only thing that i miss in sublime.

Basically if i have my cursor at the start or end of a scope (function or if block or something), using atl-up/down would take me to the top/bottom of the scope and continue to the next scope at the same level.

Is that possible in sublime?

0 Likes

#5

Sorry to dig up an old post, but is there any way to record this as a macro (since macros don’t capture the ctrl+r, it looks like) or use this quickly in vintage mode? In Vim, one can use ]] and to move to previous/next.

0 Likes

#6

[quote=“liebrand”]I was looking for something similar, but slightly different. Not sure if I should raise a new topic for this, or hijack this one, but I would like to move my cursor to the top/bottom of the current scope. Textmate has this feature and it’s really useful and just about the only thing that i miss in sublime.

Basically if i have my cursor at the start or end of a scope (function or if block or something), using atl-up/down would take me to the top/bottom of the scope and continue to the next scope at the same level.

Is that possible in sublime?[/quote]

Exactly the only thing that I also miss in Sublime.
Two years later and it’s still missing.

Is there any plugin that might do this?

0 Likes