Hacker News new | past | comments | ask | show | jobs | submit login

Vim users, don't forget the essential ack.vim: http://www.vim.org/scripts/script.php?script_id=2572



Vim users, don't forget the included vimgrep. It greps your file. But the nice thing is, it puts the results in the quickfix window (where your compiler errors go, for example).

I keep a project log file in restructured text. My entry headers look like this:

  2013.03.17 Sunday, Set up base box
  ==================================
When you filter that file with rst2html, your output file can have a table of contents, but not your source file where you probably spend more time.

Use vimgrep to find all your headers:

  :vimgrep /^20[0-9][0-9]/gj %
Nothing happens, but the result is in the quickfix window.

  :copen
And now you have a second window with entries like the following:

  log.rst|1559 col 1| 2013.03.17 Sunday, Set up base box
  log.rst|1624 col 1| 2013.03.14 Thursday, configured widgets
In the quickfix window, enter on any line and it brings you back to the main window, at that location.

  :help vimgrep
  :help quickfix
  :help copen
  :help cc
  :help cn




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: