Komodo Edit 8 is a free editor (not using the commercial IDE) but is sometimes hard to configure. It certainly plays well while hacking Icinga 2 in C++ or Icinga Web 2 in PHP.
On a fresh install, the trailing whitespaces are not removed when saving a document (and it really should, they are annoying when you open it with vim/git diff and whitespaces highlighting enabled).
Navigate to Edit – Preferences – Editor – Save Options and tick Clean trailing whitespaces and EOL markers and Only clean changed lines. The last option saves us from cleaning the entire document and generate horrible git diffs solving whitespaces issues caused by others. (i hate git diffs solving everything but hiding the real fixed code diff).