I usually use Notepad++ to write code. I usually remove trailing spaces and convert tab to spaces by manually going into the menus and selecting the relevant menu. The problem that happens is that trailing spaces get introduced inadvertently and so do tab. Later when the file is committed into version control system like Git, it causes confusion during code reviews as it looks like a lot of lines have changed although the only thing that happened there was that trailing spaces were removed or tabs were converted to space and nothing else.
How can I make Notepad++ automatically remove trailing spaces and also convert tabs to space when I click on save button? What do you think is the best solution to this problem?
Is it better if I force git to run a script that does these changes just before files are committed? But then I am not sure how to make Git run a script before commit action is completed.