[Lazarus] CodeTools never uses Tab character settings from editor preferences

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Nov 16 13:43:53 CET 2011


I searched Manis but couldn't find any existing reports - though
searching Mantis a normaly  a shot in the dark too.

Is it a known problem that CodeTools doesn't adhere to the editor
settings?  For some of my projects I now use Tab characters for
indentation. Lazarus Trunk has finally fixed the Block Indentation bug
- now it can use tab characters too.

Anyway, there are still plenty of cases in Lazarus IDE where code is
generated by the IDE, but spaces are used for indentation, instead of
my editor preference Tabs.

My editor settings are as follows:
   tab to space:  unticked
   tab width: 6
   smart tabs: unticked
   Auto indent: ticked
   tab indents blocks: ticked
   block indent (spaces): 0
   block indent (tabs): 1

Examples of problem cases:

1) Create a new project. The Unit1.pas file uses spaces for
indentation in the newly created file. This applies to the project
source file too (the one that contains the program declaration.

2) Create a new LCL project, drop components on the form.
  - indentation is wrong
  - indentation uses spaces, and not my editor preference of tab characters.

3) Code Templates.   eg: tryf   [then press Ctrl+j]
    indentation uses spaces.
    I did find a old bug report about this, but in the latest Trunk
revision it is broken.
    see attached image.

4) Letting the IDE create event handlers. The event handler
declaration is wrongly indented.

.... there are a few more, but I think you get the picture.

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: code_template_indentation.png
Type: image/png
Size: 4014 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20111116/391b45a2/attachment-0002.png>

More information about the Lazarus mailing list