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
#!/bin/sh | |
# Unicode NFD to NFC | |
# 標準出力に出力されるので、適当にパイプで処理する | |
iconv -f UTF-8-MAC -t UTF-8 input.txt |
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
;; key-combo | |
;; add-hook: on init.el | |
(defun my-haskell-key-combo () | |
(key-combo-define-local (kbd "-") '("-" " -> " "--")) | |
(key-combo-define-local (kbd "<") '("<" " <- " " <= " " =<< " "<<" "<")) | |
(key-combo-define-local (kbd ">") '(">" " >= " " >>= " ">")) | |
(key-combo-define-local (kbd "=") '("=" " = " " == " " => " "==")) | |
(key-combo-define-local (kbd ":") '(":" " :: " "::")) | |
(key-combo-define-local (kbd "+") '("+" " + " " ++ " "++")) | |
) |
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
;; key-combo.el | |
;; http://d.hatena.ne.jp/uk-ar/20111208/1322572618 | |
(require 'key-combo) | |
(key-combo-define-global (kbd "(") '("(" "(`!!')" "( `!!' )" "((")) | |
;; (key-combo-define-global (kbd "(") '("(")) | |
;; (key-combo-define-global (kbd "(") '("(")) | |
;; (key-combo-define-global (kbd "()") '("()")) |
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
% Original Author: iNOUE Koich! http://www.ma.ns.tcu.ac.jp/Pages/ | |
% Original Source: http://www35.tok2.com/home/hashimotolab/LaTeX/mediabb.sty | |
% Mirror Date: August 23, 2012 | |
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesPackage{mediabb}[2006/10/26 v1.9 iNOUE Koich! <[email protected]>] | |
\@ifpackageloaded{graphics}{}{\RequirePackage[dvipdfm]{graphicx}} | |
\define@key{Gin}{usebb}[true]{\expandafter\let\expandafter\if@usebb\csname if#1\endcsname} | |
\let\if@usebb\iffalse | |
\define@key{Gin}{mediaboxonly}[/MediaBox]{\@ifundefined{Gread@find@#1}% |
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
#!/bin/sh | |
#usage: | |
# $ cd /usr/bin | |
# $ fullpath vim | |
# /usr/bin/vim | |
find `pwd` -name $1 |
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
#compdef pandoc | |
typeset -A opt_args | |
local context state line | |
_arguments -s -S \ | |
'(-f+ --from=+)'{-r+,--read=+}'[Specify input format.]:FORMAT:(native json markdown textile rst html docbook latex)'\ | |
'(-r+,--read=+)'{-f+,--from=+}'[Specify input format.]:FORMAT:(native json markdown textile rst html docbook latex)'\ | |
'(-t+ --to=+)'{-w+,--write=+}'[Specify output format.]:FORMAT:(native json plain markdown rst html html5 latex beamer context man mediawiki textile org texinfo docbook opendocument odt docx epub asciidoc slidy slideous dzslides s5 rtf)'\ | |
'(-w+ --write=+)'{-t+,--to=+}'[Specify output format.]:FORMAT:(native json plain markdown rst html html5 latex beamer context man mediawiki textile org texinfo docbook opendocument odt docx epub asciidoc slidy slideous dzslides s5 rtf)'\ |
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
;; ucs-normalize-NFC-region で濁点分離を直す | |
;; M-x ucs-normalize-NFC-buffer または "C-x RET u" で、 | |
;; バッファ全体の濁点分離を直します。 | |
;; 参考: | |
;; http://d.hatena.ne.jp/nakamura001/20120529/1338305696 | |
;; http://www.sakito.com/2010/05/mac-os-x-normalization.html | |
(require 'ucs-normalize) | |
(prefer-coding-system 'utf-8-hfs) | |
(setq file-name-coding-system 'utf-8-hfs) |
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
;; M-f,M-b for backward/forward word exactly | |
(require 'misc) | |
(global-set-key "\M-f" 'forward-to-word) | |
(global-set-key "\M-b" 'backward-to-word) |
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
;; Open the file name being pointed in an other window or dired | |
;; reference: http://kouzuka.blogspot.com/2011/02/emacsurlfinder.html | |
(defun my-directory-or-file-p (path) | |
"return t if path is a directory, | |
return nil if path is a file" | |
(car (file-attributes path))) | |
(defun my-open-emacs-at-point () | |
"open the file with opening emacs" | |
(interactive) |
NewerOlder