Born in the early eighties, French nerd, anti-fascist, woke bloke and usually friendly.

  • 0 Posts
  • 21 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle












  • mekkagodzilla@lemmy.worldtoLinux@lemmy.worldVim Shortcuts
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I use vim macros all the time. For example, you have a bunch of lines that need the same 3 operations done:

    • insert " at the beginning of the line
    • insert ", at the end on the line
    • indent

    Press qa, do what you need to do on one line and go one line below, press q again to stop recording the macro, then you can do it 50 times with 50@a.