Sublime Forum

Why Sublime doesn't support BLOCKS operations

#1

Sublime Tex it is remarkable software it is true but there is the only one think
it would make the Sublime Text better is : operations onto blocks - like in the Kedit editor !!! No one has it!!!

Kedit only the one on the World has stuff like below – no more editor can do this !!! – why ?

01



Some think like this below is available in other editors and Sublime but it is to little.

Why in a Sublime Text there are no block operations!

Can the Auotors add this feature in the near future?

Regards

Leszek Flis from Poland

0 Likes

#2

ST supports column selection natively, the only thing it doesn’t do without an extension is select virtual whitespace at the end of the lines, but I guess such a thing isn’t useful anyway

0 Likes

#3

…isn’t useful anyway…” - oposite it so useful ! People couldn’t may known even about this possibilites and maybe it is the reason why it is not implemented. I can even move or fill verticaly any think because this empty lines have influence on all code. I regred that it istn’t in ST.

0 Likes

#4

You can check a plugin I wrote a long time ago: “Paste as column”, it should do the trick if I remember correctly.

0 Likes

#5

Thanks. I will. But the post is rather for attract the authors attention of ST but they are rather not available for me.

ST has so many options that to add block operation it wouldn’t be any problems for authors. I am showing rather my astonisment that they didn’t it rather because I am afraid that I can’t force the to do it if they don’t want. Only why … it would be so useful and made ST more exelent.

0 Likes

#6

Roughly speaking, there are approximately 18 billion super awesome things that Sublime could be doing out of the box without requiring a plugin (give or take a few billion either way).

One of the things that keeps Sublime small, tight and fast is that the developers carefully pick and choose what they “officially” support by building it directly into the core, and for everything else they provide an extension API so that everyone can make Sublime do what they want (within some limitations) without extra baggage for people that don’t need/want that kind of functionality.

The flip side of this is applications like IntelliJ, Visual Studio etc that provide all sorts of functionality out of the box. That creates a core product that’s more complicated to maintain for the developers because there is more code, makes the product bigger and also (to some extent) makes it slower.

If you happen to be in the camp that wants all of that functionality, you’re happy because it’s there, and if you don’t, you’re sad because it’s there.

The Sublime devs seem to be very carefully considering what they think should appear in the core versus what can be added via extension packages and plugins so that they can keep things small and fast in the core. Much like my wife, their reasoning is sometimes clouded in mystery and/or may not make as much sense as one might like, but it is what it is.

Essentially it’s a really slippery slope; everyone has their “Sublime is cool but it just needs this one extra feature and it would be the best”; there are a lot of users of Sublime, so if everyone got their one item in, we’d all be unhappy.

All of this said, we don’t really have any concrete list of what they will or will not implement, only what they have and have not implemented yet.

4 Likes

#7

I understand. I have just thought that block operation is so common and needed and will not make the ST slower, than should be inside the core but obviously it is may means only a minority point of view. But the “old” editor Kedit is also fast and good with bilions option also…the problem is that it is only available under Windows. You can say use Kedit why you are using Sublime…I use both. The problem is that Kedit is not free (for non comercial personal use) and is only under Windows and most people use ST…I am only telling that authors could have taken patternfrom the old good solutions … but OK…you explainled to my the problem. If I know how to write the extention to ST I would try to do it myself . I will be lookinf for how to write any ST extention it.

0 Likes

#8

Hi Clams. Where can I find you extention - “Paste as column”? Regards.

0 Likes

#9

It is available directly in package control (package install -> Paste as column)

Like you I was missing this feature when I started using Sublime, but after a while I notice that I did not needed it anymore, except in some very rare cases.

0 Likes

#10

I can copy and paste a column of text if this is what you are after. I use the middle mouse button to select a box of text and then you can paste it in as a block on its own by moving the cursor to where you want to insert and then pasting or within another block of text if you select the same number of lines in the destination and paste there. The status line gives you the number of selection regions you have in selected in the copy stage and it is wise to note this before pasting. Try experimenting to master.

0 Likes

#11

I am afraid it is not working to me. I am sending you 2 examples. I tried what you wrote i ST obteined huge mess in my code and how I do it in Kedit - simply, fast and intuitibe. Any more coment from you?

0 Likes

#12

Hello Leszpol,
The column selection mode is documented at:
https://www.sublimetext.com/docs/2/column_selection.html
and
http://docs.sublimetext.info/en/latest/editing/editing.html
under column selection.

Once selected, you can copy and paste using the normal control/command keys. A description of this is at:

I don’t have a global accessible file sharing so cannot make a video to demonstrate. Your videos wouldn’t play for me.

Undo will cope with the unwanted changes.

Regards.

0 Likes

#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