• Stitch0815@feddit.org
    link
    fedilink
    arrow-up
    1
    ·
    4 hours ago

    My most used commands are also just the classics

    cw - delete the next word amd enter insert mode

    dd - delete line

    gg - go to first line

    G - go to last line

    :s/searchphrase/replacephrase - search and replace

    And a couple of visual mode commands do cut and paste blocks or comment out blocks of code

    • GiveOver@feddit.uk
      link
      fedilink
      arrow-up
      2
      ·
      3 hours ago

      To build on cw:

      ciw works when the cursor is anywhere in the word

      ci( to delete everything between brackets and enter insert mode. Also ci" ciW or whatever