Replies: 1 comment 1 reply
-
+1 My ideal for this feature would be that it allows you to edit (with a visible warning), but doesn't complain about the unsaved buffer. This would allow both saving (when desired) and minimal friction when using as a pager. edit: So I guess "read-only buffer" is a misnomer. Ephemeral buffer? Volatile buffer? Transient buffer? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In #7128 the idea was brought up to have a read-only mode similar to vim. @the-mikedavis also mentioned Kakoune as an example that refuses to enter Insert mode, compared to vim that simply warns you you're trying to edit a read-only buffer. I can't find an existing discussion for this, so I wanted to start one here because I like to use vim often as a better pager e.g.,
curl https://domain.tld/json | jq | vim -R -
.Personally, I like vim's behavior that is warns I'm editing a read-only buffer and then let whether there's even a file path attached to the buffer or the file is protected decide whether I can save it. This lends itself well to other use e.g., certain user-writable buffers like help content could automatically be marked read-only but we could forcibly overwrite them if we have suitable permissions. I.e., don't make helix the gatekeeper for whether we can do something - only let us know it may not work.
Beta Was this translation helpful? Give feedback.
All reactions