Live data from Hacker News

Nano 5.7

lists.gnu.org

141–150 of 157 posts

Re: Nano 5.7

#141
post #86
post #36

Earlier quoted context omitted.

> like editing a ini file and adding a line or a word, That's precisely the use case that has made me remove nano from every machine I administer since the 90s. Unless you're really careful to always start nano as "nano -w", its hard word wrapping will introduce line breaks where many configuration file formats (including ini files) don't expect, and it will do so in lines other than the one you're modifying. It's le…

I've never seen nano on any popular Linux distro hard-wrap long lines by default. Yes, it's controlled by a setting, and some people turn it on for some reason, but I just confirmed it's off by default (no need for any command-line flag) in both CentOS and Ubuntu. You might have been burned by a setting left behind by someone with a weird taste.

I learned to always, always use -w back around y2k, when my buddy taught me Gentoo. IIRC he had gotten his firewall config messed up at some point, or similar, due to forgetting that.

These days I'm still too scared of accidentally messing something up due to not passing -w, so I just do it. It's in my muscle memory after all so doesn't take much effort.

Re: Nano 5.7

#142
post #138

Earlier quoted context omitted.

I think your opinion simply reflects a degree of ignorance of nano's actual capabilities, rather than a genuine surprise at human behaviour. If anything, your comparison to gedit/notepad (notepad??? seriously???) makes that much clear. Honestly I don't mind vim, but I prefer nano. And I spend 24/7 coding in my terminal. Nano covers all my needs and then some. And while you should absolutely not switch vim to nano if…

Just to be clear: are you coding in nano all the time in that 24/7 terminal session? But there is no syntax highlightning etc? To edit config files, sure. But most of the time spent? I prefer nano too; trying to learn vim. But my coding happens in either Qt Creator or VS Code.

Nano has syntax highlighting...

Re: Nano 5.7

#143

Earlier quoted context omitted.

Meh, that vim keybinds thing is an exaggeration. Using arrows keys for moving the cursor, holding down Ctrl for jumping words, holding down Shift for selection, etc is even more consistent across editors, and doesn't even need any plugins.

I was more thinking of the benefits of vim-style, the advanced controls for moving and jumping around according to code structure. Not just jumping a word at a time, but jumping to a character, deleting a word, sentence, block, etc. Those are not always standardized across editors.

Deleting a word - Ctrl-Delete. Deleting a line - Shift-Delete.

Jumping to a character, deleting a block - while vim does have bindings for these, I've never found myself using them. For the latter especially, moving to the start of the block and then selecting to the end of the block is better to me just because it lines up with my eyes scanning the thing I'm planning to delete. With vim I would have to pause and double-check what I'm about to delete anyway, and if it doesn't fit in one page I'd have to move around to inspect it anyway.

Re: Nano 5.7

#144
post #142
post #138

Earlier quoted context omitted.

Just to be clear: are you coding in nano all the time in that 24/7 terminal session? But there is no syntax highlightning etc? To edit config files, sure. But most of the time spent? I prefer nano too; trying to learn vim. But my coding happens in either Qt Creator or VS Code.

Nano has syntax highlighting...

You're right, sorry.

Re: Nano 5.7

#145
post #120
post #99

Earlier quoted context omitted.

Linus Torvalds said he might switch to nano for his daily driver[0] >[Text editing is] all done in a traditional terminal, although I don't use 'vi'. I use this abomination called "micro-emacs", which has absolutely nothing to do with GNU emacs except that some of the key bindings are similar. I got used to it at the University of Helsinki when I was a wee lad, and I've not been able to wean myself from it, although…

Wouldn't modifying some GNU emacs shortcuts to his liking be easier than mantaining that editor?

Productive people are just lazy in a different way.

Re: Nano 5.7

#146
post #31

As a vim and emacs user, I don't give nano any hate. I'm surprised when programmers use it, sure, but that's because if my profession was going to require editing text files for hours a day (which it does), I would be happy to trade a steeper learning curve now for a less unpleasant job experience later. I totally understand why non-programmers don't use it. If your job does not involve you editing text files for hou…

More than that, Benno Schulenberg, nano's main developer, is actively against changes turn nano into anything close to a mini-IDE. He rejected patches that could nano have code completion from external tools, multi-pane/screens, source code navigation and many others. I respect his lead, but that discourages contribution. Disclaimer: I'm a very sporadic nano contributor.

Gotta respect that, he seems to have a vision, and keeps it in focus. Nano as a simple text editor is a blessing.

Re: Nano 5.7

#147
post #135

I've always thought of nano as simplistic, but reading the discussion here, I see there is more to it than I thought. I learned vi (precursor of vim) in the 1980s and the commands became second nature to me. However, as window-based systems and applications became the norm, I found it difficult to switch between vim and Windows or Mac applications, including the web. A good example of my problem involves the use of t…

Have you considered using extensions for editors and browsers that provide ViM like keybindings?

Re: Nano 5.7

#148
Unless Nano has changed a lot in the last 10 years, there's just no comparing it with Vim when it comes to productivity. Vim would blow it out of the water 10 times over in just about every use case I can think of, except initial learning curve. For that reason, I agree with Fedora's decision to make Nano the default editor.

Re: Nano 5.7

#149

CMD-F "micro" returned nothing, so here is a link to a modern nano replacement: https://micro-editor.github.io

I'm curious what the intended audience for micro is? It seems like if you want extensibility you use vi or emacs. If you want a very quick and dirty program where you use the same 4 or 5 commands every time you open it, you use nano since it's already installed. I don't know a lot of people in the middle, personally, so I'm curious what people who are using micro like about it in particular.

Windows sys admin here. Micro is nice because it is a single-file, stand-alone executable that has mouse support, macro record/playback and syntax highlighting. (I haven't checked Nano recently).

Because of this, I don't mind installing it on servers. It is great for making quick edits to json configs, batch files, powershell, python scripts, etc. Syntax highlighting and line numbering are key. The alternative is editing the file locally and then getting it onto the server which can be challenging for locked down systems, especially Windows Server Core which does not have a GUI environment.

Even on my local machine, if I need to make a really quick edit, it is much faster to use this than waiting for VS Code or PyCharm to load. You also stay focused. By this I mean, your eyes don't leave the powershell window that you are currently working in. This allows me to more quickly complete the task at hand.

Re: Nano 5.7

#150

CMD-F "micro" returned nothing, so here is a link to a modern nano replacement: https://micro-editor.github.io

I'm curious what the intended audience for micro is? It seems like if you want extensibility you use vi or emacs. If you want a very quick and dirty program where you use the same 4 or 5 commands every time you open it, you use nano since it's already installed. I don't know a lot of people in the middle, personally, so I'm curious what people who are using micro like about it in particular.

The key bindings for traditional text editors are awful. Micro uses the same normal key bindings that every GUI has used since 1984. A Unix should ship with an editor that has default key bindings that a normal user can guess how to use. Vi is an inexcusable choice for the default text editor although I understand why it’s popular for aficionados. It should be an advanced user choice, not a hazing rite of passage for newbs. Nano is close but still has the wrong bindings. Micro is actually correct. It’s not my actual daily text editor, but I use it when I just need a simple TUI editor.
Post reply on HN