PDA

View Full Version : How to autocomplete and insert a code block from a standard function



BBchoicecism
10-07-2015,
In KomodoEdit 9.2, how can I enable insertion of code blocks for standard PHP functions?
For example: typing switc and being able to autocomplete and insert a blank switch code block like this:

switch (variable) {
case 'value':
# code...
break;

default:
# code...
break;
}I have enabled PHP as the file language, turned on autocomplete and even tried the 'fill-up' feature, but currently the PHP functions will only autocomplete the spelling of the function itself (no block code) and add corresponding closures like () or {}. But I would very much like to add those empty code blocks somehow.

Bad_Bond
10-10-2015,
You could use a macro and have the trigger set to whatever word you want.

baabwrdpq
10-10-2015,
Does that mean I have to manually define a macro and write the generic block code to display for EVERY php function?

Bandiriupdam
10-12-2015,
Have a look in the panel on the right under examples then abbreviations and consult the help file,