お世話になりすぎて涙が出てくるhatena-diary.elでございますが、
結構な頻度ではてなスーパーpre記法を書いてるんDA
こんな感じで。
> |python|
class Hoge:
def hoge:
return 'hoge'
こういう風に書くと、以下のように表示される。
class Hoge: def hoge: return 'hoge'
都度このフォーマットをemacsで書くのはなんかしんどいので、
言語を指定したらこのフォーマットが挿入されるelispを書いてみた。
若干雑なのは認めます。
(defun hatena-prepro(arg) (interactive "sType Language:") (insert (format ">|%s| ||<" arg)) ) (global-set-key (kbd "C-x v C") 'hatena-prepro)