Skip to content

Instantly share code, notes, and snippets.

@guyhughes
Last active August 29, 2015 14:00
Show Gist options
  • Save guyhughes/ba7894fdff922fdc306b to your computer and use it in GitHub Desktop.
Save guyhughes/ba7894fdff922fdc306b to your computer and use it in GitHub Desktop.
Vim regex substitue double quotes for literals in array initalization.
:'<,'>s:\v(.*)(\[)(\")(.*)(\")(\])(.*):\1\2\'\4\'\6\7

Gets rid of double quotes in block of array initialization. Useful for shell scripts, where interpreters expand double-quoted strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment