On 2019-12-20, skywind3000 wrote:
> Obviously, there are project related problems needs to be solved. At least we
> have consensus below:
> 
> 1. use something which seems to have been established as standard.
> 2. which is easy to be implemented by plugins with minimal dependency.
> 
> editorconfig seems like a good choice, but only one thing, there can by
> multiple `.editorconfig` file
> in one project.
> 
> And you need to parse the `.editorconfig` to check if there is a `root = true`
> in it, without actually
> parsing one `.editorconfig` file, the project tree cannot be located. 
> 
> It is not simple to implemented by plugins without introducing new dependency
> (the `EditorConfig` plugin).
> 
> So, let's find some alternatives.
> 
> OK, here is a new one:
> 
>     The vscode's `.vscode` folder
> 
> 1. it can be used for both locating project tree and storing project-specific
> configs, 
> 2. it is well known and nearly a standard.
> 3. it is easy to be implement by plugins respectively without any dependency
> and can also run in old vims.
> 
> how about this ??

Using .vscode would probably work great for users of Visual Studio
Code.  I do almost all my development on Linux, never use Visual
Studio and had to look up what .vscode was.  .vscode is not well
known by other than VSC users.  This is a good example of why and
how plugins are a good solution for this.  VSC users can use
a plugin that looks for .vscode directories; git users can use
a plugin that looks for .git directories; etc.

Another consideration is that some of us use Vim for a lot of little
editing tasks, not just long project editing sessions, and we
wouldn't want it to spend a lot of start-up time determining
whether or not it's in a project environment.

On a more positive note:  A common idea here seems to be looking for
a certain file name in the parent directory of the current file or
above it in the directory hierarchy.  If Vim can do such a search
internally quickly, it might work to have an option that lists the
file names to be searched for and by some notation such as an
appended '!' indicate whether Vim is to stop its search at the first
or last such name found and declare that directory to be the project
directory.  Vim's findir() and findfile() functions already do most
of that work.  That still leaves the problem of using that directory
name to find Vim's configuration for that project.

Someone could try to write a universal project-detection plugin
using these ideas and if it truly is universal, propose that it be
added to Vim's standard plugin set or incorporated into Vim's code
internally.  Until we have such a working model, I think it's
premature to add anything to Vim's internal code.

Regards,
Gary

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20191220185405.GB13464%40phoenix.

Raspunde prin e-mail lui