Open Menu
AllLocalCommunitiesAbout
lotide
AllLocalCommunitiesAbout
Login

Multi-cursor code editing: An animated introduction

⁨19⁩ ⁨likes⁩

Submitted ⁨⁨3⁩ ⁨days⁩ ago⁩ by ⁨lemmydividebyzero@reddthat.com⁩ to ⁨technology@lemmy.world⁩

https://alexharri.com/blog/multi-cursor-code-editing-animated-introduction

source

Comments

Sort:hotnewtop
  • HyperfocusSurfer@lemmy.dbzer0.com ⁨1⁩ ⁨day⁩ ago

    <C-v>4j:s/element/container/g 🤷

    source
  • raina@sopuli.xyz ⁨3⁩ ⁨days⁩ ago

    In VSCode, you can enable multiple cursors by clicking on the desired positions while holding down Alt/Option. I think they’re enabled by default when making block selections (CBA to remember the modifiers you have to press while drawing a selection with the mouse). And to cover a whole file, first use Find to find the thing you want to change, then hit Alt/Option+Enter to select every instance of the subject string. Now any edit you make will affect every instance.

    source
  • Qubbe@programming.dev ⁨3⁩ ⁨days⁩ ago

    Or Sublime Text

    source
  • 404@lemmy.zip ⁨3⁩ ⁨days⁩ ago

    Or just use an editor built on this concept, like Helix.

    source