Restore last document position/scroll position/cursor position

Use case or problem

We often need to edit docmument in the last closed position, but currently the position always on the top when re-open it.

Proposed solution

without scroll down again and remember the last closed position in document.

Current workaround (optional)

Potplayer.
image

3 Likes

How to remember the text insertion position of the editor when switching different files?

Just like the mechanism of browser tab.Visual Studio Code also enables this feature by default.

CTRL + O can’t remember the insertion position or reading position of the editor , and cannot switch to an open page.

Split screen function is limited,there is usually no way to open multiple pages, because it will take up the screen space.

I know that some tabs can be stored in the sidebar, but switching seems to be a problem. It seems that you can only open the sidebar, find the corresponding page, and then drag it. This method is inefficient.

Ctrl+Alt+Left/Right is a good choice for two documents, remembering where to edit, which can cover a lot of situations, but for heavy horizontal editing, which still requires several Windows open, this mechanism is not so good, because it can’t search through the history.

Although in some cases remember where the text is inserted doesn’t help, at least it doesn’t make things worse, so it may be a Pareto improvement.

Visual studio code has such a function, which should be the result of weighing rather than doing it at will.

Two plug-ins(Workbench and sliding-panes) are known to help with this problem, but the problem is far from solved.

The urgent need for this function has also been mentioned on the forum.

If you want this feature, can leave a message below to express your support ! :fist:

5 Likes

I need the feature!

2 Likes

I want it too, hope this feature to be implemented soon.

1 Like

I need the feature!

1 Like

Partial workaround:

(works but is not sufficient to fulfill scope of this request)
Position of caret is preserved when we switch between files open side-by-side, by hotkeys.

I utilize Single key hotkeys with Cycle through panes (plugin) in Sliding panes / Andy mode plugin which makes it usable to work with multiple panes open side-by-side.

The following allows to preserve caret position when switching by mouse instead of hotkeys and/or between distant panes (works from https://forum.obsidian.md/t/obsidian-release-v0-10-13/12492):

Pressing Tab after typing in the file name bar should also focus on the editor.

3 Likes

I would like this feature too. This is such a killjoy when dealing with multiple open notes.

1 Like

At present, I have found a temporary solution to this problem.

You need to use the Switch++ and Sliding Panes plugins, which work together.

Of course, there are still a problems.

Due to the function of sliding panel, the left and right split screen function can’t be used.

These two functions are very important to me, it’s really hard to choose.

Use case or problem

Most great editors remember the cursor location when closing file, and restore it when re-opening it. This helps mental continuity in note taking.

Proposed solution

Save and restore cursor location. Possibly, make this toggle-able in settings for users who don’t want it.

Related feature requests (optional)

Option to go to end of file upon opening is related, but cursor-restore is even better.

Related thread.

BTW, Obsidian is insanely awesome for many reasons. Thank you for making it!

4 Likes

+1, without this function it is very difficult to work with more than one page on the screen

1 Like

+1 also. Things like this are frustrating from a UX standpoint.

Persistent Undo
Restore cursor position

What is a bit strange is that sometimes it does remember the cursor position. Though occasionally, if I have my cursor on one line, it can jump up one line. But in general, if I jumped back and forth between 2 or 3 notes, it would remember the position.

But if I click on a sidebar link, then the cursor position seems to be lost on the note I was previously on. And then if I jump back 2 or 3 notes, those notes still remember their position!

(btw, I merged these threads. If you are already aware of a related thread, please reply to that existing one instead of making a duplicate.)

1 Like

Thanks for merging. I searched but hadn’t found this thread until today.

1 Like

maybe there is some kind of plugin? somebody knows?

Another look at it:

Obsidian shouldn’t close the note when you navigate to another…
Such behaviour should be associated with clicking the X

This closing results in the cursor position being reset, it’s counter-intuitive.

for this you need to do something like tabs like in notepad ++
in any case, I hope that saving the position will be the same as in notepad ++

I think the topic of tabs is irrelevant to this issue.

Many people find tabs redundant as long as you have another way to navigate to recent files.

Tabs suggest there is the following use case:

  • As a user I want to always know which files are opened.

However, most common use case for tabs is this:

  • As a user I want to quickly navigate to a file/window that I recently viewed/edited.

We already have this functionality in cmd+o so I personally see no point.

However, keeping the file open == holding info about the cursor, hence I mentioned it.

apparently I did not quite understand correctly, sorry

1 Like

+1 for remembering cursor!

Funny enough I had the same frustration yesterday and put together a simple “ambient” plugin that keeps track of my cursor in each note and places it back where I left off. It works even after closing the note or quitting Obsidian!

I built this just for myself but if you want to try it out, here’s the repo:

Edit: I should add, this is so new that I haven’t stress-tested this yet. So this is really not production-ready!

4 Likes