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

Save cursor position on write / exit #1133

Closed
cole-h opened this issue Nov 20, 2021 · 5 comments
Closed

Save cursor position on write / exit #1133

cole-h opened this issue Nov 20, 2021 · 5 comments
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@cole-h
Copy link
Contributor

cole-h commented Nov 20, 2021

Describe your feature request

In the same vein as https://gitlab.com/Screwtapello/kakoune-state-save, it would be fantastic if I didn't lose my place in a file every time I have to close and re-open it.

I'm unsure if it should be a plugin (once that's available), or built-in -- it's implemented as a plugin for kakoune, but it's built-in to vim (with the . and " registers).

@cole-h cole-h added the C-enhancement Category: Improvements label Nov 20, 2021
@kirawi
Copy link
Member

kirawi commented Nov 20, 2021

Something like #401?

@kirawi kirawi added the A-helix-term Area: Helix term improvements label Nov 20, 2021
@cole-h
Copy link
Contributor Author

cole-h commented Nov 20, 2021

Maybe similar, but I don't care about saving and restoring splits / etc -- only the cursor position.

I suppose this could be considered a step towards that issue, though, since I imagine you'd want to save the cursor position inside those individual splits.

@archseer
Copy link
Member

Yeah I was intending this with #401 (it needs a better description), I don't care about saving split layouts but we should save file positions, persistent undo history and possibly command history. I have my vim configured in a way that it automatically jumps to last used offset.

The implementation gets a bit tricky when you have multiple open instances running to the same state. See also neovim's implementation.

@cole-h
Copy link
Contributor Author

cole-h commented Nov 21, 2021

Ah, OK. That being the case, I'll gladly close this in favor of that one.

@cole-h cole-h closed this as completed Nov 21, 2021
@kirawi
Copy link
Member

kirawi commented Nov 21, 2021

@archseer Not sure I'm educated enough about persistent state to write a good description for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants