DEV Community

Colin Bartlett
Colin Bartlett

Posted on • Edited on • Originally published at vimtricks.substack.com

1

VimTrick: Text case coercion

Tim Pope's Abolish vim plugin provides handy options to coerce strings between a variety of casing, naming, or textual conventions, each with 3 simple keystrokes. For example, an underscored string like employee_name can become EmployeeNameby simply typing crm.

In the chart below, the three keystrokes indicated between the square brackets can coerce a string like SomeLongIdentifier to the result provided:

  • [crs] some_long_identifier
  • [crm] SomeLongIdentifier
  • [crc] someLongIdentifier
  • [cru] SOME_LONG_IDENTIFIER
  • [cr-] some-long-identifier
  • [cr.] some.long.identifier
  • [cr ] some long identifier
  • [crt] Some Long Identifier

We have a short screencast demo and more details on how to use the really useful feature of Abolish over on VimTricks.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay