Skip to content

Instantly share code, notes, and snippets.

@rmuslimov
Last active December 22, 2015 23:07
Show Gist options
  • Save rmuslimov/ba64f1a25572b0217b46 to your computer and use it in GitHub Desktop.
Save rmuslimov/ba64f1a25572b0217b46 to your computer and use it in GitHub Desktop.
Creating nice looking headers for python files
# -*- coding: utf-8 -*-
# name: cgd
# --
# coding: utf-8
"""
`(let* ((relative_p (f-relative (buffer-file-name) (vc-git-root (buffer-file-name))))
(package_name (s-replace "/" "." (s-replace ".py" "" relative_p))))
(format "%s\n%s\n%s\n"
(s-repeat (length package_name) "=")
package_name
(s-repeat (length package_name) "=")
))
`
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment