Auto correct case as you type lazarus / 9-Editor ---------------------------------------------------------------------- dzzie · 2014-03-25 09:08 Is there an option to auto correct case on objects/variables as you type? The foundation for it is already there with the ctrl-space autocomplete. It looks like this is handled in Code: [Select]TSourceEditCompletion.ccComplete ...    case CurrentCompletionType of        ctIdentCompletion: ...              NewValue:=GetIdentCompletionValue(self, KeyChar, ValueType, CursorToLeft);              if ValueType <> icvNone then                      Editor.TextBetweenPointsEx[SourceStart, SourceEnd, scamEnd] := NewValue; I always liked this feature in other IDEs. Alerts you if you mistyped a word, keeps the code standardized, limits reaching for the shift key over and over. Thinking about taking a stab at adding it triggers would probably be open parenthesis, dot, space, semi colon concerns would be making sure not to intefere with code completion list and not displaying a select list if fragment matched more than one.  Code: [Select]procedure TSourceEditor.UserCommandProcessed(Sender: TObject;   var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer); would probably be where i started poking again.  if it existed seems like it would be in Code: [Select]CodeTools -> Identifier Complettion -> Auto Correct Case ---------------------------------------------------------------------- Martin_fr · 2014-03-25 14:27 The problem is not so much triggering it, but that codetools can take time. So invoking them during normal typing can have a  negative impact. I do not know how thread save they are at this time. Ideally this would be triggered in a thread. Though it could be given a try, without threads.... The trigger would be any NONE a..z,0..9,_, IF the previous was in that range. Also there is a 2nd similar request, that maybe can be addressed at the same time. Open the completion dropdown, always when typing. (that is either right after the first a..z) or if any word is at least n chars long. ccComplete (IIRC) is called at the end of completion. So for initializing the completion list, you need to intercept earlier. probably ccExecute. (just from memory). Also in case of the case correction, a full completion list is not needed. Only the exact match. Codetool may offer a better method for that (maybe based on the code used for ctrl-click links / maybe even something else). The codetool maintainer is on the mailing list. Not sure if he reads the forum.