Coder Social home page Coder Social logo

vim-editorconfig's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-editorconfig's Issues

Path is not relative to root .editorconfig

Let's say the root directory name is test. This is minimal test/.editorconfig:

root = true

[test/foo.rb]
trim_trailing_whitespace = true

Open test/foo.rb, and try to save with trailing whitespace.

Since test is the root, trimming should be applied only to test/test/foo.rb, but test/foo.rb is also affected now.

Thank you!

Thanks for making this! First I tried the official vim plugin but could not get it to work with neovim. Just found this plugin and it works flawlessly.

unsupported value insert_final_newline=true

Using below configuration, I get unsupported value warning:

root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.sh]
indent_size = 4
insert_final_newline#execute[2]..<SNR>98_bool:
line    6:
editroconfig: unsupported value: insert_final_newline=true 

Documentation says insert_final_newline is supported. Any ideas ?

Also, VIM version I use is 8.0.86

Hiden config files are not found by local_vimrc

When I have this .editorconfig file:

[*.rst]
local_vimrc = .config.vim

Values from the file .config.vim are not loaded. When I rename the file (and fix the value in .editorconfig, of course) to config.vim, everything works. Exactly the example from README (using .local.vimrc) doesn’t work for me. Using vim8-1290 on RHEL-7.

Wishlist for new property support

I like the fact that this bundle just uses vimscript and doesn't require python. I've been using it for my personal editorconfig needs and it's been working well. This issue isn't a bug report, but a vote for new features when anyone has some time to add them.

I recently started working on a project which comes with a more specific editorconfig, and this plugin doesn't recognize some properties the maintainers want to use:

editorconfig: Unsupported property: spaces_around_brackets 
editorconfig: Unsupported property: spaces_around_operators 
editorconfig: Unsupported property: indent_brace_style

I'm having to use a different editorconfig plugin while I'm working on this project so I don't get the warnings every time I open a file, and so I can get the formatting right and not get yelled at when I send a pull request. Adding support for these properties would enable me to use this plugin for my editorconfig for all the projects I work on.

Thanks!

Rules defined for filenames with a leading . are not loaded

Rules defined for filenames with a leading . are not loaded up by the plugin.

My .editorconfig:

[*]
indent_size = 2
tab_width = 2

[.vimrc]
indent_size = 4
tab_width = 4

When I edit my .vimrc file, and run verbose set shiftwidth I get the following:

  shiftwidth=2
        Last set from ~/my-env/dotfiles/.vim/pack/bundle/start/vim-editorconfig/autoload/editorconfig/indent_size.vim line 16

With the following .editorconfig instead (no more .):

[*]
indent_size = 2
tab_width = 2

[vimrc]
indent_size = 4
tab_width = 4

settings are loaded up just fine:

  shiftwidth=4
        Last set from ~/my-env/dotfiles/.vim/pack/bundle/start/vim-editorconfig/autoload/editorconfig/indent_size.vim line 16

Is this expected?

The claim on README.md is no longer true (editorconfig-vim requires if_python interface or external python interpreter.)

In your README.md you have the following claim

editorconfig-vim is official vim plugin for EditorConfig. This requires if_python interface or external python interpreter.

As of May 21, 2019 this is no longer true. See here.

In the wake of this development, can you

  • Please update the README.md suitably
  • Offer a fresh comparison between your plugin and the official one to help out new users

Don't run on certain buffer types

Is there an option to disable editorconfig based on the buffer type?
E.g. I use lambdalisue/vim-gita and it creates special buffers (:Gita blame)
The buffers have the filename gita:something, like how fugitive uses fugitive://

With the official editorconfig-vim I can do this:

  let g:EditorConfig_exclude_patterns = [
        \   'fugitive://.*',
        \   'gita:.*',
        \   'scp://.*',
        \ ]

tab_width should default to indent_size

If you have just

indent_style = tab
indent_size = 4

Then you end up with shiftwidth=4 but tabstop stays as what it was (in my case 2)

http://editorconfig.org:

tab_width: a whole number defining the number of columns used to represent a tab character. This defaults to the value of indent_size and doesn't usually need to be specified.

Might find time later to try a fix, I think it's here where the indent_size function is executed by key name, but it needs to be executed somehow even if it isn't found too.

Thanks for making this!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.