typora-issues icon indicating copy to clipboard operation
typora-issues copied to clipboard

Opening files In same tab, new tab, or new window: A flexible & consistent UI proposal

Open vassudanagunta opened this issue 8 years ago • 59 comments

There are three ways files can be opened:

  1. Same Tab
  2. New Tab
  3. New Window

Everyone prefers a different thing. The way to satisfy everyone is to let them configure default behavior, and to give them a an easy way to override the default by holding down a meta key.

(This proposal is intended to apply to all platforms, but the specifics below are given only for macOS.)

File menu: customizable New and Open behavior

Safari has an "Open Pages in Tabs Instead of Windows" setting. I propose Typora have a similar setting that governs File:New and File:Open menu commands:

"Open files in same tab | new tab | new window" (dropdown selection)

Regardless of this setting, users can at any time get any of the other behaviors by holding down a meta-key while clicking on the menu command (see below).[^1]

Sidebar navigation

The sidebar is perceived as a navigation bar. People expect navigation to take place in the same view port, i.e. in the same tab. In almost all apps, including web browsers, nav bar clicks by default open items in the current tab.

Meta keys can be used to get different behavior (see below). This is how most other apps work.

Markdown link navigation

Since the main task in an editor is editing, clicks on Markdown links should support editing them, either by showing the underlying link markup and placing the cursor, or as described in #1313.

But users will also want to navigate the links, to preview how, for example, their website will work. Again, the same meta keys can be used to get the desired nav behavior.

Meta-key Overrides

The same meta key combinations should govern all of the above cases, to override the default behavior in the same way.

Consistency avoids user confusion, and facilitates muscle memory.

‼️ Typora is inconsistent. ⌘-clicks in the sidebar open a new window, while ⌘-clicks on links in the content open in same tab.

UI action open in new tab
open in same tab
⌘⇧
open in new window
⌘⌥
default behavior
(no meta key)
File:New keyboard shortcut ⌘ N ⌘⇧ N ⌘⌥ N
File:Open keyboard shortcut ⌘ O ⌘⇧ O ⌘⌥ O
File:New or File:Open menu item ⌘ click ⌘⇧ click ⌘⌥ click per "Open file in" setting (see above)
file in sidebar ⌘ click ⌘⇧ click ⌘⌥ click open in same tab
Markdown link in editor ⌘ click ⌘⇧ click ⌘⌥ click edit link text
(⌘K to edit URL)

[^1]: It would be nice to be consistent with Safari, the app where most people on macOS develop their muscle memory for tab-oriented keyboard shortcuts. Safari has a nice feature: The "Open Pages in Tabs Instead of Windows" also governs the the meta key mappings, such that the selected default behavior gets the easier ⌘-click and the other behavior gets the ⌘⌥-click. Typora could do that too. Essentially when a user chooses a different default, we swap the columns in the above table.

vassudanagunta avatar Oct 27 '17 21:10 vassudanagunta

That would be great.

Is there any way to open a file in a new tab in an existing window now? Every time I try, it will also open in a new window, not a new tab, no matter what I do. The only way to use multiple tabs in Typora at this moment seems to be when creating new files? I hope I'm wrong.

gandalfsaxe avatar Dec 01 '17 19:12 gandalfsaxe

I've found one method solution so far: Window->Merge all windows. Not ideal, because you may not want to merge all windows (that is not minimized), but at least there is a way.

gandalfsaxe avatar Dec 01 '17 19:12 gandalfsaxe

@GandalfSaxe, if you're talking about macOS, it sounds like you want to turn on the “Prefer tabs when opening documents” option in sysprefs. With this on (set to Always), existing files open in new tabs for me in Typora.

https://support.apple.com/kb/PH25244?locale=en_US

AlexPasternak avatar Dec 01 '17 19:12 AlexPasternak

Ah yes that's nice. Still doesn't negate the need for manual control in Typora (I like @vassudanagunta 's proposal), but I do prefer tabs most of the time, and while there seems to be no way to combining window, you can always pull out a tab to it's own window.

gandalfsaxe avatar Dec 01 '17 23:12 gandalfsaxe

please make open files in current window on simple click.... o make many settings for opening links and clicking and shortcuts

EvgenyVetrov avatar Jul 20 '18 13:07 EvgenyVetrov

@EvgenyVetrov I believe my design above satisfies your desires. Yes?

vassudanagunta avatar Jul 20 '18 15:07 vassudanagunta

@abnerlee I edited the proposal to make it easier to understand, and I added some more info.

Where do you stand on it? It is one of the most upvoted Issues :)

vassudanagunta avatar Mar 12 '19 08:03 vassudanagunta

@vassudanagunta again, thanks for your proposal.

Currently, or in near feature, I would prefer provide the option Open Pages in Tabs Instead of Windows to meet the needs about open in Tab.

I think navigate (#1154) would be needed if we want to support open in same tab.

abnerlee avatar Mar 12 '19 09:03 abnerlee

@abnerlee I can see that #2253 was closed as duplicate of this one. But this is feature request, whereas in #2253 was a bug report - I was stating that Ctrl+N File > New and Ctrl+Shift+N File > New Window essentially both do the same - open new window with new file, where bottom left corner file list + is not exposed via menu or keyboard - opens new file in the current window. I would appreciate if you could confirm if this is a bug and if yes - whether this will be fixed. Thank you.

nanoant avatar Mar 12 '19 10:03 nanoant

@abnerlee I think it's perfectly fine not to support navigation (open in same tab), as that is what most editors do.

But what makes Typora stand out amongst the crowd is the WYSIWYG feel of Typora. If links worked as they would in published form, it makes Typora even more beautiful. You know that joy people feel when things work beautifully and naturally, like when the iPhone first came out? That feeling. Typora has some of that now, and it could have even more :)

