Description
Description
I want to be able to save a position as a mark possibly labeled by a letter to be able to return to it later. These marks would be across a whole project so I can jump to one from a different file.
Each mark could be for a line, or it could be for a precise position on the line; that depends on the implementation. Marks for lines are simpler to manage and can be shown next to line numbers, but they may have insufficient precision in text with one line per paragraph (but they still are much better than nothing). Precise marks need to be shown in the text, so they clutter more, and interacting with them may be more difficult. Although I usually have one line per paragraph, I prefer marks for lines for simplicity.
IntelliJ IDEA has something like that.
Suggested interface
Clicking a line number (or something in that area) would prompt for a letter and mark the line with that letter, showing that letter next to the line number. Alternatively instead of clicking, a key combination like Ctrl+Shift+M and typing the letter in the prompt would mark the line with the cursor.
Clicking a menu item or pressing a key combination like Ctrl+M would show a list of all marks, and clicking one or pressing its letter or selecting with arrows and Enter would jump to that mark.
Marks could be shown also in the outline in the sidebar.
It would be possible to create unlabeled marks by clicking away or pressing Escape at the prompt for a mark label, and such unlabeled marks would be shown in the list of marks, but they could not be selected by pressing a letter.
Vim mode already has some support for marks, but the marks do not persist, and it lacks any interface. It would be nice to integrate the mark system with Vim controls: m
in Vim mode would create a mark like Ctrl+Shift+M in regular mode. '
in Vim mode would show marks like Ctrl+M in regular mode. So, Vim mode users could use the mark system without changing muscle memory.
Use Case
When I write a long document, I often move to different parts of the document. If the document is split to multiple files, it is more difficult because I can't search for relevant text across files. The best present system is to find the place in the preview and click it. Clicking to jump is useful, but it does not suffice when I move between places many pages apart. Marks as I describe them would greatly improve moving among several important points in the document.