Sublime Forum

Awesome idea or not?

#1

It just struck me, a new feature for ST, that I find awesome and I would like to know what other ST users think about it.

So here it comes:

The new feature allows to select a group of files and displays the content of the files in one single tab, just the way it is with one single file. All editing features would work with this group of files as with one single file. E.g. find & replace, multiple selection, go to symbol, saving, you name it.

What do you think?

Cheers
Alex

0 Likes

#2

How do you envision the joining of those files?

0 Likes

#3

I would simply concatenate the contents in the order of their apearance in the side bar
The line numbers would be decimal: 1.1 1.2 1.3 for the first three lines of first file, 2.1 2.2 2.3 for second file and so on.
In addition, the title bar would change the title depending on the position of the cursor, showing in which file the cursor is.

0 Likes

#4

Of course, the concatenated file would be somehow virtual, similar to a new unsaved file.

0 Likes

#5

I guess the most important question is what exact pain point does this feature solve ? Why would you need to “concatenate” multiple files ? I can hardly concentrate on more than 2 files being open side by side in ST without needing to add 10s more to the lisy.

0 Likes

#6

I tend to put all core functionality of a software project in one big file because it’s easier to work with one big file than with separate files.

On the other hand, having separate files have advantages too. No need to explain this point, since most of the people already prefere this way of working.

having the proposed feature we could unify both worlds. We could have all the advantages and no disadvantage.

“I can hardly concentrate on more than 2 files being open side by side”
Exaclty! The new feature would solve this issue.

0 Likes

#7

I get your idea, but I kinda feel like we already have solutions for some of these without needing the added cognitive complexity of showing multiple files as if they are one.

  • Go to symbol: Go to symbol in project
  • Find and replace: Find in files
  • Saving: Save all

Re multiple selections across files: Iirc there was a plugin which kinda does something like this to allow editing multiple files directly from search results

0 Likes

#8

Those things are known to me but they don’t give you the use and feel of one single file. The proposed feature is like an unification of everything. Let me put it the other way: If we have had this feature from the start, all other named features wouldn’t be needed.

There are noumerous actions for which there is no available solution for multiple files.
CTRL+D for selected word which stepwise selects next equal words.
Quickly pressing CTRL+F on selected word to see if the selected word is already used in the document (status bar shows the number of hits)
This new feature would save a lot of man power neded to develop surogates of this feature.

1 Like

#9

Is there a keyboard shortcut for this? Because I tend to save very often using CTRL+S when coding. Old habit before having ST which makes saving not so urgent but still…

0 Likes

#10

You can bind your own. https://github.com/jfcherng-sublime/ST-my-settings/blob/f451a723038fff36069f47f956d20e6f3badd9ec/Packages/User/Default%20(Windows).sublime-keymap#L138

0 Likes