Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
python-insert-utf8
(defun python-insert-utf8()
"Insert default uft-8 encoding for python"
(interactive)
(newline)
(goto-char (point-min))
(insert "# -*- coding: utf-8 -*-")
(next-line))
(add-hook 'python-mode-hook 'python-insert-utf8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment