Joplin: [Feature Request] save cursor position

Created on 14 May 2018  路  17Comments  路  Source: laurent22/joplin

/ref https://discourse.joplin.cozic.net/t/save-cursor-position-within-the-note

Summary:

Every time one switches between notes, the cursor position is reset to the top of the note.
When working with a few notes simultaneously, this behavior can be rather tedious.

backlog enhancement

Most helpful comment

@laurent22 I am not sure, if this belongs in this ticket, but what about the status of the current note? Whenever I switch to a different notebook, the first note is selected. In my opinion, it should always select the last note that was used.

Maybe we should rename this issue to save status of note which would include the last edited note within a folder/notebook and the cursor position within the note.

What do you think?

All 17 comments

I would like to add that in my opinion it is not necessary to sync the courser position between devices because where I want to work on a note depends on the device so it would be something stored locally.

@nr458h you also got a point. I believe there are use cases for both (save locally, sync). The nicest would be an option to choose, but I think @laurent22 doesn't consider a sync option due to performance reasons anyway.

@laurent22 I am not sure, if this belongs in this ticket, but what about the status of the current note? Whenever I switch to a different notebook, the first note is selected. In my opinion, it should always select the last note that was used.

Maybe we should rename this issue to save status of note which would include the last edited note within a folder/notebook and the cursor position within the note.

What do you think?

I think it makes sense to store the cursor position in the metadata to keep track of the last place modifications were made. The overhead would be neglectible, since the note is going to be synched anyway.
I think it does not make sense if just browsing/scrolling through a note would lead to its physical modification.

Knowing where you were editing and picking it up from there on another device would be sweet.

On Joplin desktop (Windows), if you press ctrl & click, you can edit multiple lines or items at once. Thank you @laurent22 for that btw.
The question is, are all the cursor positions saved? That'd be waste.

Also, if someone has a lot of notes, won't all that metadata be heavy? I mean I love the sync speed of Joplin, wouldn't want to trade it for this.

In my opinion, remembering the cursor position is not always a good idea.

In my case, I have different sections in the same note so I write in different places randomly according to my needs. If it starts from the top/bottom, it is easier for us to find the section we are looking by scrolling (if we are in the middle, we might not know if we have to go up or down).

For that reason, I would suggest to add it as a preference in general options (remember position/start top, start bottom).

@hfccgit, I guess you mean for the mobile app? Because on desktop you can tell where you are based on the scrollbar. On mobile, maybe the problem is that the scrollbar is not visible and there should be some indicator (like "Pos: 58%") to show this.

@hfccgit

In my opinion, remembering the cursor position is not always a good idea.

In that case you are rather the odd person out. Every text editor and frontend usually remembers the last cursor position.

I would suggest to add it as a preference in general options (remember position/start top, start bottom)

This is certainly a great idea. However, if there's only one choice, I'd rather be able to start editing where I left off.

@hfccgit e.g. one could also follow it to the other extreme. I'd love to be able to sync the cursor position and last accessed notes across devices, but I am afraid a lot of people do not want this behavior.

@laurent22 Yes, I'm referring to the mobile app (Android). For the desktop it's fine in my opinion as the scrollbar starts at the top and I can set the cursor with the mouse (in the last Windows version).

@tessus Ok.

@laurent22 Thank you for implementing this. Saving and restoring the scroll position is a great start, but it has a few problems:

  • The position is wrong, if one

    • resizes the window
    • changes the layout

    before restoring of the position takes place.


  • Using tab to jump to the editor positions the cursor in the first row and first column.


While the first item is only an annoyance, the second item has rather dire consequences. Let's say you are in the middle of a long note and switch to a different note. After switching back, the position is shown correctly. You use tab to go to the editor. However, you can't see the cursor and as soon as you start typing the position scrolls to the top of the note. (Which also means you lost the cursor position.)

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "backlog" and I will leave it open. Thank you for your contributions.

I still think this should be kept open. The current way to save the current cursor position might have other side effects (as the scrolling issue in #1546).

Hi, I want to request this feature for the iOS version. Or at least give an option to set the cursor to the top of a note when open it. Currently, the cursor is always set to the bottom of the note. Some might like it, some not.

Motivation:

  • When switching between notes in Joplin the last cursor position is lost and the user has to scroll back tediously to the last cursor position.
  • When switching between Apps on the mobile phone the Joplin App might be swapped out / ended by the OS, losing the last cursor position. When coming back to Joplin to continue editing the note the user has to scroll back rediously to the last cursor position.

Proposal:

I think a preference option would be very useful to let the user switch between the following options when switching to edit mode:

-set cursor to the top
-set cursor to the bottom
-set cursor to the top line shown in viewing mode when edit button was pressed
-set cursor to the last position when the note was in editing mode

For this to work, in the metadata the note should preserve its last editing cursor position.

With these choices most requirements should be met.

This combined with a possibility to quickly switch between recent notes will improve any multi-note workflow a lot.

+1 This feature would be great. Save the cursor/scroll position when switching between notes. It doesn't necessarily have to sync, single device scroll position saving would still be really great. It's a real pain when editing multiple notes that I have to scroll back down again from the top each time I switch notes.

Was this page helpful?
0 / 5 - 0 ratings