1

I would like to run delete-trailing-whitespace for files with extension .yaml only. Can someone please supply the elisp to do this?

1

1 Answer 1

5
(add-hook 'yaml-mode-hook (lambda () (add-hook 'before-save-hook #'delete-trailing-whitespace nil "local"))) 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.