-
Notifications
You must be signed in to change notification settings - Fork 0
EditorConfig
- Fork our Repository
- Create a topic branch - git checkout -b my_branch
- Push to your branch - git push origin my_branch
- Create a Pull Request from your branch
- That's all!
EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs.
Define file extensions in brackets(like[*.haml]) then, at the new line add to new properties whatever you want. Forward slashes (/) are used as path separators and octothorpes (#) or semicolons (;) are used for comments. Comments should go on their own lines. EditorConfig files should be UTF-8 encoded, with either CRLF or LF line separators. For more check this website :editorconfig
[*.haml]
indent_style = space
indent_size = 4
This example shows that a file extension which called "haml" has properties like indent size and indent style.
Mark | Description |
---|
- |Matches any string of characters, except path separators (/)| ** |Matches any string of characters| ? |Matches any single character| [seq] |Matches any single character in seq| [!seq] |Matches any single character not in seq| {s1,s2,s3} |Matches any of the strings given (separated by commas) (Available since EditorConfig Core 0.11.0)|
indent_style: set to tab or space to use hard tabs or soft tabs respectively.
indent_size: a whole number defining the number of columns used for each indentation level and the width of soft tabs (when supported). When set to tab, the value of tab_width (if specified) will be used.
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.
end_of_line: set to lf, cr, or crlf to control how line breaks are represented. **charset: ** set to latin1, utf-8, utf-8-bom, utf-16be or utf-16le to control the character set. Use of utf-8-bom is discouraged.
trim_trailing_whitespace: set to true to remove any whitespace characters preceding newline characters and false to ensure it doesn't.
insert_final_newline: set to true ensure file ends with a newline when saving and false to ensure it doesn't.
root: special property that should be specified at the top of the file outside of any sections. Set to true to stop .editorconfig files search on current file.
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://EditorConfig.org
root = true
; Use 2 spaces for indentation in all Ruby files
[*.rb]
indent_style = space
indent_size = 2
[Rakefile]
indent_style = space
indent_size = 2
[Gemfile*]
indent_style = space
indent_size = 2
[config.ru]
indent_style = space
indent_size = 2
# Tab indentation (no size specified)
[*.js]
indent_style = space
# Indentation override for all JS under lib directory
[lib/**.js]
indent_style = space
indent_size = 2
Resource :yakutproject