Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] - Allow multiple bookmarks on same line #158

Closed
petkaantonov opened this issue Mar 22, 2023 · 1 comment
Closed

[FEATURE] - Allow multiple bookmarks on same line #158

petkaantonov opened this issue Mar 22, 2023 · 1 comment

Comments

@petkaantonov
Copy link

petkaantonov commented Mar 22, 2023

There can be multiple positions on same line to be bookmarked. It won't play well with the UI design so it should be configurable and not the default I guess.

Workaround before implemented (specific to 8.3.1):

const {readFileSync, writeFileSync} = require("fs")
const file = "/Users/petka2/.vscode/extensions/alefragnani.numbered-bookmarks-8.3.1/dist/extension-node.js"
const contents = readFileSync(file, "utf-8").replace('const s=(0,i.indexOfBookmark)(f,n.line)', 'const s=-1')
writeFileSync(file, contents, "utf-8")

If you are curious, why I need it. I implemented my own cursor undo because built in undo is useless. I want to jump around edit some things quickly and then jump back to where I was, but the built-in undo is reset any time you edit anything (there is no sticky engine). I keep undo and redo stacks as hidden bookmarks using this extension because of the sticky engine, so I don't need any of the ui features for this use case.

@alefragnani
Copy link
Owner

Hi @petkaantonov ,

Multiple bookmarks on the same line would break no only the UI, but some compatibilities that I'm planning for the future so, it's not that simple to accomplish and keep the extension with its original intention working properly.

Based on the description of your use case, it seems that what you really need is something like a Stack Bookmark, no matter the numbers in it. If that's the case, I wonder if those Vim extensions has something like this natively, but I think it worth a try. Or, it would be easier (less breaking changes) to achieve this on my other Bookmarks extension, since there would be no override of numbers per line (open issue alefragnani/vscode-bookmarks#183).

Hope this helps.

@alefragnani alefragnani closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants