CotEditor icon indicating copy to clipboard operation
CotEditor copied to clipboard

Tabs Don't Work When Opening a Folder Instead of a Single File

Open bdkjones opened this issue 1 year ago • 15 comments

Environment

  • CotEditor: 5.0.0 (674)
  • System: macOS Version 15.0 (Build 24A335)
  • Language: English

Short Description

NSWindow tabs cannot be used if I open a folder (such as a website project) in CotEditor. The View > Tab Bar command is greyed out. CMD+T doesn't work. There is no option to select a file in the sidebar and "Open in New Tab". This severely limits CotEditor's usefulness for coding.

Tabs ARE available if I do File > New and simply have a blank document open. I can then create as many tabs as I'd like.

Steps to Reproduce the Issue

  1. Open a folder of files in CotEditor.
  2. Try to open multiple files in separate tabs.

Expected Result

  1. Tabs should be available when I open a folder in CotEditor.
  2. Double-clicking or option-clicking a file in the sidebar should open that file in a new tab (or switch to the existing tab that contains that file, if any.)

bdkjones avatar Sep 16 '24 23:09 bdkjones

I'd really like to use CotEditor as a replacement for Panic's Nova, but I definitely need the ability to open multiple files from a folder in tabs within a single window so I can quickly jump between them.

Even better: I'd like to open different files in split-view. Splitting the same document isn't as useful and putting two different documents side-by-side so I can reference one while coding in the other.

bdkjones avatar Sep 16 '24 23:09 bdkjones

Yes, It's currently in spec. I'd like to solve this in the future, but I skipped to implement it in 5.0.0.

1024jp avatar Sep 16 '24 23:09 1024jp

Got it. Any idea when 5.0.0 might be available?

bdkjones avatar Sep 16 '24 23:09 bdkjones

@bdkjones

Any idea when 5.0.0 might be available?

Today! https://itunes.apple.com/app/coteditor/id1024640650?ls=1

1024jp avatar Sep 17 '24 00:09 1024jp

First, congratulations!

Second, I misunderstood. I thought you meant "this feature is coming in 5.0" but you meant "I dropped this feature so I could get 5.0 shipped." In that case, any idea when this feature might land?

bdkjones avatar Sep 17 '24 22:09 bdkjones

In that case, any idea when this feature might land?

I have no idea yet. I will do that within the next year. However, for that, I need to make my own tab views and tab system. It might be hard. The current window tab system provided by Apple is very limited and doesn't work in this case. There isn't an easy way.

1024jp avatar Sep 17 '24 23:09 1024jp

Please do not make a custom tab system. This is one of the reasons I ran away from other editors. It should be possible to implement using the Apple system; NSWindow exposes enough API to open tabs (menu item or user preference) or new windows (user preference) using addTabbedWindow(_:ordered:). What did find impossible to implement?

LeoNatan avatar Sep 26 '24 16:09 LeoNatan

Closed the wrong ticket. Reopen.

1024jp avatar Nov 26 '24 07:11 1024jp

Hello! There is any update on this? With macOS Tahoe the problem persist

MastroPino avatar Nov 26 '25 17:11 MastroPino

This is not an issue but by design at the moment.

1024jp avatar Nov 26 '25 22:11 1024jp

That decision should be revisited. There is not another editor that fails to support multiple tabs for various files in a single folder. Even Vim does so.

This single decision caused me to abandon CotEditor. Tabs are a non-negotiable, must-have capability for anyone working on code.

bdkjones avatar Nov 26 '25 23:11 bdkjones

Hi there! I downloaded the source code from GitHub (I’m a web developer but I don’t know Swift). With Claude’s help I managed to restore the use of tabs inside projects as well, and I noticed that tab management was intentionally excluded from opening a project (meant as a set of folders and files) and enabled only when opening individual files. My implementation is obviously (almost certainly) terrible, and for anyone who’s fluent in Swift it definitely won’t be hard to improve!

How can I help?

Image

MastroPino avatar Nov 27 '25 11:11 MastroPino

With Claude’s help

Brave new world

LeoNatan avatar Nov 27 '25 11:11 LeoNatan

With Claude’s help

Brave new world

From dev to dev: I didn’t mean to upset anyone, my bad

MastroPino avatar Nov 27 '25 11:11 MastroPino

Why upset? It's all good! Just amusing how these tools are so effective.

LeoNatan avatar Nov 27 '25 11:11 LeoNatan