14 votes

Fedora approves of making Nano the default terminal text editor

23 comments

  1. [18]
    knocklessmonster
    Link
    That's a nice change. I like VIM (switched to nvim), and tolerate vi, but it just feels janky to me. Nano is far easier if you just need to go deep and tweak a file, though, and don't care about...

    That's a nice change. I like VIM (switched to nvim), and tolerate vi, but it just feels janky to me. Nano is far easier if you just need to go deep and tweak a file, though, and don't care about your editor.

    12 votes
    1. [11]
      Silbern
      Link Parent
      I wouldn't say it's easier, though it's certainly more approachable. Once you learn a few basic vim commands (A, :wq, i, I, /, :set number, :(insert line number to instantly jump to it) ), vim...

      I wouldn't say it's easier, though it's certainly more approachable. Once you learn a few basic vim commands (A, :wq, i, I, /, :set number, :(insert line number to instantly jump to it) ), vim makes it really fast to edit a config. A lot of times, all that you want to do is to quickly change a value somewhere, and with vim, you can literally pop open the file, type /value_I_need, press enter, type "A" to jump to the end of the line, backspace away the old value, type in the new one, press ESC, :wq, and done. Given a line number instead? No problem, just replace / with :line_number_here.

      Nano's a lot clunkier in this regard, and especially since it uses non-standard keybindings, I always find myself needing to find them at the bottom. It's certainly nice that you can easily discover nano's functionality though, vim's big weakness is that it's nearly impossible to use without prior knowledge of how it works.

      11 votes
      1. [7]
        feigneddork
        Link Parent
        The problem that I found was that even after years of using vim I still had to remember these keyboard shortcuts and vim entries. Not only that, but with the whole read mode/write mode, often I'd...

        The problem that I found was that even after years of using vim I still had to remember these keyboard shortcuts and vim entries. Not only that, but with the whole read mode/write mode, often I'd type something only to have half of that sentence written because I forgot to put it in insert mode, and other times I'd get ":wq" in my files because I forgot to escape.

        With nano, it may not have more direct shortcuts, but what it lacks in flexibility it makes up in simplicity. I personally have a coffee test where certain things I do require a cup of coffee but other things I must be able to do without having a cup of coffee first, and I would put editing a text file in a terminal in that category.

        But again, that is just me and everyone should use the tools that they feel comfortable with and which gives them the best mileage.

        5 votes
        1. [5]
          Artemix
          Link Parent
          An issue I found with default vim (or neovim, in my case) configuration is the indent in copy/paste. When I open a file to paste a blob of 300+ lines, usually the auto-indent mechanism kicks in...

          An issue I found with default vim (or neovim, in my case) configuration is the indent in copy/paste.

          When I open a file to paste a blob of 300+ lines, usually the auto-indent mechanism kicks in anyways and completely fucks up indentation (i.e. adding ton of extra indent on every line), which is annoying as hell.

          I haven't been bothered to look up the right config. setting on internet though, I usually just open Nano, which works just fine for this need.

          3 votes
          1. just_a_salmon
            Link Parent
            “:set paste” is what you’re looking for.

            “:set paste” is what you’re looking for.

            11 votes
          2. whbboyd
            Link Parent
            :set noai (for "AutoIndent"). I typically leave autoindent on and turn it off when pasting, but you could add that command to your vimrc to have it default to off.

            :set noai (for "AutoIndent"). I typically leave autoindent on and turn it off when pasting, but you could add that command to your vimrc to have it default to off.

            4 votes
          3. byron
            Link Parent
            With Vim8 and, I think NeoVim, you can use "ctrl-shift-v" or whatever you have for X paste while in normal mode and it will not do any auto-indenting. You also have long been able to do "+p to...

            With Vim8 and, I think NeoVim, you can use "ctrl-shift-v" or whatever you have for X paste while in normal mode and it will not do any auto-indenting.

            You also have long been able to do "+p to paste in normal mode from the X copy buffer (or "*p to paste the selection), in case this helps.

            2 votes
          4. Moonchild
            Link Parent
            I usually prefer cat > file or cat >> file (or even xsel -o >> file).

            I usually prefer cat > file or cat >> file (or even xsel -o >> file).

        2. babypuncher
          Link Parent
          I might find Vim worth learning if I was stuck in a terminal all day every day. But it's 2020. Desktop environments have come a long way since the Xerox Alto, and probably aren't going away...

          I might find Vim worth learning if I was stuck in a terminal all day every day.

          But it's 2020. Desktop environments have come a long way since the Xerox Alto, and probably aren't going away anytime soon. I have fancy GUI text editors like Sublime and VSCode which I use all day. They are highly extensible and incredibly powerful.

          I don't want to to learn how an entirely new universe works just for the one or two times a month I need to edit something from a terminal. Nano is more than adequate for that. I find it mildly annoying when I ssh into a new Linux VM for whatever project I'm working on and it doesn't have an easy to use text editor out of the box.

          3 votes
      2. knocklessmonster
        Link Parent
        I specified the situation where it is easier, and would argue any serious vim user, especially any serious vi user, would be able to change the default quickly, so it's a non-issue. If you're...

        I specified the situation where it is easier, and would argue any serious vim user, especially any serious vi user, would be able to change the default quickly, so it's a non-issue. If you're doing any serious editing, vim would definitely be better.

        If you don't know vim, it will take longer to get out than it would to make a short config tweak because you 1) need to know there are modes, 2) need to know how to change modes, and 3) need to know there's a command line and how to save/exit with it.

        5 votes
      3. Moonchild
        Link Parent
        I prefer (number)G. Gotta save those keystrokes! (Also consistent with plain G, to jump to the last line.)

        :(insert line number to instantly jump to it)

        I prefer (number)G. Gotta save those keystrokes! (Also consistent with plain G, to jump to the last line.)

        2 votes
      4. babypuncher
        Link Parent
        Approchable is the key. The core apps that ship with an OS should not require the user to read a manual to access their most basic functionality. By the time users "out-grow" the built in apps,...

        Approchable is the key. The core apps that ship with an OS should not require the user to read a manual to access their most basic functionality. By the time users "out-grow" the built in apps, installing better replacements should be trivial for them.

        2 votes
    2. [5]
      mrbig
      Link Parent
      Nano keybindings are not common knowledge either. If you’re trying to appease a hypothetical non technical user, something that followed CUA might be preferable, no?

      Nano keybindings are not common knowledge either. If you’re trying to appease a hypothetical non technical user, something that followed CUA might be preferable, no?

      5 votes
      1. [3]
        archevel
        Link Parent
        I think a major difference for a new user is that nano keeps the basic keybindings visible on screen. It is also more capable than I first thought with support for syntax highlighting etc.

        I think a major difference for a new user is that nano keeps the basic keybindings visible on screen. It is also more capable than I first thought with support for syntax highlighting etc.

        14 votes
        1. 666
          Link Parent
          And if the default syntax highlighting is not enough you have this: https://github.com/scopatz/nanorc (I use it everywhere I install nano).

          It is also more capable than I first thought with support for syntax highlighting etc.

          And if the default syntax highlighting is not enough you have this: https://github.com/scopatz/nanorc (I use it everywhere I install nano).

          2 votes
        2. mrbig
          Link Parent
          Yeah nano is definitely better than Vim in that regard.

          Yeah nano is definitely better than Vim in that regard.

      2. knocklessmonster
        Link Parent
        It tells you basic key commands at the bottom of the window. vi/vim just drops you into a terminal, and you need to understand that it has modes and a command line to do anything.

        It tells you basic key commands at the bottom of the window. vi/vim just drops you into a terminal, and you need to understand that it has modes and a command line to do anything.

        6 votes
    3. babypuncher
      Link Parent
      Absolutely. Software bundled with an OS should be simple and straightforward. Easy to figure out without a manual is an important factor. There's nothing stopping those of us who want something...

      Absolutely. Software bundled with an OS should be simple and straightforward. Easy to figure out without a manual is an important factor. There's nothing stopping those of us who want something more powerful (and more complicated) from installing something else.

      2 votes
  2. whbboyd
    Link
    I see no problem with this change, even though I'm primarily a Vim user and have never intentionally used Nano outside of having Ubuntu default to it on brand-new installs. Vi is quite powerful,...

    I see no problem with this change, even though I'm primarily a Vim user and have never intentionally used Nano outside of having Ubuntu default to it on brand-new installs. Vi is quite powerful, but very unfriendly to new users, and basically anyone with enough Unix experience to be comfortable with Vi will know how to change their default editor.

    7 votes
  3. zoid
    Link
    This seems like an odd choice, it would completely make sense on Ubuntu or Mint, but Fedora really isn't aimed at new *NIX users. Sure it's not Arch or Gentoo, but Fedora is really aimed at the...

    This seems like an odd choice, it would completely make sense on Ubuntu or Mint, but Fedora really isn't aimed at new *NIX users. Sure it's not Arch or Gentoo, but Fedora is really aimed at the power user.

    2 votes
  4. [3]
    annadane
    Link
    Use Ed, man!

    Use Ed, man!

    3 votes
    1. Soptik
      Link Parent
      I guess you should've added a link :)

      I guess you should've added a link :)

      1 vote