top | item 45810873

(no title)

its_notjack | 3 months ago

I must have used nano for years at this point, and I'm shocked to find out how customisable nano actually is! I tend to use micro[0] on most of my systems now just because it comes with really lovely defaults and keybindings that are a bit more familiar, but this might make me take a second look at nano in future.

[0] https://micro-editor.github.io/

discuss

order

tpoacher|3 months ago

It's not just customisable, it's also insanely scriptable. Any action that you can do in nano itself corresponds to a command, and you can create "string macros" that you can bind to key combinations. Additionally it can execute external commands on any nano buffer and return the result. Combining the two is very powerful.

E.g. I have a configuration which allows me to use nano while editing pdf side-by-side, and be able to click on the pdf and land in the correct line in nano, and vice-versa. (and obviously compiling the latex document itself happens via a custom keystroke).

ssivark|3 months ago

Interesting. Since this kind of scriptable customization sounds like bread & butter emacs -- what tips the scales towards nano, for you?

digisign|3 months ago

Before I used micro & ne I used nano, and configured the keybindings to work in the CUA style. I still have the dot files, didn't delete them, but they rarely get used anymore.

I think they recently added Ctrl+S to save by default, even if unconfigured, woohoo.

jval43|3 months ago

I knew it! A junior dev recently used CTRL-S in nano and I couldn't believe that it actually worked.

They told me it had always been this way and I felt stupid for a bit. Good to know it's a recent addition.

genpfault|3 months ago

> Ctrl+S to save

XOFF ignored, mumble mumble

flkiwi|3 months ago

Same same. Never even occurred to me to look. That's the risk of a (successful) low-friction product though: you use it in quick bursts where the tool is necessary but largely invisible, and you never invest in learning more about it because it works so well with the defaults. There's probably a profound strategic insight buried in there somewhere.