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

  • JustEnoughDucks@slrpnk.net
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    17 hours ago

    Been using it (not often beyond basics for home server container administration) for years but I always get confused with searching vs search and replace vs global search

    /<search> (n for next instances)

    :%s/<search>/<replace>

    :g/<search>/p (grep was named after this one IIRC, Global Regular Expression Print)

    And often I just use :%s to search and highlight all instances and don’t press enter because I forget the others and I often have to search and replace for docker comppse snippets.