Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been using the notes.vim plugin to manage my notes, and I've been tagging them by making the second line in the text file have a list of tags prefixed with the @ symbol. One of my note files looks like this:


@psychology @psychologists @people

Freud was one of the first psychoanalyists... Lorem ipsum

Where the first line is the title (automatically renames the text file in notes.vim) and the second line is a list of tags.

How can I automatically generate lists of files that contain these tags? I want to, say, find a list of files that contain @psychology. I've read a little bit about ctags and exuberant ctags, but as a non-programmer I don't really understand what any of it means, or how to tell vim where my tags are.

share|improve this question
up vote 1 down vote accepted

Ok, I think I figured it out. I added a mapping to run a vimgrep on all files in my notes directory and subdirectories, according to this article:

map <F4> :execute "vimgrep /" . expand("<cword>") . "/j **" <Bar> cw<CR>

So now I just position my cursor above a tag and press F4 to get a list of other files that contain this tag. Not bad.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .