Forum > Editor

[SOLVED] Autocomplete - adding spaces around assignment operator

(1/1)

willbprog9933:
Greetings!

Using the forum's search function, I found this topic about adding spaces around the assignment operator when using autocomplete, but the web-page referenced in the answer doesn't appear to exist anymore, nor is there a copy on archive.org.

In case the Subject isn't clear, say I've typed:

--- 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";}};} ---Label1.then the autocomplete list automatically displays, then I choose "Caption" then hit Enter.  What happens is this:

--- 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";}};} ---Label1.Caption:=but I want it to do this

--- 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";}};} ---Label1.Caption := I don't like the 'rushed developer' style of smashing everything together -- I like spaces around things.

I've tried adjusting this in the JCF Format settings, but it doesn't appear to affect normal editor use.

Is there some way to adjust this?  I cannot find it in the Editor preferences.

Thanks!  :)

Martin_fr:
Tools > Options > codetools > space

And then before/after "symbol"

willbprog9933:

--- Quote from: Martin_fr on June 01, 2022, 02:03:43 am ---Tools > Options > codetools > space

--- End quote ---

Thanks Martin_fr,

I don't seem to have that menu option.  I neglected to mention I'm running Lazarus 2.2.2 on macOS.  Ah!  There it is in Preferences.  I did use the search feature in Preferences but I guess I was searching for the wrong thing.

Thank you!  :D

Navigation

[0] Message Index

Go to full version