5 ms·
I suggest nano to my students in classes where everyone is a beginner and we're learning programming on the command line. The greatest advantage of nano for th
by sramsay 3y ago
I suggest nano to my students in classes where everyone is a beginner and we're learning programming on the command line.
The greatest advantage of nano for these users is that all the commands are listed along the bottom of the screen. I was shocked to see that this is not true of micro.
- vdfs 3y agoby this trend, pico should show the whole man page in the bottom of the screen
- rob74 3y agoThe difference between micro and nano is that nano's keyboard shortcuts are pretty opinionated, while micro's are the ones used by most (GUI) applications nowadays: Ctrl+S for saving, Ctrl+F for find, Ctrl+Z for undo, Ctrl+Q to exit etc. etc. There is also a helpful hint at the bottom of the screen that you can press Alt+G to see the shortcuts, or Ctrl+G for some help.
- mdaniel 3y ago> Ctrl-S for saving ... Ctrl+Q to exit Using a flow control sequences for editor commands; what can go wrong?
- rollcat 3y agoIt conveniently translates to "save and exit"! Hopefully a cautionary tale against careless in-band signalling.
- mardifoufs 3y agoWait I don't understand the issue. What are you referring to?
- kip_ 3y agoSome of us graybeards use to use teletypes to talk to our computers. In one of the earlier races between differing I/O, the printer couldn't print as fast as the teletype was receiving data, so the teletype would send XOFF (Ctrl-S) to tell the remote end "Stop sending data and let me catch up" and would then send XON (Ctrl-Q) to say "I'm caught up, go back to sending data. Many of us carried that to our VT100 terminals and used it when lines of code or output would flood the screen faster than we could read. Eventually paginators like 'more' and 'less' were invented and flow control via the keyboard codes for XON/XOFF fell out of favor, but some of us have very strong muscle memory. :)
- mdaniel 3y agoA fine answer, but my life experience is that it's not just "muscle memory," I am showing that xon and xoff still work inside both Terminal.app and iTerm2 (echo $TERM shows "xterm-256color") so maybe there's some legacy stuff configured in them or something, but I'm just saying that I struggle to think of who the audience is that would be running micro but not via a virtual terminal library that implements flow control
- mdaniel 3y agoWhile I was double checking my memory about ctrl-s and ctrl-q, this link came up in my search results which may interest you, also: https://retrocomputing.stackexchange.com/questions/7263/history-of-ctrl-s-and-ctrl-q-for-flow-control https://retrocomputing.stackexchange.com/questions/7263/hist...
- musicale 3y agoI imagine avoiding control key sequences is part of the reason why Apple added the apple/command key to their keyboards. Makes it easy to copy text in a terminal emulator, etc.! Whenever I use Windows my fingers are surprised to remember that the windows key isn't used for menu commands.
- gilcot 3y agoI've been told that IBM and Microsoft though that sending application commands with dedicated key sequences wouldn't be useful. Function keys should suffice (so I think Midnight/Total Commander interfaces are the right one to expect) but later IBM came with CUDA…
- tivert 3y ago> The difference between micro and nano is that nano's keyboard shortcuts are pretty opinionated, while micro's are the ones used by most (GUI) applications nowadays: Opinionated, or just old and consistent? Nano is a clone of an editor related in 1989. Things weren't as settled back then. IIRC, I remember Ctrl-X was used to exit some DOS apps. IIRC, the current "GUI conventions" originated as Mac-isms in 1983/84. > Ctrl+S for saving, Ctrl+F for find, Ctrl+Z for undo, Ctrl+Q to exit etc. etc. There is also a helpful hint at the bottom of the screen that you can press Alt+G to see the shortcuts, or Ctrl+G for some help. So, about that Ctrl-C...
- codedokode 3y ago> Opinionated, or just old and consistent? That old hotkeys didn't survive the evolution so it doesn't make sense to support them anymore.
- tivert 3y ago> That old hotkeys didn't survive the evolution so it doesn't make sense to support them anymore. No. It makes sense to support them if the userbase is familiar with them. Nothing is more annoying than having changes like that forced on you. Then there's the fact that the "GUI standards" conflict with other command-line standards in a pretty serious way. Every command shell on Windows I've ever used uses a different convention than the "GUI standard" for copy-paste for exactly that reason (e.g. Windows Command Prompt's "mark" stuff, PuTTY's select/middle-click behavior).
- GoblinSlayer 3y agoWon't such hardcore oldtimers use vi anyway? I thought the point of nano was to be like notepad.
- cesarb 3y ago> I thought the point of nano was to be like notepad. No, the point of nano was to be like pico.
- tpoacher 3y agoAside from the fact that all shortcuts are completely and easily remappable, Nano's default shortcuts actually make a LOT of sense once you start using them. I find myself thinking I'm in nano mode and wanting to repeat searches forward and backward outside of nano so often, that when I realise I need to do something other than Alt-W/Alt-Q I have a mini-depressive episode.
- Aloha 3y agoAlt-G brings that up apparently. Control-G brings up help There is also some sort of comment mode
- b33j0r 3y agoI love micro for having mouse mode by default. I use it to debug containers and short-lived VMs, because it’s easier to copy/paste stuff than configuring neovim (which I would normally use). However! “Help” doesn’t start with G. That’s a bit weird. And someone mentioned ctrl-c. That’s a bit weird too ;)
- hyperdimension 3y agoFor what it's worth, ^G is [G]et help. And ^H can be/usually is backspace. It's only one letter off alphabetically. :)
- b33j0r 3y agoAppreciated :) Just, not a natural idiom, when that is the operative philosophy of the project. Clearly armchair criticism from me, as no one can name something I’ve made as cool as micro. Perfectionism isn’t always great, kids!
- lofatdairy 3y agoI imagine that the intention of micro is more like a modern, extensible editor, rather than a beginner friendly or ubiquitous editor. I think in the latter aspects, nano is still probably what you'd want to recommend your students (until they're ready for vim /s). micro is probably more for people who learned using nano but need more functionality/want a nicer ui.
- indymike 3y agoOur team uses micro as the standard quick and dirty text editor, and we really like it. Micro uses familiar key bindings, which really helps. The name kid of tells the story on functionality Nano < Micro < vim or Emacs. I do thing Micro is a fantastic option for students mainly because they already have the key bindings drilled into their heads.