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

Preserve open documents word wrap settings on restart #103199

Open
seva0stapenko opened this issue Jul 23, 2020 · 7 comments
Open

Preserve open documents word wrap settings on restart #103199

seva0stapenko opened this issue Jul 23, 2020 · 7 comments
Labels
editor-wrapping Editor line wrapping issues feature-request Request for new features or functionality
Milestone

Comments

@seva0stapenko
Copy link

Currently, when VS Code is restarted (e.g. for extension update, or version update), open documents would lose their word wrap settings after restart. It would be very helpful, if word wrap state for an open documents is preserved.

@bpasero bpasero removed their assignment Aug 12, 2020
@bpasero
Copy link
Member

bpasero commented Aug 12, 2020

I am persisting and restoring an editor view state, so maybe it should be part of it.

@alexdima
Copy link
Member

alexdima commented Sep 3, 2020

alt+z was intended to be an "in-memory" word wrap toggle.

There are better ways to configure permanent wrapping, via the "editor.wordWrap" setting in user settings.

This is not part of the editor's view state because toggling a file via alt+z toggles its wrapping in all the editors where the file is open.

@alexdima alexdima added feature-request Request for new features or functionality editor-wrapping Editor line wrapping issues labels Sep 3, 2020
@seva0stapenko
Copy link
Author

seva0stapenko commented Sep 6, 2020

alt+z was intended to be an "in-memory" word wrap toggle.

There are better ways to configure permanent wrapping, via the "editor.wordWrap" setting in user settings.

This is not part of the editor's view state because toggling a file via alt+z toggles its wrapping in all the editors where the file is open.

With all due respect, I don't see how word wrap state is different from unsaved changes to the document. "Dirty" status is attached to the document, it is propagated to all views over the document, and it is preserved on restart. For all practical purposes, unsaved changes can be considered in-memory.
So, it's not clear why unsaved changes to the document can be preserved across restarts, and word wrap cannot.
Also, editor.wordWrap seems to apply to all the documents in a workspace or globally, which is not the ask here.

@BawdyInkSlinger
Copy link

This is one of many feature requests for a single use case: I am developing a textbased game. Roughly half the time, I'm developing TypeScript in a *.ts file, and I want word wrap off by default. The other half of the time, I'm writing prose in a *.twee file, and I want word wrap on by default. Defaulting word wrap to on provides no more convenience than defaulting to off. Currently, I manually turn on word wrap per tab. This is nice so long so I don't restart the editor and I don't close the tab. But I don't work in the same files every day so this functionality only helps me so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-wrapping Editor line wrapping issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants
@bpasero @alexdima @seva0stapenko @BawdyInkSlinger and others