I use Typora to edit a collection of pages that get published via static site generator. It would be so nice to be able to navigate my work-in-progress without having to generate HTML. It's like the difference between writing in a complied language like C and writing in an interpreted language like Javascript or Python.

vassudanagunta avatar Mar 12 '19 19:03 vassudanagunta

What is the status on this issue? The initial proposal is over a year old and similar issues are regularly closed and linked here, yet nothing seems to come out of it.

mbartelsm avatar Jul 05 '19 16:07 mbartelsm

I will bump up this issue, devs what is the status? @abnerlee

trib0r3 avatar Dec 17 '19 09:12 trib0r3

New user here. Is there really no way to create a "New File" using a keyboard shortcut in Typora?

pathikb avatar May 08 '20 14:05 pathikb

My two issues are closed as duplicated and merged in this issue:

https://github.com/typora/typora-issues/issues/3525 https://github.com/typora/typora-issues/issues/3526

But when I read this issue's description proposal, I feel they are not really talking about the same thing. So I would like to clarify. The two issues are not about Same Tab, New Tab or New Window at all. The two issues are about active window should be switched to an existing window instance in two different cases. But currently, one issue opens a duplicated window instance. Another issue doesn't change the active window.

Thanks.

Edited:

By switching active window, I mean Alt +Tab behavior in Linux/Windows, Cmd + Tab behavior in Mac. To be more specific, what wmctrl does in Linux.

sgon00 avatar May 23 '20 13:05 sgon00

We all know that it costs much more seconds to load to open a new window on Windows. It is weird that why not just switch the file based on hyperlink, and just offer a back button, instead of opening 100 windows at the same time.

WAcry avatar Jun 12 '20 04:06 WAcry

Has there been a progress on this for Linux?

The initial commit says that on mac:

Currently in Typora ⌘ has inconsistent meaning. ⌘-clicks in the sidebar open a new window, while ⌘-clicks on links in the content open in same tab.

But afaik there is no such shortcut for Linux, Ctrl+Click opens a link in new window. Is there a different shortcut on Linux or would the support for the same added later?

xypnox avatar Aug 21 '20 20:08 xypnox

I'd love a way to open links in the same Tab/Window. I'm working on a project that generates a set of .md files that link to each other. I'd like to be able to navigate between them like a website.

I have not seen tabs in Typora, but the Sidebar + File Tree works very well for me.

jlctools avatar Sep 18 '20 02:09 jlctools

I'm working on a project that generates a set of .md files that link to each other. I'd like to be able to navigate between them like a website.

Exactly!!! Navigating linked content one is authoring should be the same as being able to scroll up or down in a page one is authoring.

vassudanagunta avatar Sep 18 '20 03:09 vassudanagunta

I can't use Ctrl + Shirt in Windows 10 to open in same tab.

sweetwong avatar Nov 17 '20 08:11 sweetwong

FWIW, on Mac Cmd + Left-click on a file in the file tree and on a link in a document opens the file in a new tab if you have “Prefer tabs when opening documents” set in System Preferences. That at least meets my needs but it'd be even better to meet more people's needs!

Version 0.9.9.36.2 (4901)

ghost avatar Jan 26 '21 20:01 ghost

@TomaisLeannan wow, thanks! I had no idea this exists.

image

Strajk avatar Feb 13 '21 19:02 Strajk

So... 3 years have passed but it appers very very hard to fix link click behaviour! Now i can clearly proclaim that typora is dead(( Bye, gone to alternative.

baterflyrity avatar Feb 15 '21 14:02 baterflyrity

@baterflyrity Could you suggest some alternatives for Typora if you have found any? Others in the thread can also chip in.

xypnox avatar Feb 15 '21 14:02 xypnox

@xypnox , sure. What about ReText? It is written in Python 3, can be installed on any platform simply with pip, is open source, was released 7 days ago and opens local links in tabs.

baterflyrity avatar Feb 15 '21 14:02 baterflyrity

@baterflyrity @xypnox

WYSIWYG is why people use Typora, even though it is not entirely WYSIWYG. ReText it not WYSIWYG - it's got side-by-side editor and preview panes. There are a lot of editors that do that. Few do WYSIWYG.

There is one WYSIWYG Markdown editor that I need to give another try now that time has passed (3 years!). MarkText. It's WYSIWYG, hopefully more so than Typora. And it's open source, unlike Typora. It has over 100 contributors, 1.5k commits and 18k stars.

If anyone has experience with MarkText, please share!

/cc @pgolebiowski @AlexPasternak

vassudanagunta avatar Feb 15 '21 20:02 vassudanagunta

@vassudanagunta thanks i try this one.

baterflyrity avatar Feb 16 '21 07:02 baterflyrity

I haven't used Typora in years now

pgolebiowski avatar Feb 18 '21 08:02 pgolebiowski

@pgolebiowski what do you use?

vassudanagunta avatar Feb 18 '21 13:02 vassudanagunta

just vscode but without the preview, turns out I don't need rendering, let alone wysiwyg, syntax coloring is enough xd

pgolebiowski avatar Feb 18 '21 18:02 pgolebiowski

I switched from typora to VSCode+Dendron and it has changed a lot in the way I take notes. Also cross linking via [[para]] and refactorable hierarchies have been a blessing.

I still use typora sometimes as a secondary editor for long form content but that is 2% of the times I use it for markdown now.

I should also add that dendron in it's current state is more suited for developers and may feel overwhelming or confusing if you do not use IDEs or advanced text editors.

xypnox avatar Apr 14 '21 15:04 xypnox