Closed michaelavila closed 9 years ago
Do you find that buffers are still useful with Selecta? I never use any buffer management commands any more; I just use Selecta (on files) for everything.
For this PR specifically: I'm not sure that adding this example to the README clarifies anything extra beyond the existing examples.
The primary benefit is that selecting files restricts selecta to choose things that are under our current directory. I often have files or other documentation open in vim from other parts of my machine, which I can access through the buffer system. You can't do that with the basic file selecta. The other benefit is that when you're working on a project with a lot of files, the buffer list is easier to selecta from since it's what you've been recently working on.
Buffers are invaluable for these two reasons (IMHO)
The other benefit of this particular example (IMHO) is that it shows you how to selecta VIM objects instead of things available from the command line, but maybe that's not interesting (I had to figure it out myself).
Once I was able to selecta vim objects, I quickly added history for instance: https://github.com/michaelavila/selecta.vim/blob/master/plugin/selecta.vim#L34-L37
The primary benefit is that selecting files restricts selecta to choose things that are under our current directory.
+1 on this. And I'm loving the plugin @michaelavila. Anytime I can get something into VIM with my plugin manager rather than copy+pasting from a README into my .vimrc
is a win.
OK, let's add it. I made a couple comments. Your selecta.vim should probably be moved into the repo at some point, too.
Rebased and merged, thanks!
There's probably a better way to do this, but I at least wanted to start the conversation. Here's what I have so far. The code is pretty self-explanatory and leverages the existing SelectaCommand. It works well so far.
Until you have a vim plugin I can use, I've started collecting these in my own: https://github.com/michaelavila/selecta.vim
I don't know if anyone else will find this valuable, but I use buffers and selecta heavily. I'm happy to have selecta to make the experience better.