Turn off this automatic code order lazarus / 9-Editor ---------------------------------------------------------------------- clauslack · 2009-09-11 00:12 I use a standard code, but Lazarus change all in automatic form. How turn off this change automatic of code? Examples from this code Code: [Select]begin     if GestadoCajaBonos = '*' then  begin         ShowMessage('Seleccione otro nro de caja, esta ya esta cerrada');         exit;     end; end; to this code Code: [Select]begin   if GestadoCajaBonos = '*' then   begin     ShowMessage('Seleccione otro nro de caja, esta ya esta cerrada');     exit;   end; end; Cut lines Code: [Select]  Usuario := BuscaDatosEnTabla('usuarios', 'codigo_usuario', IntToStr(     GnroDeUsuario), 'nombre', syscamidatos.IBConnection1); Ident from 4 spaces to 2 spaces. Thanks ---------------------------------------------------------------------- Martin_fr · 2009-09-11 00:40 I can only guess from your description. Do you mean: You wrote your code in a different editor, and it had an indent of 2, but if you load the same file with lazarus, the indent is 4 (or double the old indent)? Does your text contain tab chars? Note that  in lazarus the cursor left/right keys go through a tab, as if they where spaces. (Yet Lazarus does keep the tab / See end of my message) You can go into the Editor options (Enviroment Menu => Options), on the Editor/General page is a field to set the width of a tab, it probably is 4, and you may want to set this to 2. ---- You may want to read more about tab settings (and maybe trim trailing spaces and auto-indent) here: http://wiki.lazarus.freepascal.org/IDE_W indow:_Editor_Options#Tabs_to_spaces Because if you whist to use the tab key in lazarus without "magic" behaviour, so that it does just insert a normal tab, then you may have to change more settings. ---- If you whist the cursor to skip tabs (pressing cursor right while the caret is in front of a tab, should bring you to the end of the tab, not into the middle of a tab) then you need Lazarus 0.9.29, where such an option does exist. ---------------------------------------------------------------------- Martin_fr · 2009-09-11 00:47 The max line length (before the line is split into 2) is in the options under CodeTools/Line-Splitting. Afaik that only applies to code that is auto-generated. Not sure if it will affect code you type by hand. ---------------------------------------------------------------------- clauslack · 2009-09-11 12:01 Thanks Martin_fr I work with a project with Lazarus in two machines, one with Lazarus 0.9.27 svn 21317, other with Lazarus 0.9.29 svn from 25/08/2009. I think that the 0.9.29 version format all code (in especial "if then else" without any warning, insert spaces after colon, etc) These options appear to be in Enviroment->Options->Codetools->Space Enviroment->Options->Codetools->Line Splitting Enviroment->Options->Codetools->   etc, etc Is not a big problem, but I don't like this automatic change in the coding style. I suspect that 0.9.29 has changed the coding style, but I can't reproduce it now. QuoteAfaik that only applies to code that is auto-generated. Not sure if it will affect code you type by hand. All the code is type by hand. Very strange. Now I am with Lazarus 0.9.27 and all the code is like I wrote. I will check this code with Lazarus 0.9.29 later. Thanks again. ---------------------------------------------------------------------- Martin_fr · 2009-09-11 12:11 Well a feature like this is planed. But at current it will only be active (to whatever extend it exists...) if you compile the IDE with -dEnableIndenter If you are on SVN, maybe you had a version where the check for the define was missing, and it was always on. ---------------------------------------------------------------------- clauslack · 2009-09-11 14:33 Thanks, I will check that.