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
@PeterRincker Whoa thanks for adding documentation for this! The only thing I'm not sure about is whether or not I want to go with findfile() at the moment. The reason is that I'm considering (optionally) making cscope_auto_database_name a list such that either:
Would be valid. In the latter case cscope_auto#locate_database() would perform an upward recursive search and would use the first file found called either .cscope or mycscope.out with preference given to .cscope if both are present in the same directory. As far as I can tell this isn't something I can do with findfile(); for example if we have:
/a/b/.cscope
/a/b/c/mycscope.out
And the base directory is /a/b/c then I'd expect to use /a/b/c/mycscope.out since it occurs earlier in the search order. Using findfile() and iterating over the list provided we'd choose /a/b/.cscope instead without some additional logic to compare the lengths of the paths returned by each name.
My thinking is that this may satisfy most use cases requiring a b:cscope_auto_database_name in that you'd just define all the names that you're interested in using once.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have added the following:
findfile()incscope_auto#locate_database()g:cscope_auto_database_nameorb:cscope_auto_database_name