Sublime Forum

Block versus Paragraph

#1

Can someone please explain the difference between Expand Selection to Block and Expand Selection to Paragraph? I cannot find an example in which they would result in a different behavior.

0 Likes

#2

A block is only separated by blank lines. A paragraph is also separated by leading symbols, like if you have a list where each item starts with -.

0 Likes

#3

Hi @bschaaf,

Thank you for clarifying that. I noticed that Expand Selection to Block is also separated by commented lines. Please, see example below. Is this expected behavior?

* Item 1
* Item 2
<!-- Comment -->
* Item 3
* Item 4

Related to this, there is a command in the Vintage package that is called Yank Around Paragraph (YAP). When positioning the on the first line, in ST 3211, it would copy all five lines. Now, in version 4126, it only copies the first two lines, which seems consistent with the Expand Selection to Block. Is it possible to make YAP revert back to its previous behavior, so that it is consistent with what Vim does (paragraph is only separated by blank lines)? Thank you!

0 Likes

#4

noticed that Expand Selection to Block is also separated by commented lines. Please, see example below. Is this expected behavior?

Yes, this has always been the behavior.

Is it possible to make YAP revert back to its previous behavior, so that it is consistent with what Vim does (paragraph is only separated by blank lines)? Thank you!

They can change to use the expand to block command instead of expand to paragraph.

0 Likes

#5

Hi @bschaaf,

Just to make sure I am being clear. What yank around paragraph yap in Vintage did in ST 3211 was something different than Expand to Block or Expand to Paragraph, as it considered a comment as a part of the paragraph. In other words, a paragraph was only separated by blank lines. It would be great to have that behavior back in the current ST version.

0 Likes