coteditor / CotEditor

Lightweight Plain-Text Editor for macOS
https://coteditor.com
Other
6.46k stars 431 forks source link

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

Open bdkjones opened 2 months ago

bdkjones commented 2 months ago

Environment

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 commented 2 months ago

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.

1024jp commented 2 months ago

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.

bdkjones commented 2 months ago

Got it. Any idea when 5.0.0 might be available?

1024jp commented 2 months ago

@bdkjones

Any idea when 5.0.0 might be available?

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

bdkjones commented 2 months ago

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?

1024jp commented 1 month ago

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.

LeoNatan commented 1 month ago

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?