torbiak / probe Goto Github PK
View Code? Open in Web Editor NEWPure VimL fuzzy file finder for vim.
License: MIT License
Pure VimL fuzzy file finder for vim.
License: MIT License
"If no mappings to the probe file and buffer finder commands aren't already
defined, the following will be:"
WHAT?!?!
Do it like this: garybernhardt/selecta#30 (comment)
I recently discovered this plugin and so far I'm very impressed.
To date I've been using PeepOpen and one of its nice features is its incorporation of file modification time into the scoring. In other words recently saved files float to the top of the results.
Would it be possible to do something similar with probe?
I might need to use the "script" modifier on probe's bindings.
Instead of refreshing in a little window in the bottom of the screen, it takes over my screen and writes all it's output into my current buffer.
For some background, I started using vim tabs to separate projects that i am working (eg: tab A is for project Foo, in ~/git/foo
, tab B contains windows for project Bar, in ~/git/bar
). I set the working directory for each project using :tcd
)
This works well, but I noticed that whenever I used probe
, it would for some reason clobber the tab-specific working directory with the working directory of whatever tab I called :Probe
from.
I think I tracked it down to this bit of code:
function! probe#restore_vim_state()
cal s:restore_options()
let @" = s:unnamed_register
let @/ = s:last_pattern
if s:orig_working_dir != ''
exe printf('cd %s', s:orig_working_dir)
endif
It uses cd
, and i think ideally it should use tcd
, although I don't actually know enough to say whether or not that would break anyone elses workflow...
Thoughts?
Personally I'd expect them to be scanned, although apparently I never search for them since it took years to notice this.
It looks like probe has 'open in split' and 'open in vsplit', but it would be nice if there was an 'open in new tab' functionality.
my vote would be to have it mapped
After I invoke probe for the first time in a project, it scans everything for a while and then is able to recall any of those files.
However, for example, after that I create a new file (include/chimerae.mk), make git track it, the whole shebang.
Even after I relaunch Vim, invoking :Probe and typing in "chim", I get nothing.
Ubuntu 12.04 (yeah...), Vim 7.3.
When I run :Probe
outside of a vcs repository (but under my home directory) it ends up scanning everything under ~/
instead of just under my current working directory (like i would have expected).
After some digging, it looks like this is because I have file (/home/ryan/.bzr.log
) that is accidentally getting matched against metadir_pattern
( \v/\.(git|hg|svn|bzr)>
).
If i understand vim patterns (which i don't), >
matches the end of a word, which doesn't include periods
I made the following change that seems to work:
diff --git a/autoload/probe/file.vim b/autoload/probe/file.vim
index 5c43a7e..e6aeba8 100644
--- a/autoload/probe/file.vim
+++ b/autoload/probe/file.vim
@@ -138,7 +138,7 @@ function! s:cache_filepath()
endfunction
function! s:find_metadir()
- let metadir_pattern = '\v/\.(git|hg|svn|bzr)>'
+ let metadir_pattern = '\v/\.(git|hg|svn|bzr)\n'
let orig_dir = getcwd()
let dir = orig_dir
while 1
I'd submit this as a pull request if i was more confident that this change doesn't break something else...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.