Difference between revisions of "How to avoid DOS line endings in Windows tools"

From Second Life Wiki
Jump to navigation Jump to search
m (Formatted UI stuff more or less according to Style guide#General_rules (although this page isn't part of the KB))
Line 3: Line 3:
If you are going to work on the viewer code you need to conform to the [[Coding Standard]].
If you are going to work on the viewer code you need to conform to the [[Coding Standard]].
Standards your editor must support:
Standards your editor must support:
* Lines must end with a LF (linefeed) character.
* Lines must end with a <code>LF</code> (linefeed) character.
* A tab must generate 4 spaces.
* A tab must generate 4 spaces.


Line 10: Line 10:


* Line ending
* Line ending
** You should not need to specify the line ending for an existing file but for a new file you will want to set Edit->EOL Conversion->UNIX Format
** You should not need to specify the line ending for an existing file but for a new file you will want to set '''Edit''' > '''EOL Conversion''' > '''UNIX Format'''
* Tab spacing
* Tab spacing
** Go to Settings->Preferences->Language Menu/Tab Settings.
** Go to '''Settings''' > '''Preferences''' > '''Language Menu/Tab Settings'''.
** Click on [Default]
** Click on '''Default'''
** Change Tab Size to 4
** Change Tab Size to <code>4</code>
** Check the box Replace by space
** Check the box '''Replace by space'''
** Note: if you are going to be using the program as a general editor you can customize which file types this tab to space conversion applies to.
** Note: if you are going to be using the program as a general editor you can customize which file types this tab to space conversion applies to.

Revision as of 14:58, 31 January 2011

If you are going to work on the viewer code you need to conform to the Coding Standard. Standards your editor must support:

  • Lines must end with a LF (linefeed) character.
  • A tab must generate 4 spaces.

Notepad++

Configuring Notepad++ (download Notepad++)

  • Line ending
    • You should not need to specify the line ending for an existing file but for a new file you will want to set Edit > EOL Conversion > UNIX Format
  • Tab spacing
    • Go to Settings > Preferences > Language Menu/Tab Settings.
    • Click on Default
    • Change Tab Size to 4
    • Check the box Replace by space
    • Note: if you are going to be using the program as a general editor you can customize which file types this tab to space conversion applies to.