A5308Y
A5308Y

Reputation: 447

Sublime text 2/3: How to move cursor along indentation? Mac OS

I'm trying to move the cursor along the indentation level. A "jump to the next or previous same-indentation-line"-command.

To illustrate: The "|" is supposed to be the cursor.

def way_too_big_method
  |block1
    block2
      Way too many things happening...
    end
  end
end

Command: Move down along indentation

def way_too_big_method
  block1
    block2
      Way too many things happening...
    end
  |end
end

I know you can do that in vim (maybe you need a plugin) and I know I could use cold folding for that, but it would be three commands (fold, move down, unfold). I used Textmate some years ago and I thought it was just ALT+UP/DOWN but I might be wrong.

Do you know a way to do that? I would go for a plugin if it's sublime 3 compatible (It would be quite easy to create as well, I guess), but I have the feeling that this must be implemented in sublime-core somewhere, right?

Thanks for any idea on this one!
Andy

Upvotes: 1

Views: 575

Answers (1)

MWean
MWean

Reputation: 422

I've been missing this functionality from TextMate too, so I wrote a plugin that does it. You can find it here. I wrote it specifically on ST3, but it should probably also work on ST2. Make an issue in Github if you have any issues with it.

Upvotes: 1

Related Questions