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

  • dparticiple@sh.itjust.works
    link
    fedilink
    arrow-up
    13
    ·
    edit-2
    5 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
    3
    ·
    9 hours ago

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

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

  • SocialistVibes01@lemmy.mlOP
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    11 hours ago

    I realized that I’d forgotten about pico and joe, the latter was my very first text editor (hated it!).

  • brax@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    ·
    11 hours ago

    Neovim. One time I accidentally opened nano and couldn’t figure out how to get out of it… Wtf is with those keybinds?

    Lol at emacs not even being on your list. Suck it, emacs users 😂😂❤️

  • L_Acacia@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    11 hours ago

    Vim/neovim if you are willing to take the time to learn how to use / config it.

    Micro otherwise, very sensible keybinds and ux that map to modern gui apps, though it doesn’t come installed in most distro unlike ed and nano.

  • iByteABit@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    12 hours ago

    I used to use Neovim but now I mainly use Helix, it’s really good by default, the most hassle is usually just looking up an LSP for a language and installing it.

    My config file literally only has the theme I use, unlike the heavy configs I’d have to make so that vim/nvim are the way I want. I also like the multiple cursor approach it has to editing.

    • Clay_pidgin@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 hours ago

      I also like the multiple cursor approach it has to editing.

      You do!? I cannot STAND it! Am I using it wrong? C to add another cursor on the line below but only if it already has a character in that column. It seems strictly worse than VIM’s visual line selection with V.