+6

Move by Paragraph

lappri 13 year бұрын updated by John Flavin 11 year бұрын 2
The +move+ command could allow "by": "paragraph" as an argument. It should work like move by characters/lines etc but look for the next/previous "\n\s*\n" regex instead. I find it extremely useful when navigating through code and couldn't find any mention of it in ST1 and ST2.
+1

I was looking for this feature as well and I discovered that you can already do it with:

{ "keys": ["ctrl+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false} },


The documentation for the move command is here though it doesn't explain what the by:stops option does. My investigations found that the by:stops instruction uses the empty_line, word_begin, word_end, sub_word_begin, sub_word_end, punct_begin and punct_end boolean options to determine which points to stop at.


With the command 

{ "keys": ["ctrl+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false} },

a line with only whitespace characters, but otherwise empty, is not treated as a stop. Is there a way to modify the command to treat whitespace-only lines as stops?