Auto Complete Questions lazarus / 9-Editor ---------------------------------------------------------------------- vfclists · 2014-01-25 01:43 I have a few questions on auto complete in Lazarus. How do place spaces around the assignment operator? This is answered here: http://free-pascal- lazarus.989080.n3.nabble.com/Lazarus-Code-Completion-spaces-around- td4032277.html When you are creating a procedure declared in the type definition, how do you get Code completion to copy the parameters as well? Ctrl-Space inserts only the procedure name and ignores the parameters. After a procedure is declared in the header area, is it possible for Code completion to create the main body with begin and end keywords and place the cursor in it, ready for editing. Or vice versa - write the procedure and have the declaration added to the type declaration There is an example of using a variable, eg assigning it and then using code completion to create the variable in the var section with the write type. Can someone point me to it? When a procedure signature is changed either in the declaration is it possible to get the implementation to change as well or vice versa? These are the ones I can think for now. I will ask about others later. ---------------------------------------------------------------------- taazz · 2014-01-25 02:10 Quote from: vfclists on January 25, 2014, 02:43:13 amI have a few questions on auto complete in Lazarus. How do place spaces around the assignment operator? This is answered here: http://free-pascal- lazarus.989080.n3.nabble.com/Lazarus-Code-Completion-spaces-around- td4032277.html Quote from: vfclists on January 25, 2014, 02:43:13 amWhen you are creating a procedure declared in the type definition, how do you get Code completion to copy the parameters as well? Ctrl-Space inserts only the procedure name and ignores the parameters. You place your cursor on the line with the procedure declaration in the interface part and press ctrl+shift+C it will invoke the autocompletion and create an empty procedure/function in the implementation section, of the unit. The procedure or function declaration can be part of a class or a simple procedure function declared on the interface part of the unit. There is a way to allow the autocompletion of an inherited method as well, make sure that the autocomplete list is dropped down (this can be done by press ctrl+space in an empty line for example) select the method name you are interested to override and press enter. Quote from: vfclists on January 25, 2014, 02:43:13 am After a procedure is declared in the header area, is it possible for Code completion to create the main body with begin and end keywords and place the cursor in it, ready for editing. Or vice versa - write the procedure and have the declaration added to the type declaration look my previous answer I haven't tried the other way around ee from implementation to interface I would say not at this time but try pressing ctrl+Shift+C in a procedure in the implementation section and see if that works. Quote from: vfclists on January 25, 2014, 02:43:13 am There is an example of using a variable, eg assigning it and then using code completion to create the variable in the var section with the write type. Can someone point me to it? simple do something like [/list][/list]Code: [Select]procedure Test; begin   For vC|ntr := 0 to 100 do end;press ctrl+shift+C and the declaration of an integer variable will appear inside your function. Quote from: vfclists on January 25, 2014, 02:43:13 am When a procedure signature is changed either in the declaration is it possible to get the implementation to change as well or vice versa? once again place your cursosr anywhere in the declaration line and press ctrl+Shift+C. Just try pressing it in various positions and see how that will affect your code, ctrl+Shift+C is the only shortcut you need to know for now. ---------------------------------------------------------------------- Martin_fr · 2014-01-25 02:17 You should read this page, the entire page. http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools And maybe: http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools QuoteWhen you are creating a procedure declared in the type definition, how do you get Code completion to copy the parameters as well? Ctrl-Space inserts only the procedure name and ignores the parameters. When between the brackets, press Shift-Ctrl-space again. ("|" indicates text cursor) Code: [Select]CallFoo( | ); // Shift-Ctrl-space It does not copy them, but displays them. Install (on windows only, others crash) packaget TurboPowerIProDsgn, and there are buttons, that allow to insert them (requires using mouse) --- Also maybe install package "Cody", it adds some more. (like an extended completion of variables)