Lazarus 2.2.6 (rev lazarus_2_2_6) FPC 3.2.2 x86_64-win64-win32/win64Code Templates readily allow me to add (for example) a template with a single-character shortcut like "a" or "b".
So far this is like Delphi.
I want to define a begin...else statement without an 'else', and my desired shortcut is "b".
So I add a token "b" - that is because it is faster to type "b" than typing in a longer string. Then the template is defined.
begin
|
end;
The template is saved OK (it can be seen in the Code Template editor) - but it does not (seem to) appear in the list when I use CTRL+J...
...Further slow, manual scrolling reveals that the "b" template has been added in-between "withb" and "withs".
Next I do the same thing, with the token "bb". This time, the entry gets appended to the very end of the list.
I'd expect the pop-up list to sort alphabetically... in fact I have to scroll all over the list to find what I want.
All these things mean that it is not the "
great time saver" (
https://wiki.freepascal.org/IDE_Window:_Code_Templates) it was in Delphi.
It used to be I typed CTRL+J b and that produced the template I added for "b". That was a time-saver. No longer.
I type CTRL+J b, then scroll through the entire list.
BTW: I notice that the default entries use $AddSemicolon() rather than ';', I am not sure if that matters?