GithubHelp home page GithubHelp logo

yudai-nkt / atom-editorconfig Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sindresorhus/atom-editorconfig

0.0 1.0 0.0 1.67 MB

PR: https://github.com/sindresorhus/atom-editorconfig/pulls?q=is%3Apr+author%3Ayudai-nkt

License: MIT License

JavaScript 97.84% CoffeeScript 0.22% CSS 1.94%

atom-editorconfig's Introduction

EditorConfig Build Status

EditorConfig helps developers maintaining consistent coding styles between different editors.

"My Fievel. I thought I would never see you again." -- Papa Mousekewitz

Install

$ apm install editorconfig

Or, Settings โ†’ Install โ†’ Search for editorconfig

Getting started

See the EditorConfig documentation.

Supported properties

  • root
  • indent_style
  • indent_size / tab_width (indent_size takes precedence over tab_width)
  • charset (supported values: latin1, utf-8, utf-16be, utf-16le)
  • end_of_line (supported values: lf, crlf)
  • trim_trailing_whitespace (supported values: true, false)
  • insert_final_newline (supported values: true, false; Setting this to false strips final newlines)

๐Ÿ’ก Any malformed or missing property is set to auto which leaves the control to Atom.

Features

  • Applies the above settings from your .editorconfig file
  • Syntax highlights .editorconfig files
  • Ability to generate an .editorconfig file based on the current settings
  • Displays a nifty ๐Ÿญ in the statusBar whose color shows you if editorconfig takes action for tyour current editor-pane
  • Clicking on the ๐Ÿญ displays a descriptive summary about the current state of editorconfig
  • Recognizes if you save any .editorconfig-file and reapplies all settings to all opened editor-panes

Example file

root = true

[*]
indent_style = tab
indent_size = 3
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{json,yml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

Generate an editorconfig

You can generate an .editorconfig file based on the current setting by opening the Command Palette and choosing EditorConfig: Generate Config.

Troubleshooting

We're sorry to hear you have troubles using atom-editorconfig! However, we are aware of some caveats:

  • Why isn't editorconfig applying the indentation character to my files? Editorconfig is not intended to do so, it will apply the indentation-char only to new indentations.
  • Why is the indent_style completely not working? Your Atom's config setting "Tab Type" might be set either to soft or hard, this unfortunately prevents editorconfig from influencing the indentation style. Set Atom's "Tab Type" to auto to fix that.
  • Why is the feature X not working? Sometimes other packages (f.e. like the "whitespace"-package) override the editorconfig-settings. You might try to fix this by deactivating the package in your settings. We try to "warn" you about confirmed interferences caused by other packages. If you face any unknown troubles, please give us a hint.

๐Ÿ’ก You can check how editorconfig affects your current file by clicking the ๐Ÿญ in the statusbar!

Help us getting better

We would be happy to hear from you -- please report us any feedback, issues or ideas. Thank you! ๐Ÿ’

License

MIT ยฉ Sindre Sorhus

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.