Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lstor/dd97a8aa7502c214c72a to your computer and use it in GitHub Desktop.
Save lstor/dd97a8aa7502c214c72a to your computer and use it in GitHub Desktop.
Vim regex examples
/^+[^+].*\zsbacon
; Explanation:
; / <- start search
; ^+ <- has a + at the beginning of the line
; [^+] <- does not have another + after that (avoid +++-lines)
; .* <- match anything up until...
; \zs <- start highlighted area (match)
; bacon <- what we're actually looking for
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment