FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Vim commands I reach for when simple edits get complex
NewsDevOps

Vim commands I reach for when simple edits get complex

via Dev.toVimtricks.wiki14h ago

There's a point in most editing sessions where a simple substitution or a quick dd stops being enough. You're mid-refactor, your search history is getting polluted, your macro keeps running past where it should, or you just want to get back to the line you were editing five minutes ago. These are the commands I keep reaching for in those moments. 1) Matching only part of a pattern with \zs and \ze Why it matters The \zs and \ze atoms let you pinpoint which part of a match gets highlighted or replaced — without writing lookaheads or making the regex more complex. The surrounding context still needs to match, but only the portion between \zs and \ze counts as the actual match. " Match the function name only, not the 'function ' keyword before it /\ ( function \s\ + \ ) \zs\ w \ + " Substitute: rename only the value after 'color: ' : %s /color: \zsred/ blue/ g Real scenario You're grepping through a codebase for function definitions and want to rename all functions that follow the pattern

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

The Power of Small Steps
News

The Power of Small Steps

Medium Programming • 48m ago

Stop Overpaying for Inference: The 1B Speech Model That Runs Locally and Outperforms 8B…
News

Stop Overpaying for Inference: The 1B Speech Model That Runs Locally and Outperforms 8B…

Medium Programming • 2h ago

An ode to bzip
News

An ode to bzip

Lobsters • 3h ago

What to Do in Vegas If You’re Here for Business (2026)
News

What to Do in Vegas If You’re Here for Business (2026)

Wired • 3h ago

News

Who is emrebykdr?

Medium Programming • 3h ago

Discover More Articles