DEV Community

Jerry
Jerry

Posted on

3

Fastest swap of JS syntax using vim macros ⚡️

What are Vim Macros ?

Vim macros basically lets you record commands that you run on your editor.

Then at a later time, you can replay them on one line or multiple lines.

It’s one of them tools that super charges your productivity ⚡️

Example

Here is an example of a macro that I use pretty frequently.

It’s a macro to swap between named function and arrow function syntax in Javascript.

Sometimes one style is preferred over the other... It happens 😁

With this little vim macro, its a breeze.

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs