Skip to content

Instantly share code, notes, and snippets.

View yaotti's full-sized avatar

Hiroshige Umino yaotti

View GitHub Profile
echo "loading..."
set focuscontent
set titlestring=Firefox
map h <C-p>
map l <C-n>
map j 3j
map k 3k
map J <Space>
;; cf.http://d.hatena.ne.jp/rubikitch/20081104/1225745862
(setq view-read-only t)
(defvar pager-keybind
`( ;; vi-like
("h" . backward-word)
("l" . forward-word)
("j" . next-line)
("k" . previous-line)
;;(";" . gene-word)
@yaotti
yaotti / gist:23719
Created November 11, 2008 02:22
convert let&named-let to lambda
;; named-letの実装復習
;; let, named-let
;; (let name ((var1 exp1) (var2 exp2) ...) body)
;; ->
;; ((lambda (var1 var2 ...)
;; (define name (lambda (var1 var2 ...) body))
;; (name var1 var2 ...))
;; exp1 exp2 ...)
;; ->
;; http://www.bookshelf.jp/soft/meadow_30.html#SEC400
(defun swap-screen()
"Swap two screen,leaving cursor at current window."
(interactive)
(let ((thiswin (selected-window))
(nextbuf (window-buffer (next-window))))
(set-window-buffer (next-window) (window-buffer))
(set-window-buffer thiswin nextbuf)))
(defun swap-screen-with-cursor()
"Swap two screen,with cursor in same buffer."
(defun gisty-post ()
(interactive)
(let ((filename (buffer-file-name))
(shell-file-name "/bin/zsh"))
(start-process-shell-command
"gisty" "*gisty*"
"gisty" (concat "post "
filename))))
;;; Gisty.el
;;; A gisty interface of Emacs
(defun gisty-post ()
(interactive)
(let ((filename (buffer-file-name))
(shell-file-name "/bin/zsh"))
(start-process-shell-command
"gisty" "*gisty*"
"gisty" (concat "post "
;;; Gisty.el
;;; A gisty interface for Emacs
(defun gisty-post ()
(interactive)
(let ((filename (buffer-file-name))
(shell-file-name "/bin/zsh"))
(start-process-shell-command
"gisty" "*gisty*"
"gisty" (concat "post "
(require 'outputz)
;; scheme (gauche) !!
(add-to-list 'outputz-modes 'scheme-mode)
(add-to-list 'outputz-modes 'gauche-mode)
(add-to-list 'outputz-modes 'clmemo-mode)
(add-to-list 'outputz-modes 'change-log-mode)
(setq outputz-uri "http://yaotti.net/outputz/%s")
(defun php-indent-as-html ()
(interactive)
(html-mode)
(message "indenting...")
(save-excursion
(mark-whole-buffer)
(indent-region (region-beginning) (region-end)))
(php-mode)
(message "indent ok."))
;; reopen
;; http://www.bookshelf.jp/soft/meadow_24.html#SEC254
(defun reopen-file ()
(interactive)
(let ((file-name (buffer-file-name))
(old-supersession-threat
(symbol-function 'ask-user-about-supersession-threat))
(point (point)))
(when file-name
(fset 'ask-user-about-supersession-threat (lambda (fn)))