Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 5486809f1b348c984d00a1cd433b233d > files > 16

lib64editorconfig-devel-0.12.1-1.mga6.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EditorConfig: EditorConfig File Format</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EditorConfig
   </div>
   <div id="projectbrief">Configuration file format for defining coding styles in shared projects.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('editorconfig-format.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">EditorConfig File Format </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="format"></a>
EditorConfig File Format</h1>
<p>EditorConfig files use an INI format that is compatible with the format used by Python ConfigParser Library, but [ and ] are allowed in the section names. The section names are filepath globs, similar to the format accepted by gitignore. Forward slashes (/) are used as path separators and semicolons (;) or octothorpes (#) are used for comments. Comments should go individual lines. EditorConfig files should be UTF-8 encoded, with either CRLF or LF line separators.</p>
<p>Filename globs containing path separators (/) match filepaths in the same way as the filename globs used by .gitignore files. Backslashes (\) are not allowed as path separators.</p>
<p>A semicolon character (;) starts a line comment that terminates at the end of the line. Line comments and blank lines are ignored when parsing. Comments may be added to the ends of non-empty lines. An octothorpe character (#) may be used instead of a semicolon to denote the start of a comment.</p>
<h1><a class="anchor" id="file-location"></a>
Filename and Location</h1>
<p>When a filename is given to EditorConfig a search is performed in the directory of the given file and all parent directories for an EditorConfig file (named ".editorconfig" by default). All found EditorConfig files are searched for sections with section names matching the given filename. The search will stop if an EditorConfig file is found with the root property set to true or when reaching the root filesystem directory.</p>
<p>Files are read top to bottom and the most recent rules found take precedence. If multiple EditorConfig files have matching sections, the rules from the closer EditorConfig file are read last, so properties in closer files take precedence.</p>
<h1><a class="anchor" id="patterns"></a>
Wildcard Patterns</h1>
<p>Section names in EditorConfig files are filename globs that support pattern matching through Unix shell-style wildcards. These filename globs recognize the following as special characters for wildcard matching:</p>
<p> 
<table>
  <tr><td><code>*</code></td><td>Matches any string of characters, except path separators (<code>/</code>)</td></tr>
  <tr><td><code>**</code></td><td>Matches any string of characters</td></tr>
  <tr><td><code>?</code></td><td>Matches any single character</td></tr>
  <tr><td><code>[seq]</code></td><td>Matches any single character in <i>seq</i></td></tr>
  <tr><td><code>[!seq]</code></td><td>Matches any single character not in <i>seq</i></td></tr>
  <tr><td><code>{s1,s2,s3}</code></td><td>Matches any of the strings given (separated by commas, can be nested)</td></tr>
  <tr><td><code>{num1..num2}</code></td><td>Matches any integer numbers between num1 and num2, where num1 and num2 can be either positive or negative</td></tr>
</table>
 <p>The backslash character () can be used to escape a character so it is not interpreted as a special character.</p>
<h1><a class="anchor" id="properties"></a>
Supported Properties</h1>
<p>EditorConfig file sections contain properties, which are name-value pairs separated by an equal sign (=). EditorConfig plugins will ignore unrecognized property names and properties with invalid values.</p>
<p>Here is the list of all property names understood by EditorConfig and all valid values for these properties:</p>
<ul>
<li>
<b>indent_style</b>: set to "tab" or "space" to use hard tabs or soft tabs respectively. The values are case insensitive. </li>
<li>
<b>indent_size</b>: a whole number defining the number of columns used for each indentation level and the width of soft tabs (when supported). If this equals to "tab", the <b>indent_size</b> will be set to the tab size, which should be tab_width if <b>tab_width</b> is specified, or the tab size set by editor if <b>tab_width</b> is not specified. The values are case insensitive. </li>
<li>
<b>tab_width</b>: a whole number defining the number of columns used to represent a tab character. This defaults to the value of <b>indent_size</b> and should not usually need to be specified. </li>
<li>
<b>end_of_line</b>: set to "lf", "cr", or "crlf" to control how line breaks are represented. The values are case insensitive. </li>
<li>
<b>charset</b>: 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. </li>
<li>
<b>trim_trailing_whitespace</b>: set to "true" to remove any whitespace characters preceeding newline characters and "false" to ensure it doesn't. </li>
<li>
<b>insert_final_newline</b>: set to "true" ensure file ends with a newline when saving and "false" to ensure it doesn't. </li>
<li>
<b>root</b>: special property that should be specified at the top of the file outside of any sections. Set to "true" to stop <code>.editorconfig</code> files search on current file. The value is case insensitive. </li>
</ul>
<p>Property names are case insensitive and all property names are lowercased when parsing. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>