Feature idea: add a --file-extension option to gum write #963
maxjacobson
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have a script which uses
gum writeto ask the user write some code. If the user types ctrl-e to open an editor, a tempfile is created with the.mdextension:gum/write/write.go
Line 162 in 0e98776
Let's say I'm asking the user to write some go code. It would be nice if the editor had syntax highlighting for go. But because the extension indicates it's a markdown file, they have syntax highlighting for markdown.
Proposal: if I know I am asking a user to write go code, it would be nice to be able to specify the file extension:
When I specify that, and the user presses ctrl-e, then gum should create a tempfile with the "go" file extension, and then the user will have a more pleasant time typing in their go code.
When the option is omitted, it would continue to create a markdown tempfile by default.
Thanks for considering!
Beta Was this translation helpful? Give feedback.
All reactions