Nano has already supplanted the great EMacs and Vim as the most popular text editor of all linux distros, for though it has many omissions in functionality it scores over the older, more complete programs in two important respects. First, it is slightly simpler; and secondly it has the text “^ Exit” inscribed in highlighted text on its footer

EDIT : This sees to be going over some people’s heads. It’s a hitchiker’s guide to the galaxy reference.

The Hitchhiker’s Guide has already supplanted the great Encyclopaedia Galactica as the standard repository of all knowledge and wisdom, for though it has many omissions . . . it scores over the older, more pedestrian work in two important respects. First, it is slightly cheaper; and secondly it has the words DON’T PANIC inscribed in large friendly letters on its cover.

    • Skullgrid@lemmy.worldOP
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      14 days ago

      If ind it quite funny that the majority of the posts are about the text editor and not about the blatant hitchhiker’s guide reference to the point where I had to specify it in the OP and then the thread exploded after that point.

  • TaterTot@piefed.social
    link
    fedilink
    English
    arrow-up
    28
    ·
    14 days ago

    I’m ashamed to admit that, despite having read Hitchhiker’s Guide to the Galaxy several times, my Vim elitist mindset made me miss the reference.

    Sometimes you need a real good slice of humble pie to remember what’s important in life.

  • owenfromcanada@lemmy.ca
    link
    fedilink
    arrow-up
    19
    ·
    14 days ago

    Nano is to EMacs/Vim as Notepad is to Notepad++ or VSCode (Nano has features Notepad doesn’t, but you get the point).

    I don’t do a ton of code editing directly on the CLI. I do things like change parameters in config files or open a file to read it quickly. If I’m doing more heavy editing, I’ll use a GUI editor (with an SFTP extension if I’m working on a headless server). So programs like Vim and EMacs have never been useful for me.

    To each their own (and I have all the respect for anyone who knows how to exit Vim without looking it up) but I’m guessing the majority of people have a similar experience.

    • BassTurd@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      14 days ago

      I spent enough time learning vim that I can do basic navigation and text editing. I’d like to be able to navigate efficiently like some of the savants out there, but the effort to get to that point is more than I’m willing to put into in.

    • redjard@reddthat.com
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      14 days ago

      Being good at nano does not transfer like notepad transfers to notepad++ or kwrite.
      vim does not respect nano shortcuts and modes are simply a barrier: an extra keypress and another thing to keep track of. It slows you down significantly.
      Noone good at nano would switch to vim naturally, you have to force yourself to endure until you catch back up to what you could long do in nano.

      Conversely I don’t know a single shortcut, behavior, or info notepad shows that np++ or kwrite don’t have. Besides maybe bracket and quote completion in kwrite which you’d have to disable in settings.
      And on the other hand the advantages are more directly visible, like tabs, syntax hilighting, …
      You might not immediately intuit the shortcuts for tab management, but you can still use tabs and then not return to notepad due to missing them.

      • owenfromcanada@lemmy.ca
        link
        fedilink
        arrow-up
        3
        ·
        14 days ago

        Sure, Notepad transfers to other GUI programs better than Nano transfers to Vim or EMacs. But that has little to do with Notepad and more to do with GUIs typically supporting similar shortcuts. Like I said, it’s an imperfect analogy.

        I think you missed my original point. Most people wouldn’t describe themselves as “good” or “bad” at Notepad or Nano. They’re simple programs designed for simple editing. The learning curve is very low for both. Advanced editors have differing learning curves, but they’re all a lot more steep.

        And my original point was that, because many people do only simple editing in a CLI and more advanced editing in a GUI, it makes sense that Nano became the most popular for CLI due to its shallow learning curve.

      • imecth@fedia.io
        link
        fedilink
        arrow-up
        2
        arrow-down
        2
        ·
        14 days ago

        vim does not respect nano shortcuts and modes are simply a barrier: an extra keypress and another thing to keep track of. It slows you down significantly.

        You obviously haven’t used much vim if you think modes slow you down. First it means you don’t have to bring your right hand all the way to the arrows whenever you want to move the cursor, secondly it means you can use shortcuts without adding a modifier everytime - this translates to fewer keypresses.

        • redjard@reddthat.com
          link
          fedilink
          arrow-up
          4
          ·
          14 days ago

          I was talking about the new user experience. No new user can navigate without the arrow keys, the most you can expect is looking up i and esc to enter and exit edit mode, and then using both modes the same way being annoyed at being in the wrong mode when something doesn’t work.
          Keeping track of the modes is also obviously something only problematic to those not familiar with vim.

        • notfromhere@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          14 days ago

          If you customize nanorc then you can also point and click with the mouse and highlight text and copy/paste like it was a GUI from the terminal. Most people shiting on Nano just never learned it because they learned the editor they are familiar with. Same reason I shit on vim.

  • AgentSeven@lemmy.zip
    link
    fedilink
    arrow-up
    15
    ·
    14 days ago

    I’m in the “been working with Linux since the 90s” gang so I call vim vi and nano pico and when I started there was a coolness factor to be considered. I was incredibly uncool so I used whatever I wanted, including pico - I mean you used pine for email back in the day and the interface was nearly identical, so whatever.

    But I did want to be at least a tiny bit cooler, so I learned vi in a fairly rudimentary fashion. I can edit, jump, delete, search, replace, copy and paste - oh, and I can exit. I’ve spent so much time using vi, that my brain doesn’t even have to think about exiting, not even whether I want to write or not. It just happens like second nature. It’s actually gotten to where nano seems unduly burdensome to me.

    But really, I prefer an IDE for programming. CLI editors will always be for configuration files and shell scripts to me.

  • Scoopta@programming.dev
    link
    fedilink
    arrow-up
    14
    ·
    14 days ago

    I’ve wanted to move elsewhere for a long time, thing is I don’t use nano for programming, I use it for config files. For programming I use an IDE, and every time I’ve tried leaving my IDE for emacs with a language server I find I just can’t be bothered to set it up and learn it and make the move. Maybe because while I have some gripes with my current setup…they’re very minor

    • partofthevoice@lemmy.zip
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      14 days ago

      People program in things like nano? Wow. I want to learn that. I also have only really used them for configs, terminal profiles, …

      Can they offer autocomplete and syntax highlighting like vscode can, extendable for different languages and whatnot?

      • YoSoySnekBoi@kbin.earth
        link
        fedilink
        arrow-up
        7
        ·
        14 days ago

        Nano has syntax highlighting out of the box IIRC. I’ve used it for programming in a pinch but no, it’s nowhere near as extensible as VSCode or Vim. It’s a text editor, not an IDE

      • palordrolap@fedia.io
        link
        fedilink
        arrow-up
        5
        ·
        14 days ago

        nano has supported syntax highlighting for a good long while, and for the Debian package at least, comes with a bunch of predefined languages in /usr/share/nano/*.nanorc.

        I wouldn’t recommend it for large projects, but I’ve created and edited shell and Perl scripts with it plenty of times.

  • rumba@lemmy.zip
    link
    fedilink
    English
    arrow-up
    13
    ·
    13 days ago

    Many were increasingly of the opinion that they’d all made a big mistake moving away from ‘ed’ in the first place, and some said that even ‘ed’ had been a bad move, and that no-one should ever have left punch cards.

  • esc@piefed.social
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    1
    ·
    14 days ago

    Both nano and emacs suffer from the same problem - bad defaults. You need to pass like ten options to nano for it to work as expected to edit configuration files and small scripts.

      • esc@piefed.social
        link
        fedilink
        English
        arrow-up
        5
        ·
        13 days ago

        alias nano='nano -A -D -E -F -T 4 -Z -g -i -l -m -q -t -% -_' and you need to enable syntax highlighting in nanorc (not all distros enable it by default) include /usr/share/nano/*.nanorc also there are additional/improved rules for highlighting here https://github.com/galenguyer/nano-syntax-highlighting and you can rebind every key, but it seems that it doesn’t support ‘chaining’ of keys nor multiple modifier keys at the same time.

        • 🌞 Alexander Daychilde 🌞@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          13 days ago

          Nice, thanks!

          For anyone wondering about the options: https://i.imgur.com/hAjTxJO.png

          Also, apparently you can create ~/.nanorc and put the following in for those (instead of an alias):

          set smarthome
          set boldtext
          set tabstospaces
          set multibuffer
          set tabsize 4
          set zap
          set showcursor
          set autoindent
          set linenumbers
          set mouse
          set indicator
          set saveonexit
          set stateflags
          set minibar

          I’ll play around with those and the syntax stuff. I definitely personally do not want the saveonexit behaviour, but you’ve started me on the path of looking at the other options, and that right there shows me it’s worth my time to look, so thank you :)

    • UnfortunateShort@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      ·
      edit-2
      14 days ago

      It is insane how far using the same shortcuts literally everything else can get you in the world of terminal text editors and yet here we are

  • perishthethought@piefed.social
    link
    fedilink
    English
    arrow-up
    11
    ·
    14 days ago

    I’m part of the “learned Linux when I got my first raspberry pi” gang, and all Ras pi tutorials tell you to use nano. So yes.

  • rumschlumpel@feddit.org
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    14 days ago

    Big fan of micro. Like nano, it’s non-modal, but unlike nano, it doesn’t need to print its shortcuts on the bottom because everyone already knows most of the shortcuts from almost every GUI editor. And it has inbuilt syntax highlighting and LSP support (TBH it’s a bit much at times, the UI is a bit too intrusive to (by default) complain every time you violate some style guideline).

    Though that’s moot if you don’t have admin privileges on the box you’re working on.

    • palordrolap@fedia.io
      link
      fedilink
      arrow-up
      4
      ·
      14 days ago

      nano -x may be more to your liking then. Or nano -0 if you like being terrified.

      Hints: Ctrl+X still works to quit. Alt-Z and Alt-X toggle the title and the help respectively.

      You can also use the toggles in regular nano to hide one or the other if you’re bothered by them.

      • rumschlumpel@feddit.org
        link
        fedilink
        arrow-up
        5
        ·
        edit-2
        14 days ago

        The UI isn’t the issue with nano, it’s that it needs that kind of UI … you could memorize nano’s shortcuts, but it doesn’t have enough features to justify the effort.

          • Feyd@programming.dev
            link
            fedilink
            arrow-up
            5
            ·
            14 days ago

            It’s not that they want more features - it’s that in micro for instance copy is ctrl+c which everyone already knows, where in nano it’s different

            • palordrolap@fedia.io
              link
              fedilink
              arrow-up
              3
              ·
              14 days ago

              Then you want nano -/ which uses the modern key bindings. They’ve been in nano for a while now.

              For historical reasons, it doesn’t use them by default.

              • Feyd@programming.dev
                link
                fedilink
                arrow-up
                6
                ·
                edit-2
                14 days ago

                Yup they could use nano -/0, or they could just use micro.

                A note: I couldn’t find -/ referenced online easily though when I checked it is indeed there. On Mac nano redirects to pico by default which doesn’t have that either. I think it’s understandable someone would just choose to use micro

                • palordrolap@fedia.io
                  link
                  fedilink
                  arrow-up
                  4
                  ·
                  14 days ago

                  To flog this dead horse just a bit longer, micro is nearly seven times the size of nano, and Apple are clearly doing it wrong. Pointing an old name at a new thing is fine as long as there’s backward compatibility, but a new name at an old thing that doesn’t support the same features is a disservice to the old thing, the new thing and the user.

          • rumschlumpel@feddit.org
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            14 days ago

            Well, micro has syntax highlighting and LSP support, and vim is just really efficient at text editing … though nano’s feature set is honestly fine for what it is, I’d much rather it used well-known shortcuts by default.

            • palordrolap@fedia.io
              link
              fedilink
              arrow-up
              2
              ·
              14 days ago

              Asking nano to use the modern keybinds by default is akin to insisting that Emacs run in evil mode by default. If you really must have it do that, set up a shell alias or put something in your .nanorc.

              Also, nano has syntax highlighting. No LSP though. It’s an editor, not an IDE.

              Maybe that explains the size difference I was talking about elsewhere.