Skip to content

Doesn't respect /.editorconfig #238

Description

@divVerent

On systems where I also need to edit files outside my home a lot, I made /.editorconfig a symlink to my homedir's .editorconfig file.

This, however, does not work because of this line in autoload/editorconfig_core/ini.vim:

let l:config_dirname = fnamemodify(a:config_filename, ':p:h') . '/'

The reason is that for /.editorconfig, this produces //.

Changing it to only append the slash if there is none already fixes it:

let l:config_dirname = fnamemodify(a:config_filename, ':p:h:s?/*$?/?')

Not sure if that's the greatest solution, but it definitely is one that works.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions