editorconfig / editorconfig-vim

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

Follow symlinks for files #123

Closed adriansm closed 5 years ago

adriansm commented 5 years ago

When linking files, the final file may be somewhere else where there may be an .editorconfig file.

Example: ~/.gitconfig -> ~/dotfiles/git/config

By following symlinks, in this example the .editorconfig can remain at ~/dotfiles/git/.editorconfig

cxw42 commented 5 years ago

Thanks for the contribution! I think this needs a specification discussion. Where the .editorconfig files are located should be consistent across editors. I'll ask around.

xuhdev commented 5 years ago

I don't think we should follow symlinks in the Vim, as this is consistently not followed in other core libraries. In your case, my suggestion is to add a quick file list in Vim so that you can quickly let Vim open these files directly, instead of vim /path/to/symlink.

adriansm commented 5 years ago

This can also be solved with something like: https://stackoverflow.com/questions/30791692/make-vim-follow-symlinks-when-opening-files-from-command-line

However it seems more obvious to me to allow files to follow editorconfig options from the real location of file. That being said, agree that this should be consistent across editors

xuhdev commented 5 years ago

There are pros and cons for either approach. Thanks for your contribution and will close this now for the sake of consistency.