Note that 'smart tabs' and 'tabs to spaces' might interfere with this
setting.
I did disable 'smart tabs', but left 'tabs to spaces' on. The issue is
that if I press the TAB key, it always jumps 8 characters instead of
what I asked it to - 2 characters.
'tabs to spaces' is fine, as we don't want actual TAB characters in our
source code (I am used to the Delphi way), so converting them to spaces
is fine.
As a quick hack I edited the editoroptions.pp file to force the internal
TSynEdit component to default to 2 characters and default 'smart tabs'
off when it gets created. It worked, which goes to show that when
Lazarus reads the editoroptions.xml file it doesn't set the properties
for the internal TSynEdit, even though it displays them in the Editor
Options dialog. Changing the values now in the Editor Options dialog
still doesn't have any affect, but at least it uses my preferred 2
character tab width.
Below is my quick hack
File: \lazarus\ide\EditorOptions.pp
around line 2262
change it to....
----------- CUT ------------------
procedure TEditorOptions.GetSynEditSettings(ASynEdit: TSynEdit);
// read synedit setings from config file
begin
// general options
ASynEdit.Options := fSynEditOptions;
ASynEdit.BlockIndent := fBlockIndent;
ASynEdit.TabWidth := 2; //fTabWidth;
ASynEdit.Options := ASynEdit.Options - [eoSmartTabs];
----------- END ------------------
Regards,
- Graeme -
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives