Changing from a distro that defaults to nano to another that defaults to vim… What to do other than installing nano and changing visudo?

  • solrize@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    48 minutes ago

    “Why are we running from the police, Dad?”

    “Because they use vim, son. We use Emacs”.

    • corsicanguppy@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 hours ago

      …but only to mod the repo config to install emacs-nox. After that having seen the resource usage is the same as vi just use what’s most versatile.

  • juipeltje@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 hours ago

    If we’re talking purely something basic to be able to edit some shit on the system i think i would choose nano, purely because i’ve used it for years to edit everything (yes, even config files in full programming languages lol) and thus i’m very familiar with it. If we’re talking anything terminal-based in general, i like helix as a modal editor. I chose it over neovim at the time because i didn’t feel like configuring the whole thing, and helix is pretty much ready to go with lsp and everything ootb. A few weeks ago though i decided to make the switch to emacs, since i use guix now, so it felt like a natural fit. I might check out emacs in the terminal at some point, but i’m sticking with the gui for now.

  • dparticiple@sh.itjust.works
    link
    fedilink
    arrow-up
    20
    ·
    edit-2
    4 hours ago

    At the risk of restarting the Editor wars (https://en.wikipedia.org/wiki/Editor_war) from days of yore, I find it interesting that emacs wasn’t even in your list of contenders. I hear it mentioned less frequently these days, so perhaps it’s going by the wayside?

    For the record, I’m a vi/vim user! I had the privilege of being taught to use it by an RFC-writing greybeard decades ago, and have used it without thinking ever since.

    For those who find themselves on a machine with only vi/vim, or want to learn, here’s a quick primer when editing a file (usually done by typing “vi foo.txt” in a shell) –

    :q! …Force quit vi (:q also works – gentler!)

    :wq! …Save file and quit vi

    i (then type characters) …insert text at current position

    A (then type characters) …Insert at end of current line

    G …go to first character of last line in the file

    /foo …search for first occurrence of “foo” in the file (hit / again to find additional instances)

    x …Delete character under cursor

    :56 …Go to line 56

    yy …Copy the line the cursor is currently on into the buffer

    p … Paste the buffer

    r (then type character) …Replace character under cursor

    u …undo (hit multiple times to undo prior actions)

    Second nature after a bit of practice! I used to work with a guy who insisted on using ed. That was… odd.

    • Ŝan • 𐑖ƨɤ@piefed.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 hour ago

      I generally install boþ if I can, too, because helix still has no equivalent for vim -d. Diffs are þe only reason I run vi(m) anymore.

    • shark@lemmy.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 hours ago

      This is the way. I love Helix, it’s the online editor I have installed on my Arch Linux install. On my Alpine computer I use for writing I have Helix and Vi.