chenglou
chenglou

Reputation: 3640

Select upward when cursor is at the bottom of the selected block

Sometimes I select a block of text downward and notice that I want to select one extra line at the beginning (and vice-versa). Is there a way to do it without losing my current selection in Sublime Text?

Thanks.

Upvotes: 0

Views: 56

Answers (2)

jskroch
jskroch

Reputation: 343

If you only need to add entire lines to your selection, then you can use the commands:

Windows and Linux:

  • Ctrl-L - Selection > Expand Selection to Line
  • Alt-L - Selection > Expand Selection to Line Upward

Mac:

  • Command-L - Selection > Expand Selection to Line
  • Command-Option-L - Selection > Expand Selection to Line Upward

The first command adds lines below your current selection. The second command adds lines above your current selection.

You can alternate between the commands and grow your selection at both the top and bottom without losing your current selection.

Upvotes: 0

chenglou
chenglou

Reputation: 3640

Found this plugin:

https://github.com/philippotto/Sublime-MultiEditUtils/#normalize-and-toggle-region-ends

Which also includes some other nice features.

Upvotes: 1

Related Questions