ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Goto​End​Of​Line​Or​Scope

by SublimeText ST3

Sublime Text plugin to bind a key (for example the end key) to move/extend the cursor/selection(s) to the end of the line, or to before the specified scope (i.e. a comment) at the end of the line

Details

Installs

  • Total 274
  • Win 161
  • OS X 54
  • Linux 59
May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8
Windows 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0
OS X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 1 0 0 0 0 0 2 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0
Linux 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0

Readme

Source
raw.​githubusercontent.​com

GoToEndOfLineOrScope

Sublime Text plugin to move the cursor(s) to the end of the line, or to before the specified scope at the end of the line

Features

This plugin allows you to create key bindings that will:

  • Go to the end of the line, or
  • Go to the start of the specified scope that is at the end of the line

To explain:

You have a line like: foo bar # I am a comment You want to bind the end key, so that when you press it, the cursor will either go to the end of the line or to just before the start of the comment marker, depending where the cursor is and your preferences. i.e. foo bar |# I am a comment, foo bar| # I am a comment or foo bar # I am a comment| where | represents the cursor.

It works with multiple cursors, and each key binding can use a different scope, and a different order. For example, you might want the cursor to go to the start of the comment after any whitespace, then to the end of the line. Or you might want the cursor to go to the end of the line, then to the start of the comment before any whitespace. At the same time, you might want a different key binding to jump the cursor to just before the semi-colon at the end of the line.

Binding

The command is called move_to_end_of_line_or_before_specified_scope, and it accepts the following arguments: - scope - the scope to move the cursor before, if it is at the end of the line - extend - whether or not to extend the selection - eol_first - whether or not the cursor should go to the end of the line first or the beginning of the specified scope - before_whitespace - whether or not the cursor should go to the beginning of any whitespace that occurs immediately before the specified scope