Another easy way for declaring local variables: type "LMyForm := TMyForm.Create(Self);" go with the cursor to your variable and press ctrl + shift + v and use the delphi built-in feature refactor declare variable. You will get a form where the type is already filled with TMyForm. With ctrl + shift + d you could declare a field variable instead of a local one, but gexperts overrides this shortcut for me :-\
Live templates are a very underused yet powerful feature to save a ton of typing (at least I could use them more - I find myself typing stuff way too often) - and the cool thing: you can write your own ones: http://docwiki.embarcadero.com/RADStudio/XE7/en/Creating_Live_Templates
ReplyDeleteI'm still getting a kick from Embarcadero's page linking to my article in the Delphi Wiki for "technical refernece". It's just so funny.
ReplyDeleteGunny - do you want to show this tip during Delphi Week 2015 next week live online? Let Jim McKeeth and I know.
ReplyDeleteI use Ctrl+L provided by MMX :)
ReplyDeleteAnother easy way for declaring local variables:
ReplyDeletetype "LMyForm := TMyForm.Create(Self);" go with the cursor to your variable and press ctrl + shift + v and use the delphi built-in feature refactor declare variable. You will get a form where the type is already filled with TMyForm. With ctrl + shift + d you could declare a field variable instead of a local one, but gexperts overrides this shortcut for me :-\