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

  • ironbeak@lemmy.ca
    link
    fedilink
    arrow-up
    3
    ·
    2 hours ago

    Used to be vim back in the day, neovim with a few lsp plugins — hated the convoluted collection of config scripts — then into vis (modernized vim/sam hybrid) but now settled on helix. After a small adjust for some finger memory, I wouldn’t go back. A lot of quality of life features out of the box.

    I just a modal editor that just works with some quality of life features as codebases I worked on grew in complexity.

  • BradleyUffner@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    6 hours ago

    Nano, because it’s the only one I can remember how to quit from without power cycling the computer.

    • CarrotsHaveEars@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      No only OP provided almost no discussion value in the post body, but also this topic has been discussed one million times and nothing more can be talked about.

  • SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    10 hours ago

    Emacs.

    With all the vimmery going around nowadays though, I feel like I’m on the losing team. ;_;

  • dparticiple@sh.itjust.works
    link
    fedilink
    arrow-up
    32
    ·
    edit-2
    7 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)

    When done with a command like this, hit Esc to go back into normal mode.

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

  • solrize@lemmy.ml
    link
    fedilink
    arrow-up
    7
    ·
    11 hours ago

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

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

  • Levi@lemmy.ca
    link
    fedilink
    English
    arrow-up
    54
    ·
    16 hours ago

    Team Vim. Because I learned the vim basics once 20 years ago and never bothered to learn after that. :D

    • HeHoXa@lemmy.zip
      link
      fedilink
      arrow-up
      7
      ·
      13 hours ago

      Vim sorely underrated. Great tools/hotkeys. Felt like a master pianist clacking away while the terminal went berserk until suddenly the 2 hour job was done in 20 minutes.

      • azimir@lemmy.ml
        link
        fedilink
        arrow-up
        6
        ·
        10 hours ago

        That’s what I was taught at my first tech internship. It’s all they had on the UNIX system running the webserver in 1998.

        I did write some web pages the pulled live data from the backend. I had the pleasure of writing them in C. I got the data binding to some kind of CORBA system using extern variables that were bound at compile time. All of the html (no js or css yet) was hand built and generated from the C code.

        vi was the only editor on the system and there was no way to use arrow keys (the UNIX system didn’t have them on the keyboard at all).

        I also had the displeasure of building a backup system on a floppy where I had to write a bat script that could manually load a token ring driver, bind a SMB share, load Ghost backup software and backup the local hard drive at under 2mb (yay coax thicknet). The tool used to query and write through the hostname for the backup? Copycon. Fucking copycon in DOS. That showed me how a terrible (but working) tool could be to work with.

        Unless an editor can do reasonable vim emulation, I can’t take it seriously. You’re welcome to use it, but I won’t be able to get anything done in it quickly. The vi keys are too ground into my reflexes.

    • corsicanguppy@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 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.

  • SayCyberOnceMore@feddit.uk
    link
    fedilink
    English
    arrow-up
    4
    ·
    10 hours ago

    Just echo text to create a new file or use sed and awk to edit an existing file.

    In reality, I use nano for edits and vimdiff for comparing files (usually a .pacnew after an update on a headless device)

    • Anna@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      6 hours ago

      Atleast be a neckbeard and use cat the way neckbeard Gods intended \s