<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Editor Hints and Tips in LPCXpresso IDE FAQs</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Editor-Hints-and-Tips/m-p/469684#M47</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The editor view within Eclipse, which sits under the LPCXpresso IDE, provides a large number of powerful features for editing your source files. These include...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Source folding&lt;/SPAN&gt;&lt;/H2&gt;&lt;HR /&gt;&lt;P&gt;Within the editor view, functions, structures etc may be folded to show the structure and hide the detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To enable folding, right click in the margin of the editor view to bring up the context sensitive menu, then select &lt;TT&gt;Folding-&amp;gt;Enable Folding&lt;/TT&gt;, or the keyboard shortcut &lt;TT&gt;Ctrl-Numpad_Divide&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then click on the &lt;TT&gt;&lt;SPAN class="emoticon_minus emoticon-inline" style="height: 16px; width: 16px;"&gt;&lt;/SPAN&gt;&lt;/TT&gt; or &lt;TT&gt;&lt;SPAN class="emoticon_plus emoticon-inline" style="height: 16px; width: 16px;"&gt;&lt;/SPAN&gt;&lt;/TT&gt; icon that now appear in the margin next to each function, structure, etc, to expand or collapse it, or use the &lt;TT&gt;Folding-&amp;gt;Expand all&lt;/TT&gt; and &lt;TT&gt;Folding-&amp;gt;Collapse all&lt;/TT&gt; options from the context sensitive menu (or use keyboard shortcuts &lt;TT&gt;Ctrl-Numpad_Multiply&lt;/TT&gt; and &lt;TT&gt;Ctrl-Shift-Numpad_Divide&lt;/TT&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Various settings for Folding can also be controlled through&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; C/C++ -&amp;gt; Editor -&amp;gt; Folding&lt;/TT&gt;&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Editor templates and Code completion&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Within the editor, a number of related pieces of functionality allow you to enter code quickly and easily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, templates are fragments of code that can be inserted in a semi-automatic manner to ease the entering of repetive code - such as blocks of code for C code structures such as for loops, if-then-else statements and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, the indexing of your source code that is done by default by the tools, allows for auto completion of function and variable names. This is known as "content assist".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;TT&gt;Ctrl-Space&lt;/TT&gt; at any point will list available editor template, function names etc&lt;/LI&gt;&lt;LI&gt;&lt;TT&gt;Ctrl-Shift-Space&lt;/TT&gt; will display function parameters&lt;/LI&gt;&lt;LI&gt;&lt;TT&gt;Alt-/&lt;/TT&gt; for word completion (press multiple times to cycle through multiple options).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, the predefined templates are user extensible via&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;Window -&amp;gt; Preferences -&amp;gt; C/C++ -&amp;gt; Editor -&amp;gt; Templates&lt;/SPAN&gt;&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Brace matching&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;The editor can highlight corresponding open and closing braces in a couple of ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, if you place the cursor immediately to the right of a brace (either an opening or closing brace), then the editor will display a rectangle around the corresponding brace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, if you double click immediately to the right of a brace, then the editor will automatically highlight all of the text between this brace and the corresponding one.&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Syntax coloring&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Syntax Coloring specifies how your source code is rendered in the editor view, with different colors used for different elements of your source code. The settings used can be modified in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; C/C++ -&amp;gt; Editor -&amp;gt; Syntax Coloring&lt;/TT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that general text editor settings such as the background color can be configured in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; General -&amp;gt; Text Editors&lt;/TT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fonts may be configured in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; General -&amp;gt; Appearance -&amp;gt; Colors and Fonts&lt;/TT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Comment/uncomment block&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;The editor offers a number of ways of comment in or out one or more lines of text. These can be accessed using the &lt;TT&gt;Source&lt;/TT&gt; entry of the editor context-sensitive menu, or using the following keyboard shortcuts...&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Select the line(s) to comment, then hit &lt;TT&gt;Ctrl-/&lt;/TT&gt; to comment out using &lt;TT&gt;//&lt;/TT&gt; at the start of the line, or uncomment if the line is currently commented out.&lt;/LI&gt;&lt;LI&gt;Select the line(s) to comment, then hit &lt;TT&gt;Ctrl-Shift-/&lt;/TT&gt; to block comment out (placing &lt;TT&gt;/*&lt;/TT&gt; at the start and &lt;TT&gt;*/&lt;/TT&gt; at the end).&lt;/LI&gt;&lt;LI&gt;To remove a block comment, hit &lt;TT&gt;Ctrl-Shift-\&lt;/TT&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Format code&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;The editor can format your code to match the coding standards in use (&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; C/C++ -&amp;gt; Code Style&lt;/TT&gt;). This can automatically deal with layout elements such as indentation and where braces are placed. This can be carried out on the currently selected text using the &lt;TT&gt;Source-&amp;gt;Format&lt;/TT&gt; entry of the editor context-sensitive menu, or using the keyboard shortcuts &lt;TT&gt;Ctrl-Shift-F&lt;/TT&gt;. If no text is selected, then the format will take place on the whole of the current file.&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Correct Indentation&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;As you enter code in the editor, it will attempt to automatically indent your code appropriately, based on the code standards in use, and also the layout of the preceding text. However in some circumstances, for example after manually laying text out, you may end up with incorrect indentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can usually be corrected using the &lt;TT&gt;Source-&amp;gt;Correct Indentation&lt;/TT&gt; entry of the editor context-sensitive menu, or using the keyboard shortcuts &lt;TT&gt;Ctrl-I&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively use the "Format code" option which will fix other layout issues in addition to indentation.&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Insert spaces for tabs in editor&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;You can configure the IDE so that when editing a file, pressing the TAB key inserts spaces instead of tab characters. To do this go to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; Text Editors &lt;/TT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and tick the "Insert spaces for tabs" box.If you tick "Show white-space characters" you can see whether a tab character or space characters are being inserted when you press the TAB key&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Replacing tabs with spaces&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;To replace existing tabs with spaces throughout the file, open the Code Style preferences:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; C/C++ -&amp;gt; Code Style&lt;/TT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Select a Code Style profile and then select &lt;STRONG&gt;Edit...&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Choose the &lt;STRONG&gt;Indentation&lt;/STRONG&gt; tab&lt;/LI&gt;&lt;LI&gt;For the &lt;STRONG&gt;Tab policy&lt;/STRONG&gt;, select &lt;STRONG&gt;Spaces only&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Apply the changes.&lt;UL&gt;&lt;LI&gt;Note. If the Code Style has not been edited before, the Profile must be renamed before the change can be applied.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The new style will be applied when the source is next formatted&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Source -&amp;gt; Format&lt;/TT&gt;&lt;/P&gt;&lt;P class="fivestar-static-form-item"&gt;&lt;/P&gt;&lt;DIV class="form-item"&gt;&lt;LABEL style="font-weight: bold;"&gt;Average:&lt;/LABEL&gt;&lt;DIV class="fivestar-widget-static-5 clear-block fivestar-widget-static fivestar-widget-static-vote"&gt;&lt;DIV class="star-odd star-1 star star-first"&gt;&lt;SPAN class="off"&gt;0&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="star star-even star-2" style="min- padding: 0px;"&gt;&lt;SPAN class="off"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P class="star star-odd star-3" style="min- padding: 0px;"&gt;&lt;SPAN class="off"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P class="star star-4 star-even" style="min- padding: 0px;"&gt;&lt;SPAN class="off"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Mar 2016 18:23:47 GMT</pubDate>
    <dc:creator>lpcware-support</dc:creator>
    <dc:date>2016-03-31T18:23:47Z</dc:date>
    <item>
      <title>Editor Hints and Tips</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Editor-Hints-and-Tips/m-p/469684#M47</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The editor view within Eclipse, which sits under the LPCXpresso IDE, provides a large number of powerful features for editing your source files. These include...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Source folding&lt;/SPAN&gt;&lt;/H2&gt;&lt;HR /&gt;&lt;P&gt;Within the editor view, functions, structures etc may be folded to show the structure and hide the detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To enable folding, right click in the margin of the editor view to bring up the context sensitive menu, then select &lt;TT&gt;Folding-&amp;gt;Enable Folding&lt;/TT&gt;, or the keyboard shortcut &lt;TT&gt;Ctrl-Numpad_Divide&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then click on the &lt;TT&gt;&lt;SPAN class="emoticon_minus emoticon-inline" style="height: 16px; width: 16px;"&gt;&lt;/SPAN&gt;&lt;/TT&gt; or &lt;TT&gt;&lt;SPAN class="emoticon_plus emoticon-inline" style="height: 16px; width: 16px;"&gt;&lt;/SPAN&gt;&lt;/TT&gt; icon that now appear in the margin next to each function, structure, etc, to expand or collapse it, or use the &lt;TT&gt;Folding-&amp;gt;Expand all&lt;/TT&gt; and &lt;TT&gt;Folding-&amp;gt;Collapse all&lt;/TT&gt; options from the context sensitive menu (or use keyboard shortcuts &lt;TT&gt;Ctrl-Numpad_Multiply&lt;/TT&gt; and &lt;TT&gt;Ctrl-Shift-Numpad_Divide&lt;/TT&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Various settings for Folding can also be controlled through&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; C/C++ -&amp;gt; Editor -&amp;gt; Folding&lt;/TT&gt;&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Editor templates and Code completion&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Within the editor, a number of related pieces of functionality allow you to enter code quickly and easily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, templates are fragments of code that can be inserted in a semi-automatic manner to ease the entering of repetive code - such as blocks of code for C code structures such as for loops, if-then-else statements and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, the indexing of your source code that is done by default by the tools, allows for auto completion of function and variable names. This is known as "content assist".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;TT&gt;Ctrl-Space&lt;/TT&gt; at any point will list available editor template, function names etc&lt;/LI&gt;&lt;LI&gt;&lt;TT&gt;Ctrl-Shift-Space&lt;/TT&gt; will display function parameters&lt;/LI&gt;&lt;LI&gt;&lt;TT&gt;Alt-/&lt;/TT&gt; for word completion (press multiple times to cycle through multiple options).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, the predefined templates are user extensible via&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;Window -&amp;gt; Preferences -&amp;gt; C/C++ -&amp;gt; Editor -&amp;gt; Templates&lt;/SPAN&gt;&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Brace matching&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;The editor can highlight corresponding open and closing braces in a couple of ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, if you place the cursor immediately to the right of a brace (either an opening or closing brace), then the editor will display a rectangle around the corresponding brace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, if you double click immediately to the right of a brace, then the editor will automatically highlight all of the text between this brace and the corresponding one.&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Syntax coloring&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Syntax Coloring specifies how your source code is rendered in the editor view, with different colors used for different elements of your source code. The settings used can be modified in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; C/C++ -&amp;gt; Editor -&amp;gt; Syntax Coloring&lt;/TT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that general text editor settings such as the background color can be configured in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; General -&amp;gt; Text Editors&lt;/TT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fonts may be configured in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; General -&amp;gt; Appearance -&amp;gt; Colors and Fonts&lt;/TT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Comment/uncomment block&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;The editor offers a number of ways of comment in or out one or more lines of text. These can be accessed using the &lt;TT&gt;Source&lt;/TT&gt; entry of the editor context-sensitive menu, or using the following keyboard shortcuts...&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Select the line(s) to comment, then hit &lt;TT&gt;Ctrl-/&lt;/TT&gt; to comment out using &lt;TT&gt;//&lt;/TT&gt; at the start of the line, or uncomment if the line is currently commented out.&lt;/LI&gt;&lt;LI&gt;Select the line(s) to comment, then hit &lt;TT&gt;Ctrl-Shift-/&lt;/TT&gt; to block comment out (placing &lt;TT&gt;/*&lt;/TT&gt; at the start and &lt;TT&gt;*/&lt;/TT&gt; at the end).&lt;/LI&gt;&lt;LI&gt;To remove a block comment, hit &lt;TT&gt;Ctrl-Shift-\&lt;/TT&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Format code&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;The editor can format your code to match the coding standards in use (&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; C/C++ -&amp;gt; Code Style&lt;/TT&gt;). This can automatically deal with layout elements such as indentation and where braces are placed. This can be carried out on the currently selected text using the &lt;TT&gt;Source-&amp;gt;Format&lt;/TT&gt; entry of the editor context-sensitive menu, or using the keyboard shortcuts &lt;TT&gt;Ctrl-Shift-F&lt;/TT&gt;. If no text is selected, then the format will take place on the whole of the current file.&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Correct Indentation&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;As you enter code in the editor, it will attempt to automatically indent your code appropriately, based on the code standards in use, and also the layout of the preceding text. However in some circumstances, for example after manually laying text out, you may end up with incorrect indentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can usually be corrected using the &lt;TT&gt;Source-&amp;gt;Correct Indentation&lt;/TT&gt; entry of the editor context-sensitive menu, or using the keyboard shortcuts &lt;TT&gt;Ctrl-I&lt;/TT&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively use the "Format code" option which will fix other layout issues in addition to indentation.&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Insert spaces for tabs in editor&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;You can configure the IDE so that when editing a file, pressing the TAB key inserts spaces instead of tab characters. To do this go to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; General -&amp;gt; Editors -&amp;gt; Text Editors &lt;/TT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and tick the "Insert spaces for tabs" box.If you tick "Show white-space characters" you can see whether a tab character or space characters are being inserted when you press the TAB key&lt;/P&gt;&lt;H2 style="font-family: Lato, sans-serif; color: #e66e08; font-size: 18px; background-position: initial;"&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #eb7a3d;"&gt;Replacing tabs with spaces&lt;/SPAN&gt;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;To replace existing tabs with spaces throughout the file, open the Code Style preferences:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Window -&amp;gt; Preferences -&amp;gt; C/C++ -&amp;gt; Code Style&lt;/TT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Select a Code Style profile and then select &lt;STRONG&gt;Edit...&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Choose the &lt;STRONG&gt;Indentation&lt;/STRONG&gt; tab&lt;/LI&gt;&lt;LI&gt;For the &lt;STRONG&gt;Tab policy&lt;/STRONG&gt;, select &lt;STRONG&gt;Spaces only&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Apply the changes.&lt;UL&gt;&lt;LI&gt;Note. If the Code Style has not been edited before, the Profile must be renamed before the change can be applied.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The new style will be applied when the source is next formatted&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding: 5px 10px; background: #eeeeee;"&gt;&lt;TT&gt;Source -&amp;gt; Format&lt;/TT&gt;&lt;/P&gt;&lt;P class="fivestar-static-form-item"&gt;&lt;/P&gt;&lt;DIV class="form-item"&gt;&lt;LABEL style="font-weight: bold;"&gt;Average:&lt;/LABEL&gt;&lt;DIV class="fivestar-widget-static-5 clear-block fivestar-widget-static fivestar-widget-static-vote"&gt;&lt;DIV class="star-odd star-1 star star-first"&gt;&lt;SPAN class="off"&gt;0&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="star star-even star-2" style="min- padding: 0px;"&gt;&lt;SPAN class="off"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P class="star star-odd star-3" style="min- padding: 0px;"&gt;&lt;SPAN class="off"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P class="star star-4 star-even" style="min- padding: 0px;"&gt;&lt;SPAN class="off"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 18:23:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Editor-Hints-and-Tips/m-p/469684#M47</guid>
      <dc:creator>lpcware-support</dc:creator>
      <dc:date>2016-03-31T18:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Editor Hints and Tips</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Editor-Hints-and-Tips/m-p/1149237#M162</link>
      <description>&lt;P&gt;RE: &lt;SPAN&gt;Insert spaces for tabs in editor -- &lt;SPAN&gt;Window - Preferences - General &amp;gt; Editors - Text Editors &lt;/SPAN&gt;- DISPLAYED TAB WIDTH:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Setting TAB spaces in there does NOT work. I had set it to 2 (from default value of 4) and when pressing TAB in text editing, it still inserts tab size of 4 spaces. Rebooting the LPCXpresso did not help.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Sep 2020 08:40:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Editor-Hints-and-Tips/m-p/1149237#M162</guid>
      <dc:creator>Derlo</dc:creator>
      <dc:date>2020-09-05T08:40:20Z</dc:date>
    </item>
  </channel>
</rss>

