Re: Language-specific replacement for `formatter`

Anthony Sottile <[email protected]>
Newsgroups gmane.editors.nano.general
Message-ID <CA+dzEB=zPu-s_MPgBz1jjXwXLE2UEU41_WKqAVffbCq_-f_gMQ@mail.gmail.com>
On Wed, Sep 26, 2018 at 11:31 AM Benno Schulenberg <[email protected]> wrote:
>
>
> Hello Anthony,
>
> Op 25-09-18 om 22:23 schreef Anthony Sottile:
> > Hi! I've noticed that `formatter` has been removed in nano 3.x,
> > however I've previously found it pretty useful for running things like
> > `go fmt` (or sorting for gitignore for example).
>
> The formatter command was "made" for Go, so that you used it for that
> is no surprise.  But... how often do you need to re-sort a .gitignore
> file?  And if you really need to, how hard is it to type: ^R ^X |sort
> <Enter>?
>

Any time I'm changing a .gitignore I run this.  And really any time
I'm editing _any_ file I'll instinctively hit ^T to run the formatter
/ linter.  `^R^X|sort` is a *lot* to type over and over.
Additionally, if `^R^X` replaces `formatter` surely it also replaces
`linter` but that seems to remain?

> > Whether I had a formatter or linter I could run ^T and it would
> > usually do what I want.  With the removal of `formatter` from nanorc
> > is there a way to restore that behaviour?
>
> No.  Not now.
>
> > I work on a _ton_ of different file types (20+) so setting up a
> > shortcut for each formatter for each language is really not feasible.
>
> For how many of those syntaxes have you found a useful use of the
> formatter command?  (Judging from your Github stuff, you have nanorc
> files for just four syntaxes, and just one of them contains formatter.)
>

Ah yeah, those are just the ones I have posted publicly because they
work "universally" on all the machines I install those dotfiles on --
I have 10-15 other nanorc files that I don't have checked in there
(with most of them containing formatters / linters).

> > I'd be sad to see this feature removed permanently
> >
> > (maybe this is an email asking for restoration of `formatter`)
>
> Then please post a feature request on Savannah:
>   https://savannah.gnu.org/bugs/?group=nano
>
> In that request you may want to reference another complaint:
>   https://savannah.gnu.org/bugs/?54651

It seems that link is exactly what I'm asking for as well, either
restoration of ^T -> `formatter` or an equivalent replacement.  Though
it is marked as `wontfix` :(

>
> Benno
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.