editorconfig-vim
editorconfig-vim copied to clipboard
editorconfig does not apply to [No Name] buffer
# ~/.editorconfig
[*]
indent_style=space
indent_size=2
$ vim
:set tabstop
tabstop=8
$ vim doesnotexist
:set tabstop
tabstop=2
I'd expect that [*]
also applies for the [No Name]
buffer.
Use-case: I often open vim for notes and decide on the go if it's worth saving or not. My editorconfig should be applied in both cases.
This is due to the limitation of the EditorConfig Core libraries, since a full path must be given. I can also implemented it as a path to "Untitled", then a modification to the EditorConfig core would not be required.
+1 It would be great if there were a fix for this.
Perhaps it would be possible to assume the path of the previously active buffer when creating a new buffer?
+1 This is something I'd like to see as well. It would also make sense to use vim's current working directory as the root path for the [No Name]
buffer to search for the .editorconfig
file. Additionally I often create a new buffer set the filetype do some edits then write the file to disk, it would be awesome to use the filetype to deduce the file extension too.