Proposal: Minify Code #43
Labels
status/triage
default label before it is marked as bug or something else
type/enhancement
New feature or request
Milestone
Description
In a similar fashion to jo3-l/cc-minifier, add a command (and/or binding) to generate a minified version of the current buffer contents.
Solution
To begin with, I'm not entirely sure if this feature is even possible in pure Vim script, or if we have to resort to the Lua API, and thus make this a Neovim-only feature.
I'll do some research in those regards and see if I can come up with results that bring this forward.
However, before I further go into the discussion of a potential solution, we first have to consider the dreaded feature creep — is such a feature really necessary and needed?
To me it sure seems convenient to just enter a command and have a minimal version of my code.
Finally, we have to consider multiple things:
Regarding my first point, this definitely needs some discussion. Perhaps we can take inspiration at jo3-l/cc-minifier?
With respect to the second point however, we'll have to decide a way.
Comments feel rather clunky and unnecessarily complicated to me — their format and what argument does what would have to be documented well.
If we can pass arguments to our command, then I suggest we go with that, in a very similar fashion to command line programs that already do text manipulation. We would then also be able to bundle multiple effects into one single argument, say
--aggressive
.The format, whether we use the flag syntax or pass arguments surely is up to debate. Personally, I like the flags style more, they feel to me more appropriate.
Code of Conduct
The text was updated successfully, but these errors were encountered: