Sublime Forum

Why Sublime doesn't support BLOCKS operations

#13

Sorry …and now - do you have acces to mp4

0 Likes

#14

Hello Leszpol, Sorry I don’t have access now either.
Did the documentation links help? Have you been able to select a block of text in Sublime? Once you can do this then I suggest you copy it and paste it into a new file. I will try some screen shots to assist.

0 Likes

#15

Here is a block of selected text. On windows I can select Ctrl-C to copy this text.

Block_Selected

Here I have moved the cursor to line 749 and hit Ctrl-V to paste. The selected block is pasted at the cursor position.

Repeating this I re-select the same block and hit Ctrl-C top copy. I then select 32 lines as a block of 32x1 cursor (this is shown as the highlighted line numbers - cursor gets hidden during screen captures).

Destination_Selected

When I hit Crtl-V to paste, the block of text is inserted at the set of cursors.

Block_Pasted_2

The red markers are linting syntax failures - you can ignore these.

0 Likes

#16

No,I think it is no the same like in Kedit.

Can you try https://drive.google.com/open?id=1CJ5eYcGpMaxA1ZbwKWaEj-24oNhkZHa3

0 Likes

#17

Hello Leszpol,
Yes you can do that in Sublime. I downloaded the videos in the end. The trick in the pasting is to select a column of text of the same number of lines as the selected region before pasting. Then you can paste a block of code into the text.

0 Likes

#18

I put new films in the same place. Problem is that I can’t paste any text on the right empty field or where I like like I can in the Kedit - Why ? because ST recognize end of line :frowning: but Kedit doesn’t care about it. Where I put my cursor I can write, move text or what ever and it not demolish my code ! It is my problem in ST.

https://drive.google.com/open?id=1CJ5eYcGpMaxA1ZbwKWaEj-24oNhkZHa3

0 Likes

#19

Ah I understand now. What you are saying is that you cannot insert a block of code at the end of existing text after the end of the proceeding line. I have added a function to my code to create appended comments at the end of a line and I needed to make a plug in python package to do this. If you want this exact functionality then you will probably need to craft or add in a package. I defer to Clams answer. I’ve never needed to paste code at the end, just within other text blocks.

0 Likes

#20

You see. No problem. Thank you for help and converstion. People using ST propably to html, www coding or programing and it is great editor nowadays in Wondows and Mac and Linux !!!. ST has many useful option like dynamic focus and many more. But as you saw…using to block data operation like columns there is no better than KEDIT. Xedit was symiliar a long ago and it is said that ST couldn’t have taken the best from the past together mix it could make a the best editor.

0 Likes

#21

You can use the Alignment package to add space characters in every line with a caret so that they line up. Assuming what you intend to paste has no leading spaces, this will result in effectively allowing you to paste lines as a “block”.

I didn’t watch the videos, so this suggestion is solely based on your conversation here.

0 Likes

#22

Thanks.

The video is awailable here

https://drive.google.com/drive/folders/1CJ5eYcGpMaxA1ZbwKWaEj-24oNhkZHa3

I am trying most of triks but it is hard job and still no the same like in Kedit.

Thank you.

0 Likes

#23

Have you tried the plugin I linked ? because it does exactly what you are showing in your video .

0 Likes

#24

I have installed it but can use it - how to copy block and paste on the right ? There are end of lines and I can go there and paste anythink ?

0 Likes

#25

Just press space, to get your cursor to the correct position.

Or in fact just install the Virtual Space Plugin which include my plugin.
Edit: Apparently this plugin is not available anymore :frowning:

0 Likes

#26

I tend to agree with @leszpol, block selections and operations should belong to the native multi-cursor editing features of ST. One of ST strong points is, after all, multi-cursor support, and his proposal would enhance the current state of how ST can handle complex selections and operations.

At least, IMO, these type of block operations is what one would expect from operations on these type of selections, except that they are not currently supported. I don’t see this as belonging to the list of the aforementioned missing features that every user would like to see implemented, it might actually be more a case of an already available feature needing to be perfectioned.

Of course, this feature would also change the core behavior of ST in many contexts, which might not be to everyone’s liking, but I’d bet it would be seen as an improvement by most.

It would be nice to have a central place for a features wish-list, were users could propose the features they’d like to see implemented, and other could vote in favor or against, so that we could have a clear picture of what might be coming (or not) in the future. ST dev team could mark features that were accepted and are pending, as well as others which are rejected, and such a central place for features request could also serve the devs as a reference to see how popular any such feature is among the userbase.

0 Likes

#27

Yes. It is it.

Regards.

0 Likes

#28

It doesn’t work- sorry :(. By press space, to get your cursor to the correct position nd crt+v it gives block at the beginning of the lines :frowning:

0 Likes

#29

Don’t press ctrl+v, press ctrl+alt+v

And since the virtual space plugin has been removed, I was taking a look and it should be possible to handle paste on click which works even where there is no text yet, i’ll experiment this weekend

0 Likes

#30

Thank you. It is better now.

…and “… it should be possible to handle paste on click which works even where there is no text yet…
it is what I am looking for aprat form filling and mooving rectangle block like this

Thank you.

0 Likes

#31

I updated the plugin to be able to paste a block anywhere either with a right click -> paste on column or using a mouse-map to call the command…

Note that I removed the default keybinding (I should never have hard-coded keybinding in the first place, it create conflict with user keybinding) so you’ll have to manually add the keybind and mouse-map .
Example are available in the readme.

1 Like

#32

Thank you. Works fine.

But how can I off this red stripes …and what are they mean ?

0 Likes