Closed stdedos closed 3 years ago
Hi!
thanks for using Text Pastry!
Paste as block should take every line of the clipboard and treats it as a queue. If we copy a block like this
first line
second line
third line
and paste it into this selection
<a>|</a>
<b>|</b>
<i>|</i>
we would get this:
<a>first line</a>
<b>second line</b>
<i>third line</i>
instead of this:
<a>first line
second line
third line</a>
<b>first line
second line
third line</b>
<i>first line
second line
third line</i>
may I ask you for a different example of your use-case?
Perhaps I haven't been clear enough, apologies. I am not that familiar with the finer details of the plugin.
I want to use TextPastry's feature that will help me treat the copied text "as one entity", instead of splitting it as newlines.
i.e. If I copy 2 lines and have 2 carets, I expect to paste 2 lines on both carets, instead of one each.
Thanks for taking your time to clarify this issue.
This should already be a default feature of sublime text!
Expanding on your example, if we copy this line into the clipboard:
<param name="a">b</param>
we can paste it normally and it will be inserted on every location with a caret, as this clip shows:
Would that the feature, that you were looking for?
Thank you for your quick response. Please note that my example is not this:
<param name="a">b</param>
but it's that:
<param name="a">b</param>
(i.e. one extra \n
)
Thank you for clarifying the issue!
The content shouldn't matter, as long as we paste using the default paste (ctrl+v or cmd+v), the text will be pasted into the selected location by sublime text, as shown in this clip:
Please let me know if we're on the right track on this issue!
Again, you are making a different selection 😂
<param name="a">b</param>
vs
<param name="a">b</param>
Ah, your example does does not select the new line character at the end.
This is a "feature"/bug in sublime text and it only happens, when the selection count matches the pasted content split by newline. If I would've select three instances of the </param>
endtag, instead of two, it would behave oddly aswell. Even when I've disable/uninstall Text Pastry, we would still have this behaviour (please feel free to confirm this behaviour).
It works in my example because I was selecting an additional newline, which made the number of carets mismatch with the pasted content. This would also be the workaround: it should work if we paste the content into more selections/carets. Maybee there is a bugfix in the latest version of Sublime Text, that would be worth a shot.
I've checked the sources of text pastry, and unfortunately we don't have an option to paste "as is" atm. option. I will check the conditions to add such a feature.
Thanks for using text pastry!
As per README.md:
and, I guess it's the same as:
I think it used to be working, but now I cannot get it to work.
The intention is to copy this:
to go from this:
to this:
However, none of the commands:
regex $
can get me to the desired result cleanly.
After all of the above, the closest I get is this:
I was wondering if you could help, expand documentation, and/or fix a behavior if it's problematic.