Skip to content

Instantly share code, notes, and snippets.

@lmullen
Last active August 29, 2015 14:02
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 lmullen/426094d4cac517bbb292 to your computer and use it in GitHub Desktop.
Save lmullen/426094d4cac517bbb292 to your computer and use it in GitHub Desktop.
Add flags in format {TODO: description} or the like to the quickfix list when writing
" Add all flags in the style {TODO: description} or {PAGE} in current document
" to quickfix list
nnoremap <leader>{ :vimgrep /\v\{[A-Z]+(:\_.{-})?\}/gj %<CR>:copen<CR>
" Do the same for all Markdown documents in this directory and subdirectories
nnoremap <leader>} :vimgrep /\v\{[A-Z]+(:\_.{-})?\}/gj ./**/*.md<CR>:copen<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment