Try using snippets in Emacs.
Emacs gets fish-mode.
Emacs removes trailing whitespace on file save.

Fish-mode creates whitespace junk.
Emacs key binding to toggle line numbers.
Use Emacs 'kbd' macro. Makes keybindings easier to read.