editorconfig / editorconfig-vim

EditorConfig plugin for Vim
http://editorconfig.org
Other
3.14k stars 139 forks source link

Vim 8 pack structure #67

Closed tasmo closed 4 years ago

tasmo commented 8 years ago

Vim 8 can load plugins now natively. Like described in the packages docs it needs some well placed files to get recognized. Likewise:

Your directory layout would be like this:

start/foobar/plugin/foo.vim          " always loaded, defines commands
start/foobar/plugin/bar.vim          " always loaded, defines commands
start/foobar/autoload/foo.vim        " loaded when foo command used
start/foobar/doc/foo.txt             " help for foo.vim
start/foobar/doc/tags                " help tags
opt/fooextra/plugin/extra.vim        " optional plugin, defines commands
opt/fooextra/autoload/extra.vim      " loaded when extra command used
opt/fooextra/doc/extra.txt           " help for extra.vim
opt/fooextra/doc/tags                " help tags

This allows for the user to do:

mkdir ~/.vim/pack/myfoobar
cd ~/.vim/pack/myfoobar
git clone https://github.com/you/foobar.git
xuhdev commented 8 years ago

That's great! Would you like to make a pull request?

tasmo commented 8 years ago

I'll try to…

k-takata commented 8 years ago

My understanding is that use of start/ or opt/ is a user's choice, not plugin author's. If a user always wants to load a plugin:

mkdir -p ~/.vim/pack/foobar/start
cd ~/.vim/pack/foobar/start
git clone https://github.com/editorconfig/editorconfig-vim.git

If a user wants to load a plugin on demand:

mkdir -p ~/.vim/pack/foobar/opt
cd ~/.vim/pack/foobar/opt
git clone https://github.com/editorconfig/editorconfig-vim.git

And when he want to load it, he should type:

:packadd editorconfig-vim

No need to change the current directory structure of editorconfig-vim.

xuhdev commented 8 years ago

I thought @tasmo meant to update the doc. Am I right?

zakkudo commented 5 years ago

I'm already using this with vim 8 with no changes. What's missing? Is this valid?

sam-github commented 4 years ago

Somewhat valid, the README should describe how use editorconfig-vim with Vim8: https://github.com/editorconfig/editorconfig-vim/pull/134