Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

add ":f" as an alias for ":fmt/:format" #11605

Closed
samankittani opened this issue Aug 30, 2024 · 1 comment
Closed

add ":f" as an alias for ":fmt/:format" #11605

samankittani opened this issue Aug 30, 2024 · 1 comment
Labels
C-enhancement Category: Improvements

Comments

@samankittani
Copy link

:f isn't used for anything, and ":fmt" is a bit cumbersome. This would be better suited as a custom command, but that isn't possible yet (#4423). It would be nice to have ":fw" and ":fwq" to format-write and format-write-quit.

@samankittani samankittani added the C-enhancement Category: Improvements label Aug 30, 2024
@Rudxain
Copy link
Contributor

Rudxain commented Sep 1, 2024

I'm unsure if this is worth it:

  • If a user has auto-format = true in their languages.toml, then they wouldn't need the cmd (unless they want to reduce writes to storage).
  • If auto-format = false for some lang, then they only want to fmt some (or none) files. In that case, they can simply :set-option auto-format = true whenever they open a file they want to fmt.
  • If a user really dislikes auto-format (maybe because it's distracting?), then they would rarely ever fmt manually. Maybe they use a tool that formats all files in a repo before commit, rather than fmt while the editor is open.

However, those 3 points assume the buffer is associated with a file.

Sometimes, it makes sense to view/edit a buffer without ever writing it to the file-system. Pasting into a buffer is one of those cases.

@helix-editor helix-editor locked and limited conversation to collaborators Sep 2, 2024
@pascalkuthe pascalkuthe converted this issue into discussion #11621 Sep 2, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

2 participants