Skip to content

Instantly share code, notes, and snippets.

@kozie
Created February 16, 2015 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kozie/dc9e2f9f893a7a091569 to your computer and use it in GitHub Desktop.
Save kozie/dc9e2f9f893a7a091569 to your computer and use it in GitHub Desktop.
This is what i have now
===========
FirstEntry
SecondEntry
ThirdEntry
Desired result
==============
// Easy way to convert the above list to the following
// switch/case list
switch ($someVar) {
case 'FirstEntry':
break;
case 'SecondEntry':
break;
case 'ThirdEntry':
break;
}
My Attempt
==========
Currently, Clueless. As said before, i would've used mutliple cursors in Sublime Text but
am wondering if VIM has a better way to convert the above from list to code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment