You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I opened a file in a distant subdirectory today without cding into it:
cd
vim Code/example-project/src/example-package/file.py
and :AnyJump hung in a way that was difficult to exit. I presume this is because it was running the search from ~/ instead of looking specifically within subdirectories? I imagine there could be some bit of optimization made where it could recursively look in directories back from the current file path. e.g. from the example above, searching in the order:
Alternatively, we could limit the search area to only files in the current buffer's codebase.
We can do this by traveling up the directory tree, starting from %:p:h and ending with /, looking for "project root marker" files, e.g. .git, .svn, .root, _darcs, etc. Then once we find the root directory for the project, recursively search only that directory.
If no root markers are found, then it's not a codebase and shouldn't be searched (or only search the directory containing the file associated to the buffer).
I opened a file in a distant subdirectory today without
cd
ing into it:and
:AnyJump
hung in a way that was difficult to exit. I presume this is because it was running the search from~/
instead of looking specifically within subdirectories? I imagine there could be some bit of optimization made where it could recursively look in directories back from the current file path. e.g. from the example above, searching in the order:Combined with a max timeout or similar, this would mitigate the issue I think?
The text was updated successfully, but these errors were encountered: