adding ctrl-space autocomplete, and strip trailing whitespace before save