Skip to content

Instantly share code, notes, and snippets.

@underhilllabs
Created May 21, 2012 02:08
Show Gist options
  • Select an option

  • Save underhilllabs/2760274 to your computer and use it in GitHub Desktop.

Select an option

Save underhilllabs/2760274 to your computer and use it in GitHub Desktop.
Vim Regular Expressions to Remember

vim substitutions

add two newlines to any quotation that should end a paragaph

%s/\[.?!]”/.”\r\r/

Surround Chapters with

%s/CHAPTER \(\(w*\).*\)/<h1>CHAPTER \1<\/h1>/

For converting code blocks to Jekyll

%s/<pre class=example>/{% highlight bash %}/g

generic switch code/pre to pygment form

:%s/<pre><code>/{% highlight bash %}/g

:%s/</code></pre>/{% endhighlight %}/g

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