Slashdot Mirror


GNU Nano Gets New Stable Release

jones_supa writes: GNU Nano 2.4.0 has been released as the first stable update to this UNIX command line text editor in a number of years. The release codenamed "Lizf" brings a wide variety of changes: full undo system, Vim-compatible file locking, linter support, formatter support, flexible syntax highlighting, and random bugfixes.

69 of 119 comments (clear)

  1. Random bugfixes, good by Anonymous Coward · · Score: 5, Funny

    I always prefer random fixes instead of carefully planned specific fixes.

    1. Re:Random bugfixes, good by houstonbofh · · Score: 1

      Considering the software is named Guano, I'm guessing the code is pretty crappy.

      And this is what happens when you guess instead of learn. Especially with incorrect information. Nano is my favorite Unix text editor.

    2. Re:Random bugfixes, good by JackieBrown · · Score: 2

      Mine too. Very easy to use with almost all the commands you need printed on the bottom of the editor

  2. Nano is not a command line editor by ShanghaiBill · · Score: 4, Insightful

    Nano is a full screen text editor.
    Ed is a command line editor.
    Have Slashdot editors never used a teletype?

    1. Re:Nano is not a command line editor by smittyoneeach · · Score: 3, Informative

      Yeah, it's an editor invoked at the command line in a terminal, i.e. not a graphical mode editor.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    2. Re:Nano is not a command line editor by kindbud · · Score: 2, Interesting

      ed is a line editor.
      readline is a command line editor.

      --
      Edith Keeler Must Die
    3. Re:Nano is not a command line editor by Trogre · · Score: 1

      I invoke most graphical programs at the command line in a terminal.

      Doesn't make them command line programs.

      --
      "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
    4. Re:Nano is not a command line editor by smittyoneeach · · Score: 1

      So, maybe "nano.exe" is not "nano"?

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    5. Re:Nano is not a command line editor by smittyoneeach · · Score: 1

      I'm not disputing your point. Emacs, for example can word against the character output stream in the terminal, or against X11.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    6. Re:Nano is not a command line editor by Misagon · · Score: 2

      .. and I use to invoke nano in a terminal window by double-clicking an icon in the sidebar on my desktop.

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
    7. Re:Nano is not a command line editor by houstonbofh · · Score: 1

      But how will the Ubuntu users know which Debian version to use? :)

    8. Re:Nano is not a command line editor by cthulhu11 · · Score: 1

      thank you, beat me to this.

  3. The Best Console Editor by kmarple1 · · Score: 2

    I'll always prefer pico/nano over vi and emacs.

    1. Re:The Best Console Editor by sunderland56 · · Score: 2

      You can be my wingman anytime. It just edits text! That's it! That's all I need!

      Among the new features of this alternative to Vim and Emacs is a fully-functionality undo system, Vim-compatible file locking, linter support, formatter support, flexible syntax highlighting, and many bug-fixes.

    2. Re:The Best Console Editor by antdude · · Score: 1

      Ditto. Vi and emacs drive me crazy in trying to learn the tricks, hot keys, etc. :(

      --
      Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    3. Re:The Best Console Editor by iluvcapra · · Score: 2

      I bet you're .login just launches Midnight Commander too. Bah you people!

      --
      Don't blame me, I voted for Baltar.
    4. Re:The Best Console Editor by hattig · · Score: 1

      Nano already supports syntax highlighting, this just makes it more flexible (presumably).

      You'll need to set up your .nanorc file to enable it.

      For example, to enable perl highlighting:

        include /usr/share/nano/perl.nanorc

    5. Re:The Best Console Editor by Big_Breaker · · Score: 1

      This - 100%. I just need to edit config files and write some simple code. I do a lot with single board ARM computers and something nice and light weight is perfect.

    6. Re:The Best Console Editor by houstonbofh · · Score: 2

      I prefer Notepad++ over any of that garbage.

      But it's WINE dependency is a bitch...

    7. Re:The Best Console Editor by OrangeTide · · Score: 1

      That's all I need!

      I need sed-like text manipulation integrated into my editor. I mean if there isn't already a full refactoring engine in it.

      --
      “Common sense is not so common.” — Voltaire
    8. Re:The Best Console Editor by OrangeTide · · Score: 1

      joe, ersatz emacs, microEmacs, QEmacs, ...

      Lots of choices out there for simple editors that don't need a lot of resources. But that said, emacs and vim run like a champ on my Raspberry Pi.

      --
      “Common sense is not so common.” — Voltaire
    9. Re:The Best Console Editor by toejam13 · · Score: 1

      I prefer Notepad++ over any of that garbage.

      But it's WINE dependency is a bitch...

      Geany and SciTE are similar text editors based on the Scintilla engine, but include ports to OS X, Linux, BSD and Solaris. If WINE isn't available, they're a good alternative.

    10. Re:The Best Console Editor by spauldo · · Score: 1

      The thing about vi and emacs is while they're superior editors, they're really only helpful for people who do a lot of text editing. If you don't, you'll never build up the skill those programs require.

      I picked up vi because I had to work on Sun and HP machines that didn't have anything but vi and ed. It wasn't hard, but I did (and still do) a lot of text editing so I was able to build the muscle memory. If you need it - it's great. If you don't, pico/nano is more than adequate for most people.

      If your needs change, and you find yourself editing a lot of text, don't shy away from the more powerful editors. Once you learn one of them (really learn, not just play around for a couple hours), you'll never look back.

      --
      Those who can't do, teach. Those who can't teach either, do tech support.
  4. Re:This is a great excuse by ArchieBunker · · Score: 2

    Are you kidding? No self respecting neckbeard would be caught dead using Nano. It's too simple and straightforward for them. Their editor needs to have an interactive and non interactive mode and no use of the delete or backspace key. I mean keyboards have had that function for like a half century now...

    --
    Only the State obtains its revenue by coercion. - Murray Rothbard
  5. Nice by Anonymous Coward · · Score: 5, Insightful

    For me, nano fulfills a vital role:

    When some inexperienced Linux user has to edit some file in some form of Linux and there is no gui available, I point them to nano, because it behaves pretty closely to what they expect from a text editor (which tends to be something like notepad...sigh).

    The other, most common alternatives aren't nice for newcomers. vi comes preinstalled in most *nixes, but it is just alien to your average user, and emacs - though it behaves more like what users expect - always ends confusing them because of the key chords (and it doesn't come installed in most distros, if I am not mistaken).

    nano is simple enough and good enough to get the job done, and most Linuxes have it pre-installed.

    So, thank you nano developers. Keep up the good work!

    1. Re:Nice by Anonymous Coward · · Score: 1

      When some inexperienced Linux user has to edit some file in some form of Linux and there is no gui available, I point them to nano, because it behaves pretty closely to what they expect from a text editor (which tends to be something like notepad...sigh).

      Now, if I only could find an entire toolchain like that.
      An entire OS that behaves the way one would expect, that would be the dream.

      But I can't say that I appreciate the new features. Sometimes I wish programmers would limit the scope of a program and say "Now it's done, there is no need to do further changes except pure bugfixes."

    2. Re:Nice by Gaygirlie · · Score: 1

      vi comes preinstalled in most *nixes, but it is just alien to your average user, and emacs - though it behaves more like what users expect - always ends confusing them because of the key chords

      I'm not even an average user and I still have no idea how to use Vi or Emacs. At least Nano does what I want.

    3. Re:Nice by DrXym · · Score: 1

      When some inexperienced Linux user has to edit some file in some form of Linux and there is no gui available, I point them to nano, because it behaves pretty closely to what they expect from a text editor (which tends to be something like notepad...sigh).

      By which you mean it behaves in a relatively straightforward, least surprising way.

    4. Re:Nice by hattig · · Score: 2

      And in addition has a clear help panel within the editor that helps you to learn the keyboard shortcuts as you use the tool.

      nano is great, and I've used it for many years, and before that as pico when it was part of pine (again, one of the better email clients).

    5. Re:Nice by jeffmeden · · Score: 4, Funny

      It's easy. You just use "vi [filename]" and then inside the file you hit lower case i to actually edit it and then escape to stop editing it and then ctrl to activate the command prompt inside vi and w to write it and exclamation mark because youre sure you want to save it and then q to quit.

      And after that I have configured resolv.conf and apt.sources to the point where I can just install nano and get back to work.

    6. Re:Nice by JackieBrown · · Score: 1

      I love this. You had me believing you really thought all those steps were easy until that last sentence.

  6. Re:This is a great excuse by mcrbids · · Score: 5, Interesting

    I'm a *nix neckbeard, I respect my skills, and I use nano daily. It's a simple, fast, straightforward editor with controls similar to Word Star. Ctl-K to delete line, etc. As I've been busy building my neckbeard for 15 years or so now, and originally learned word processing with WordStar, it's a simple, natural fit.

    I code in NetBeans with an IDE but for sysadmin work on any of the 50 or so servers I admin? Nano + mercurial all the way.

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  7. I wonder when by RightwingNutjob · · Score: 5, Funny

    systemd will get an integrated text editor with emacs, vi and nano emulation modes...

    1. Re: I wonder when by Tsiangkun · · Score: 1

      Are you not paying attention ? With systemd you have your choice of hex, oct, and binary modes in grepd for making use of the journald output !

    2. Re:I wonder when by EmeraldBot · · Score: 1

      systemd will get an integrated text editor with emacs, vi and nano emulation modes...

      But didn't they actually consider that a while ago? Some kind of integrated editor for service files or such?

      --
      "Set a man a fire, he'll be warm for the rest of the night. Set a man afire, he'll be warm for the rest of his life."
    3. Re:I wonder when by TangoCharlie · · Score: 1

      I'm not using it unless it also does EDT.

      --
      return 0; }
  8. Re:This is a great excuse by EmeraldBot · · Score: 1

    Are you kidding? No self respecting neckbeard would be caught dead using Nano. It's too simple and straightforward for them. Their editor needs to have an interactive and non interactive mode and no use of the delete or backspace key. I mean keyboards have had that function for like a half century now...

    Yeah, no one but those mythical "neckbeards" could ever possibly want such advanced features as... being able to customize it. Or auto completion. Or hell, even code folding. I mean, Nano's biggest boast it that they have syntax highlighting and find-and-replace. Some people need a bit more from their editor then that. Oh, and VI does support the backspace key. In fact, it has for about 20+ years now.

    --
    "Set a man a fire, he'll be warm for the rest of the night. Set a man afire, he'll be warm for the rest of his life."
  9. Real programmers by Antique+Geekmeister · · Score: 4, Funny

    Does it have the butterfly macro for real programmers?

                https://xkcd.com/378/

  10. Re:Buggy Whip by Antique+Geekmeister · · Score: 3, Insightful

    The tiny editors do have their uses. They tend _not_ to require dozens of unrelated and bulky graphical packages to support them, the failure of any of which can disable the graphical editor. And they work well over poor bandwidth connections to remote servers, and even work well on overburdened, very lightweight virtualization servers for software routers or proxies.

    So making them work really well can save work time and be very appreciated by people doing critical work with very real constraints.

  11. Re:Buggy Whip by Alwin+Henseler · · Score: 3, Insightful

    Even modern, GUI based systems have tools that work outside the GUI, or in a text-mode terminal of some kind.

    Maintaining such tools is just as needed as maintaining other parts of a system. Or creating new bits, for that matter. If not done, it would only be a matter of time before you'd have (badly) broken bits of software all over the place. To the point where a system becomes unusable to do real work. Text mode editors are just one of many components of modern systems (and imho, not in the "buggy whip" department anyway).

    Besides: many people use it. Among other reasons, probably because it saves them time, or does some jobs better than other editors. As long as there are enough users, that alone makes developer's time well spent.

  12. Re:Buggy Whip by sunderland56 · · Score: 2

    The tiny editors do have their uses. They tend _not_ to require dozens of unrelated and bulky graphical packages to support them, the failure of any of which can disable the graphical editor. And they work well over poor bandwidth connections to remote servers, and even work well on overburdened, very lightweight virtualization servers for software routers or proxies.

    So making them work really well can save work time and be very appreciated by people doing critical work with very real constraints.

    Oh, absolutely. That's why vi is so useful.

  13. More help needed by Blaskowicz · · Score: 3, Interesting

    I would simply like if it explained how to cut and paste multiple lines of text at the same time. For that task I have to reach for the mouse (the block of text needs to fit on the screen) or use a graphical editor - that'd be pluma or leafpad, to be free of bullshit.

    That was still easier in MS-DOS EDIT.
    By the way : (shit, I put it in a pastebin because of the slashdot filter)

    http://dpaste.com/3210G6K

    It has qwerty-isms. That's perhaps one of my bigger peeves with Free software. The video games in linux are worst, they're likely to be playable with a qwerty keymap only. DOS/Windows games of the 90s at least just read the raw scan codes so the keyboard acted as if it was qwerty.

    1. Re:More help needed by Trepidity · · Score: 5, Informative

      I would simply like if it explained how to cut and paste multiple lines of text at the same time.

      Use Alt+a to set a mark for the start of highlighting, then move your cursor to the desired end of the highlighted region. Now if you copy or cut, it'll operate on the highlighted region.

    2. Re:More help needed by dargaud · · Score: 3, Informative

      Go on the first line, press Ctrl-K (yes the line disappears because it's actually a cut), press Ctrl-K again on all the next lines you want to copy. When done press Ctrl-U to paste back your text. Move to when you want to paste, press Ctrl-U again. Done.

      --
      Non-Linux Penguins ?
    3. Re:More help needed by hattig · · Score: 2

      I don't understand how anything is easier that hitting ctrl-k for as many lines as you want to cut, and then ctrl-u to paste them all back where you want them.

    4. Re:More help needed by ledow · · Score: 1

      Ctrl-^ does the same.

      Ctrl-^ at the start of the block, scroll down with arrow keys. Ctrl-K at the end of the block. Bam, you cut the whole block.

      Ctrl-U to paste.

    5. Re:More help needed by jofas · · Score: 1

      d p (or P if you want pasted before cursor) This is the power of vi: navigation without thinking about the cursor's x/y position.

    6. Re:More help needed by Blaskowicz · · Score: 1

      That is because I never tried and assumed the buffer was destroyed every time. Stupid maybe but when editing /etc/foo.conf etc. I usually only need to change a couple values, or I use ctrl-K to delete only. Pasted text comes from some terminal or from a web browser, or is often entered with cat rather than a text editor.

  14. Re: This is a great excuse by EmeraldBot · · Score: 2

    vi a link to vim ? I haven't used plain old vi in a long time.

    The operating system I use actually does ship with an implementation of a very old version of vi. I don't use it (I use vim), but I do know for a fact that it supports the backspace key, along with a bunch of stuff nano doesn't.

    Clarification: I don't have a problem at all with nano, but I do with people who say it's stupid that I want more from a text editor than search-and-replace. Also, binding all those shortcuts to the control key has got to wear on your pinky after a while...

    --
    "Set a man a fire, he'll be warm for the rest of the night. Set a man afire, he'll be warm for the rest of his life."
  15. Re:This is a great excuse by OrangeTide · · Score: 2

    I'm a *nix neckbeard...

    Well, I'm not a true neckbeard, but merely a unix beard. But I question anyone's commitment to the Unix way if they are not using Traditional Vi. But I'm rather torn on the issue of facial hair and operating systems because a man I deeply respect has no beard at all!

    --
    “Common sense is not so common.” — Voltaire
  16. oh no! by bensch128 · · Score: 2

    They'll have to call it Micro now!

  17. mcedit by Dwedit · · Score: 1

    I still use Midnight Comannder's editor (mcedit) whenever I need to edit text in a Linux terminal. I find it a lot more user-friendly than any other terminal-mode text editor.

    Vi is downright arcane. You need to hit i before you can type, and you need to hit Escape :wq to save and quit. Fortunately, it's not as bad as classic vi, where arrow keys don't exist, and you need to use ESC then hjkl, and backspace keys don't exist either, and you need to use ESC x.
    Meanwhile, in mcedit land, you just hit F9, which is clearly labelled as "pull down", and menus appear. You can see what your options are, and carry out commands. This is why GUIs are awesome, it shows you the possibilities.

    1. Re:mcedit by jellomizer · · Score: 2

      It appears crazy at first. But it was actually designed rather well as to not have your hand move from the core of the keyboard.
      As well vi was one of the first full screen editors. So a lot of terminals had inconsistent keys on the keyboard, you could only really trust the core set. The fact it was using the esc key was pushing it.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:mcedit by spauldo · · Score: 1

      Learning vi (at first) is all about building muscle memory. Once you do, it feels natural.

      My job involves converting MS Office documents into webpages. I do it all in vim. I've scripted a lot of it (and obviously I didn't write the docx2txt converter), but I still do a lot of manual editing as well. Jobs I've had in the past involved doing security audits on Sun and HP machines that didn't have anything but vi, so I started this job with the skillset I needed.

      I used to use pico (what nano is a clone of) and DOS edit before that, and I was adept at them. For my current work, I wouldn't have near the productivity in nano that I do in vi.

      Here's the key words of your post:

      whenever I need to edit text in a Linux terminal

      That's why vi is arcane to you. You don't spend hours a day editing text files. For those of us that, do, vi (or emacs, for the people that went that route) is a godsend.

      nano is great for what it is (well, pico was, I'm assuming nano is). It's an editor for people who don't edit enough text to make it worth learning a more complex editor.

      --
      Those who can't do, teach. Those who can't teach either, do tech support.
  18. Re:This is a great excuse by righteousness · · Score: 3

    I use nano because for me it is the best text-mode "text editor". I use it to "edit text". Not for coding, which I guess is what you're talking about. For just "editing text", nano is the most user-friendly. There's no need for all those advanced features you mention when all I want to do is "edit text files". I'm talking about plain "text files", the kind that just have words and punctuation and none of the code tags or whatever that needs to be syntax highlighted. Just normal words in English or other language and none of the programming words that need to be auto-completed. You know what I mean?

    --
    Don't fornicate. Seriously, just don't do it.
  19. Re:Buggy Whip by Sique · · Score: 2
    When your GUI doesn't come up correctly, what do you do? In Windows, it's reinstalling the whole OS, taking about one workday until most of the important patches are also installed, not withstanding reinstalling a lot of software. In UNIX, it's a few minutes of editing the config files, and then restarting the GUI. But how do you edit the config files? Be glad someone made a buggy whip!

    I know the buggy whip maker is some nice metaphor, but some people don't think it through.

    --
    .sig: Sique *sigh*
  20. Re:Buggy Whip by drinkypoo · · Score: 1

    vi is fine if you've got nothing important to do but learn archaic interfaces but some of us have shit to do.

    but nano looks like wordstar

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  21. Re:This is a great excuse by fisted · · Score: 2

    I suppose that's why you only manage 50-or-so servers

  22. Re:This is a great excuse by jeremyp · · Score: 1

    I certainly wouldn't be caught using nano, not since our sys admin accidentally trashed a Linux system by editing the pam config file with nano. After he saved the file, nobody could log in anymore because nano inserted a line feed where a long line had wrapped in his terminal.

    We got the system back by booting from a live CD and using vi to join the broken line back together.

    --
    All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  23. Re:Buggy Whip by Lotana · · Score: 1

    This is one of the problems with open source development; people will spend endless hours perfecting the buggy whip; not to mention coming up with new, competing buggy whip designs.

    Yeah, how DARE they spend their own time doing what they like! Don't they know that they should be productive and do what sunderland56 deems more important?!

  24. Re:Nano is okay by ledow · · Score: 1

    I have to say, I grew up on DOS and then moved to Linux over time.

    vi - everyone was talking about it being "equivalent" but I use it ONLY when absolutely, 100% necessary and I can't install anything else.

    emacs - can't be bothered. Literally, just no.

    pico/nano - lifesavers.

    I don't want to change contexts, do line-at-a-time editing, with arcane commands that you have to "man" to find out. Pico/nano lets you navigate with the keyboard, has all the shortcuts clearly listed below, and doesn't play games.

    Coming from anything else to use the text editing commands, people must hate them.

    The equivalent of "apt-get install nano" is one of the first commands I execute on any Linux machine, no matter how minimal and console-based or fancy and gui-based.

    When something says "edit this postfix file" or similar, I just want to run a command on it and start editing with an easy-to-find save and exit.

  25. Re: This is a great excuse by tsqr · · Score: 1

    Much like you probably haven't used a manual typewriter for a long time. The only reason to use either is pure nostalgia.

    Unless you need to cut a mimeograph stencil. Which would be either nostalgia or for love of the smell of mimeo ink.

  26. Re:This is a great excuse by pnutjam · · Score: 1

    I like nano because the screen has all the commands you need right at the bottom. It's my go to editor. I don't have to flip back and forth between a help screen and a working screen (and an reading screen) like vi.

  27. Re:This is a great excuse by houstonbofh · · Score: 1

    Nano is also supported in almost all Linux distros out of the box, even ultra slim embedded, so using it on unfamiliar systems really speeds things up.

    Not just Linux. It is available on every Unix I have seen from HP-UX to AIX to the BSDs.

  28. Re:This is a great excuse by OrangeTide · · Score: 1

    "Eclipse or whatever" doesn't work in a terminal window, but nano does.

    Matches work in places electric lights do not, so we should all switch to matches.

    Anyone who is going to bother learning a text editor will learn a better one.

    I didn't realize there was much to learn, can't people figure out how to use more than one text editor? We are talking about programmers and sysadmins aren't we, they're supposed to be experts in these matters.

    --
    “Common sense is not so common.” — Voltaire
  29. Re:This is a great excuse by OrangeTide · · Score: 1

    I usually test a few logins before logging out so I can revert any typos or whatever. I do the same even when using glorious Vi. Pity that nano decided to reformat lines, I wouldn't have expected that.

    --
    “Common sense is not so common.” — Voltaire
  30. Re:This is a great excuse by toejam13 · · Score: 1

    You can disable line wrapping by starting nano with the '-w' flag.

  31. Re:Buggy Whip by spauldo · · Score: 1

    Attitudes like this are part of why commercial UNIX got clobbered by Linux and BSD.

    Ever use an old version of Solaris without GNU utilities? Or HPUX? Or (shudder) UNIXware?

    The basic utilities would feel right at home to someone on UNIX 7. Clunky, unintuitive, lacking modern features, and bug-ridden. Some hardcore UNIX heads liked it, although I can't fathom why. Sun wised up after a while - no idea about HP. Even on Linux, you're seeing vim replace all the other vi clones like elVIs, to the complaint of practically no one.

    If you're going to spend all day wielding a buggy whip, you want one that's comfortable in your hand.

    --
    Those who can't do, teach. Those who can't teach either, do tech support.
  32. Re:This is a great excuse by ArchieBunker · · Score: 1

    Sounds like the fault of pam for being crippled by a linefeed.

    --
    Only the State obtains its revenue by coercion. - Murray Rothbard