Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ Creator & Designer Forum Discussions

Level 5
Level 5
100 sign-ins 50 questions asked 100 replies posted

Is there any way for PSoC Creator to trim all trailing whitespace when saving a file?  This is an option in editors like Spyder, for instance:


I spend way too much time dealing with merge conflicts etc in git history from this junk at the end of lines.

1 Reply
Level 9
Level 9
500 solutions authored 1000 replies posted 750 replies posted


I do not believe there is such a feature intrinsic to Creator.

However, the "Build Settings" dialog allows for you to declare "Pre Build" and "Post Build" execution commands.

Therefore either before (Pre) or after (Post) the Build phase you can install your own executables such as a batch file.

For example:

To trim end-of-line whitespace before the build you can create a Pearl script to perform this task in the "Pre Build"

To play a sound at the end of a build you can add a batch file to play the desired sound in the "Post Build".


I've used this feature to great effect when I wanted to move the executables to another directory for easier access.


"Engineering is an Art. The Art of Compromise."