Forum > Editor
Code completion items
440bx:
Hello,
The trunk version of Lazarus is showing a number of items in the code completion box that are not record fields.
What I'd like is: only record fields and nothing else in the code completion box.
I've been playing with all kinds of settings but, I don't seem to get the right ones.
What are the settings to get the above and nothing else ?
Thank you for your help.
PS: attached is a screenshot of what I'm getting at this time and none of the items in the box are fields in the record pointed to by the InoutBuffer variable. (I'd like to see the fields instead of the stuff that's currently showing.)
Martin_fr:
That setting has been around a while:
Tools > Options
Page "Codetools" > "Identifier Completion"
Section "Contents"
Combobox "Include Words" => set to "don't include"
440bx:
Wonderful... thank you Martin.
Normally I rarely use Lazarus to edit source code, which means I have a hard time remembering all the settings I changed over time. Until very recently I was using Lazarus v1.8.2 which, over the years, I got to work as I like but, I don't remember all the settings I changed in it.
The reason I am now using the editor more is because of FpDebug.
On that note, I'd like to mention that, when I first started using FPC and Lazarus, I thought the ability to edit the source while debugging was a bad idea. Now, I think it's one of the best features I've come across and, TTBOMK, Lazarus/FpDebug is the only environment that can keep track of executable lines after code and/or comments have been added to the source. What a great feature! :)
thanks again.
440bx:
I'm still not getting what I'd like.
Again, what I'd like in the little pop up box is a list of fields that belong to the record I'm referencing.
So far, the only way I get those fields is by getting a whole lot of other fields that have nothing to do with the record.
I attached a screenshot of my settings. I've tried everything I could think of except what gets the job done the way I want... <chuckle>
Thank you for your help.
Martin_fr:
The important question then is what else is in the list?
Or, what is the definition of your record?
I attached what I get for TPoint. And it is more than x,y. But, there are typehelpers. So "a.Angle(a)" will be valid code. There is no way to suppress those completions.
But what you most likely want to change is the sort order. Sort by "Definition (Scoped".
That will bring the identifiers declared directly in the record to the top of the list. And then as it works it way out of the record to other declarations, those got sorted lower down.
And then decide, if you want recently used to be pulled up to the top (you currently have that enabled)
My List is sorted alphabetical... Not sure why. I usually use "Definition (Scoped)". I must have changed it at some point while testing stuff....
Navigation
[0] Message Index
[#] Next page