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

Move By Paragraph

by xsleonard ALL

Navigate and select text by paragraph

Details

Installs

  • Total 2K
  • Win 621
  • Mac 561
  • Linux 373
Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20
Windows 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0

Readme

Source
raw.​githubusercontent.​com

sublime-MoveByParagraph

A Sublime Text 2 plugin extension to the move command

A new command is added, "move_by_paragraph". These "args" are accepted:

  • "forward" (bool): True if this moves down the page
  • "extend" (bool): True if this should create a selection
  • ignore_blank_lines (bool): Set to true to ignore lines with nothing but whitespace (excluding newline) as text for paragraph boundaries. Defaults to true.
  • stop_at_paragraph_begin (bool): Set to true to stop the cursor at the beginning of paragraphs. Defaults to true
  • stop_at_paragraph_end (bool): Set to true to stop the cursor at the end of paragraphs. Defaults to false. Both stop_at_paragraph_begin and stop_at_paragraph_end can be set at the same time.

Moving by Paragraph

Example (add this to your keymap):

{"keys": ["ctrl+up"], "command": "move_by_paragraph", "args": {"forward": false}},
{"keys": ["ctrl+down"], "command": "move_by_paragraph", "args": {"forward": true}},

Example with selection (add this to your keymap):

{"keys": ["ctrl+shift+up"], "command": "move_by_paragraph", "args": {"forward": false, "extend": true}},
 {"keys": ["ctrl+shift+down"], "command": "move_by_paragraph", "args": {"forward": true, "extend": true}},

Note that "ctrl+shift+up/down" will overwrite the default action of moving the current selection up or down, which is why this is not set by default. Personally, I remapped that behaviour to "ctrl+t" and "ctrl+g".

Suggested Plugins