Forum > Options
How tell auto-completion to insert spaces around :=
ssawgift:
Is there an existing option that tell auto-completion to insert spaces around :=?
For example, when I auto-complete the following line:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---self.CaptionI always get:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---self.Caption:=
When I format using Jedi, it automatically inserts one space before and after :=.
Zvoni:
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
ssawgift:
--- Quote from: Zvoni on June 01, 2021, 01:11:53 pm ---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
--- End quote ---
Thanks for the tip. But the above option only affects Jedi formatting...
lucamar:
--- Quote from: ssawgift on June 01, 2021, 02:09:48 pm ---Thanks for the tip. But the above option only affects Jedi formatting...
--- End quote ---
In fact they affect only CodeTools formatting (which includes auto-completion); note that there's a specific section for JCF Format Settings above it.
ssawgift:
--- Quote from: lucamar on June 01, 2021, 02:58:35 pm ---In fact they affect only CodeTools formatting (which includes auto-completion); note that there's a specific section for JCF Format Settings above it.
--- End quote ---
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.
Navigation
[0] Message Index
[#] Next page