Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A text object to turn foo_bar_baz into foo_baz *and* quuxSpamEggs into quuxEggs *and* shine your shoes

License

NotificationsYou must be signed in to change notification settings

Julian/vim-textobj-variable-segment

Repository files navigation

A vim plugin providing a single text object (oniv andav) forvariable segments. A variable segment is defined to be a substring inany identifier character followed by an underscore ("snake case") ora lowercase identifier character followed by an uppercase character("camel case").

E.g.:

foo_ba|r_baz    -> civquux -> foo_quux_bazQU|UX_SPAM      -> civLOTS_OF -> LOTS_OF_SPAMeggsAn|dCheese  -> civOr -> eggsOrCheese_privat|e_thing -> civone -> _one_thingfoo_ba|r_baz    -> dav -> foo_bazQU|UX_SPAM      -> dav -> SPAMeggsAn|dCheese  -> dav -> eggsCheese_privat|e_thing -> dav -> _thing

It will also preserve case for small camels when initial segments are deleted(withav):

_g|etJiggyYo   -> dav -> _jiggyYo

Requiresvim-textobj-user.

About

A text object to turn foo_bar_baz into foo_baz *and* quuxSpamEggs into quuxEggs *and* shine your shoes

Topics

Resources

License

Stars

Watchers

Forks

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp