wincent / command-t

⌨️ Fast file navigation for Neovim and Vim
BSD 2-Clause "Simplified" License
2.74k stars 317 forks source link

As a user I would like to be able to configure Command-T to use Vim's default path #331

Closed 99arobe closed 2 years ago

99arobe commented 6 years ago

From the docs I can see that when a user invokes :CommandT:

the project directory is determined according to the value of the |g:CommandTTraverseSCM| setting, which defaults to the SCM root of the current file

In order to modify this, a user can change either i) the options for the g:CommandTTraverseSCM setting or ii) invoke :CommandT with a path as an argument like this:

:CommandT ../path/to/other/files

Vim also has a built in path variable. The setting for this can be viewed using:

:set path?

The :find command can take a filename as an argument and it will then search for this file based on Vim's path setting. For example, if Vim's path variable was set to:

path=/fruits/apple,/drinks/water

then the find command will search through both the /fruits/apple and the /drinks/water directories without having to specify them as additional arguments to the find command. For example:

find foo.txt

will search in both the /fruits/apple and the /drinks/water directories.

Is there a way to change Command-T's settings to use Vim's path variable instead of trying to find the relevant directory by traversing the current files path for a SCM setup?

Alternatively, is there a way to specify multiple paths to invoke Command-T with?

wincent commented 2 years ago

Given the big rewrite for v6.0.x, I'm closing all older issues as there is unlikely to be anything significant happening on the 5-x-devel branch from here on[^patches]. Feedback issue for 6.0.x is here:

[^patches]: Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.