Ctrl/Cmd-Click or Alt-Click within Reader pane to switch to Edit mode and put cursor at click location

Not sure how valuable this might be for others, but I often find myself clicking within a note in Preview mode trying to put the cursor there to make an edit (obviously forgetting I’m in preview mode). Would be great if some click command (e.g. cmd-Click) would switch the pane into Edit mode and place the cursor at the location of the click. (I love the cmd/ctrl-E for switching modes, but this click method would take it a step further.)

27 Likes

Me too. There is always an urge to mouse double click any white space of Preview to go into Editing mode.

Double left clicking is intuitive.

6 Likes

The only problem with double-click for switching into edit-mode (which, intuitively, makes sense), is that if you wanted to select a word in Preview mode to copy it (or look up its definition), then that would be problematic. That’s why I suggested a variant form of click. However, your suggestion of double-clicking in the “white space” area to switch into editing … I like that!

2 Likes

Let me recollect suggested mouse clicks options for in-place Preview2Edit switch (Equivalent keyboard is Ctrl E):

4 Likes

User action (combination of modifier keys with click) should be customizable to avoid conflicts with / utilize the muscle-memory that the user already has from other currently used applications.

Related feature requests:

2 Likes

Came to forum to write exactly about this feature request.

I find myself changing often between modes, because I’d like to have rendered mode enabled always, except for when I need to edit.

So, here’s what I think of requirements for this:

  • it should be insta-quick to begin editing, even quicker than keyboard shortcut (which takes me to focus on proper pane, use shortcut, set cursor position)
  • it should be customisable (what to press or what to do to switch)
  • it might auto-return to preview mode as soon as pane loses focus, except if it was in edit mode before I clicked.

I’m not sure what could be an implementation, but some ideas:

  • 3rd party plugin vs core (I believe it should be in core)
  • specific setting vs allowing mouse actions in hotkeys (I believe specific setting would be simpler and cleaner)
  • default setting might be cmd+shift+click or cmd+doubleclick
  • optional ‘auto-return to preview’
  • optional ‘open links in (edit / preview / same as current) mode’ setting.

I know that Obsidian wants to become virtually WYSIWYG editor, when there’s thin line between edit & preview. This might be a simple step towards it, easing it for current users and allowing customisation.

4 Likes

This feature would be greatly appreciated.

I’d love this! It would solve my more basic issue: Why doesn’t the Edit Mode start with the cursor at the location of highlighted text in Preview Mode? Drives me crazy when I see something in Preview that I need to edit and then being thrown to a completely different location when I switch to Edit. And then having to find where I was over again.

4 Likes

One solution that might satisfy the WYSIWYG desires of users is to add some keyboard commands that trigger more intuitive switching from Preview back to Editor mode.

Examples:

  • Shift-click in the body of Preview to switch to Editor and insert the cursor where you clicked
  • When text is highlighted and you begin typing, automatically switch to Editor and insert the text. A very helpful use case for this would be reviewing saved articles and wrapping key concepts in [[]].

This to me would bridge the gap between reading and editing. I have selected fonts for Editor/Preview modes that are specialized for their function (iA Writer Duospace for Editor and Bookerly for Preview) and it would be great to be able to more intuitively switch between the modes. I could be reading an article I saved, seamlessly markup that article, then switch back to reading.

11 Likes

This is related to this feature request Ctrl/Cmd-Click within Preview pane to switch to Edit mode at click location

Not sure how to merge them.

2 Likes

I thought, the switching hotkey should be more simpler, like F2 isn’t it?

Used to be F4 in the times of Norton Commander / Volkov Commander.

F2 because, it is a short cut to rename file names on Windows.

This is the biggest issue I have in using Obsidian exclusively and not Roam. Roam doesn’t distinguish between edit and preview. This makes it much more fluid. The “block” you are editing is in edit mode. When you move off the block, like everything else, it works like preview. This is the single reason it makes creating and using Roam so much more seamless thant Obsidian. Is there anything in the pipeline that changes the edit/preview model?

2 Likes

Yes, the WYSIWYM (Typora-like) editor is in the roadmap. I don’t know when it’ll arrive, though.

1 Like

In my opinion a double left click on white space is the best option.

I found Obsidian through looking for markdown editors, as I’ve gotten to know markdown through Trello and fell in love with it’s simplicity. And there they have a click anywhere to change into edit, which is annoying. But double clicking into white space to change to edit mode, I did that intuitively so many times. Just an FYI :smiley:

Personally, I want this, or, especially, the inline editing of just the current line with the rest being in preview mode (WSYIWYM, in the terminology above), more than a full “WYSIWYG mode”.

Also, I think #14257 was actually correct, that the preview mode cursor (which DOES exist in browsers; it’s used for keyboard navigation, and especially for screenreaders) needs to be synced with the editor mode. That should help a lot.

1 Like

With live preview this is less relevant now, but still missing.

You can assign a single key hotkey now (like F2) directly from settings.

I tried a basic double click implementation and it had other issues.

The workaround I found most convenient is assigning it to double Ctrl with the Doubleshift plugin.
(It’s not a global command, so I had to add it to data.json manually)

    {
      "command": "markdown:toggle-preview",
      "key": "Control",
      "lastKeyUpTime": 0
    }

It arrived but it’s no way close to typora. This issue is totally ruining my experience with obsidian and mods just close feature request to make this happen, see:

https://forum.obsidian.md/t/synchronizing-cursor-location-between-edit-and-preview-modes/14257/4

Just fix this or implement a better live-preview which behave like Typora. It’s not possible that when I switch from edit to reading I have to re-center the note to what I was reading, and this happen every time.

1 Like

anybody knows a way to double-click when in reading mode to switch to edit mode?

Only thing I found is a initial commit: Hi! · Issue #1 · felwal/obsidian-double-click-edit · GitHub by @felwal

2 Likes