The following was written for KiCad 4. Simulation support in KiCad 5 has been reworked to such an extent that a lot of the following doesn't work. Have a look here if you have KiCad 4 SPICE stuff you'd like to use in KiCad 5.
This is written up assuming you know the basics of using KiCad already.
You'll need the following to get a working SPICE setup:
0” component from a SPICE component library rather than the
0” is the official name of ground node in SPICE. Some engines may translate
0, some may not.
+PSPICE .control ac dec 66 1kHz 120kHz plot vdb(vout) set units = degrees plot vp(vout) .endc
+PSPICEis KiCad-speak for, “Stick the following text at the end of a SPICE netlist.”
+PSPICEand before the line break.
-PSPICEthat is KiCad-speak for, “Stick the following text at the start of a SPICE netlist.”
-GNUCAPinstead. I believe they are exact synonyms in this context, but I am not certain.