Skip to content

Instantly share code, notes, and snippets.

@psachin
Created May 16, 2015 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psachin/73e7e75d1fd82d4277cc to your computer and use it in GitHub Desktop.
Save psachin/73e7e75d1fd82d4277cc to your computer and use it in GitHub Desktop.
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