Last active
March 16, 2018 05:41
-
-
Save tek-nishi/93bfa4614f1254b0c2255bc122d0d1c0 to your computer and use it in GitHub Desktop.
spacemacs buffer-encoding-abbrev with signature(BOM)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(spaceline-define-segment buffer-encoding-abbrev | |
"The line ending convention used in the buffer." | |
(let ((buf-coding (format "%s" buffer-file-coding-system))) | |
(list (replace-regexp-in-string "-with-signature\\|-unix\\|-dos\\|-mac" "" buf-coding) | |
(concat (and (string-match "with-signature" buf-coding) "ⓑ") | |
(and (string-match "unix" buf-coding) "ⓤ") | |
(and (string-match "dos" buf-coding) "ⓓ") | |
(and (string-match "mac" buf-coding) "ⓜ") | |
))) | |
:separator " ") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment