gcmt/psearch.vim — pull request #8 by someboddy (2013-02-28 02:44:37+00:00)
Title: Switched from buffer names to buffer numbers.

I've changed PSearch to identify buffers with numbers instead of names. It made it possible for PSearch to work with buffers that don't have names(like the quickfix list or newly created file-less buffers).

I've also added some tests to make sure that `vim.current.buffer` and `PSearch.view_buffer` will be scanned even if `:bufdo` skips them(because they are unlisted or something), which makes it possible to search in unlisted buffers(like the NERDTree buffer).

Since those changes allow PSearch to search in buffers that are not attached to files, I also changed `PSeach.go_to_selected_match` to use Vim's `:b` command instead of `:e` to go to the buffer that contains the match.

These are not small changes, but now PSearch works with almost any kind of buffer vim has. The only buffer you can't search with PSearch is the opened command-line(accessible by going to the command line or search mode and pressing Ctrl+F) - and that's because vim does not allow you to leave this buffer until you close it.