Lazarus
Using the Lazarus IDE => Options => Topic started by: ssawgift on June 01, 2021, 01:06:04 pm
-
Is there an existing option that tell auto-completion to insert spaces around :=?
For example, when I auto-complete the following line:
I always get:
When I format using Jedi, it automatically inserts one space before and after :=.
-
In IDE --> Tools - Options - Codetools - Blanks (German Lazarus here, so i'm translating on the Fly)
Check both "Symbol" in "Insert blank before" and "Insert blank after"
Nota Bene: That inserts a blank before/after each Symbol
You can see it in the sample-window
-
In IDE --> Tools - Options - Codetools - Blanks (German Lazarus here, so i'm translating on the Fly)
Check both "Symbol" in "Insert blank before" and "Insert blank after"
Nota Bene: That inserts a blank before/after each Symbol
You can see it in the sample-window
Thanks for the tip. But the above option only affects Jedi formatting...
-
Thanks for the tip. But the above option only affects Jedi formatting...
In fact they affect only CodeTools formatting (which includes auto-completion); note that there's a specific section for JCF Format Settings above it.
-
In fact they affect only CodeTools formatting (which includes auto-completion); note that there's a specific section for JCF Format Settings above it.
Okay, that means auto-completion should insert a space before :=, but it does not. The only way to achieve what I want is to hit SPACEBAR (instead of ENTER) when the correct symbol is highlighted in completion list.
-
Strange; it works as it should here. For example, if you have:
var
Something: Integer;
begin
|
end;
an use autocompletion to insert "Something" at the caret's position, it adds the ":=" with the proper spaces around. But, of course, only if you have "Add assignment operator" checked in "Identifier completion" (right below "Space" in CodeTools options).
-
After some tries, it turned out that the codetools->Space setting works for auto-completion. I did not check two checkboxes for 'Symbol'.