On Mon, Apr 2, 2012 at 9:04 AM, David Pope <[email protected]> wrote:
> It's not working right. When troubleshooting I found this note at the end
> of editing.txt:
>
> Note that completion for ":find", ":sfind", and ":tabfind" commands do
> not
> currently work with 'path' items that contain a url or use the double
> star
> (/usr/**2) or upward search (;) notations. >
>
> Is the doc accurate? If so, what does that mean for the test?
The doc is (just a teeny bit) inaccurate.
I'm the one who wrote that note, and also the one who submitted the
patch for the :find, :sfind and :tabfind completion, bugs and all :)
For completion, the "/**" path specification is supported. The doc
should be patched like this:
---- 8< ----
diff -r 2cfb68fa26cd runtime/doc/editing.txt
--- a/runtime/doc/editing.txt Wed Mar 28 20:51:51 2012 +0200
+++ b/runtime/doc/editing.txt Tue Apr 03 13:46:19 2012 +0800
@@ -1641,6 +1641,6 @@
Note that completion for ":find", ":sfind", and ":tabfind" commands do not
currently work with 'path' items that contain a url or use the double star
- (/usr/**2) or upward search (;) notations. >
+ with depth limiter (/usr/**2) or upward search (;) notations. >
vim:tw=78:ts=8:ft=help:norl:
---- >8 ----
An example to show differences in behavior between the :find completion
and find command for the /path/**N notation (the former does not support
it while the latter do):
If you had a file:
/in/challenger/deep/JimmyHoffa.txt
And you do:
:set path=/in/**2
:find JimmyHoffa.txt<enter>
will open the file
/in/challenger/deep/JimmyHoffa.txt
while
:set path=/in/**2
:find JimmyHoffa<tab>
will not be able to suggest any completion at all (note the <enter> vs.
<tab> issuance at the end of the :find commands above).
This is because the :find completion uses globpath() to find the
possible candidates and globpath() does not support the depth limiting
**N notation or upward search as documented at the end of ":help
globpath()":
Upwards search and limiting the depth of "**" is not
supported, thus using 'path' will not always work properly.
IIRC, the patch and its corresponding test (test73) as of changeset
1ead15c2ffd0 worked fine on both Linux and Windows 7 x64, using
msvc-vim. I could not remember if I ever tried running the test in mingw
vim and/or DJGPP vim. Which environment did you use to compile vim in? I
might be able to rerun the test in the same environment as yours on my
PC at home and report my findings here.
nazri
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php