13

I always used / preferred Nano over Vi(m) for its simplicity.

But fuck, just because of the simplicity for Vi to be able to find a string and replace it by another via ':%s/string1/string2', I'm feeling like installing Vi everywhere from now on...

Comments
  • 5
    ++ for nano
  • 5
    Isn't vi installed on pretty much any unix-os by default.
  • 1
    @metamourge not when building Docker images, you have to install an editor yourself (and I install nano 100% of the time)
  • 8
    I don't get why some heretics are in favor of nano over vi.
  • 2
    @karasube well tbh the fear of never being able to exit vi (without :!q), and the fact that you have to do <esc> + :wq, sounds complex to a lot of people

    In another hand, you can directly edit your file on nano, and just <ctrl> + X then Y to save a file 😅
  • 2
  • 2
    @irene And then you just press u to revert all the changes.
  • 1
    @irene If you don't check what you have done before saving I would consider that user error, but vi can still cover your ass if you have a simple "set backup" in your config-file. This way vi always has a backup without the changes you just made.
  • 0
    @irene

    No benefit other than preference? You're completely ignoring the unparalleled functionality and feature set of vi(m). Whenever I accidentally open nano (as it is the default editor on Debian-family distributions after initial install) it feels like I've been pulled back in time to the '90s, when I used pico to edit html files in my user's ~/public_html dir. It's basically notepad on the command line. WYSIWYG. No code folding, syntax highlighting, internal clipboards, or any of a thousand other brilliant features.

    You're not making a reasoned argument. I can totally respect someone for choosing emacs over vi(m), but nano is a knife in a gun fight.
  • 0
    @irene

    I didn't have to include it. It's in the OP.
  • 1
    I used to praise nano too, but holy crap have I fallen in love with it. I'm working a lot with docker, hence I spend a lot of time in config files. Takes a few days to get used to vim, but once you do, it's heaven on earth. All the shortcuts, clipboard, the fact that you can out a number before each shortcut, and it'll repeat the shortcut that amount of times. But the best of it all, I can mark and copy something, and I never have to touch the mouse. Admittedly I haven't researched it, but I haven't heard of nano being able to do that
  • 0
    When I need a standard editor, I learn ed. Ed is the standard editor (source?) And it works fine for smaller changes and linear editing (like: you start typing and write 10 paragraphs or so). I'm a vim user btw
  • 1
    No need to open vim:
    $ sed s/string/substitution/[g]

    But, congrats 👍. Spending an afternoon a week studying a different feature of vim is well worth the investment.
  • 2
    nano 4theWin!

    ctrl + \

    type the string to replace

    type the new string

    a + Enter

    all done
Add Comment