Skip to content

Instantly share code, notes, and snippets.

@nozma
Created February 23, 2011 14:05
Show Gist options
  • Save nozma/840460 to your computer and use it in GitHub Desktop.
Save nozma/840460 to your computer and use it in GitHub Desktop.
;; デフォルトのinit.elの末尾に追加
;; My Settings for gnupack {{{1
;; key mapping {{{2
;; C-hをバックスペースに
(keyboard-translate ?\C-h ?\C-?)
(global-set-key (kbd "C-x ?") 'help-command)
;; C-x bでミニバッファにバッファ候補表示
(iswitchb-mode t)
(iswitchb-default-keybindings)
;; C-kで行全体削除
(setq kill-whole-line t)
;; M-kでカレントバッファを閉じる
(define-key global-map (kbd "M-k") 'kill-this-buffer)
;; M-Kでカレントフレームを閉じる
(define-key global-map (kbd "M-K") 'delete-frame)
;; C-tでウィンドウ切り替え
(define-key global-map (kbd "C-t") 'other-window)
;; C-Tでフレーム切り替え
(define-key global-map (kbd "C-T") 'other-frame)
;; C-returnで矩形選択
(cua-mode t)
(setq cua-enable-cua-keys nil)
;; visual {{{2
;; ツールバーとメニューバーを非表示
(tool-bar-mode -1)
(menu-bar-mode -1)
;; フレーム設定
(setq default-frame-alist
(append (list
;; '(foreground-color . "azure3")
;; '(background-color . "black")
;; '(border-color . "black")
;; '(mouse-color . "white")
;; '(cursor-color . "white")
'(alpha . (80 80 0 0))
;; 起動時フレームサイズはconfig.iniで[Emacs]のgeometry値をいじる
;; 自分用メモ => 130x43+65+25 (ThinkPad X61 Win7 タスクバー左)
;; '(width . 131)
;; '(height . 45)
;; '(top . 0)
;; '(left . 0)
)
default-frame-alist))
;; backup {{{2
;; バックアップの作成
(setq make-backup-files t)
(setq backup-directory-alist
(cons (cons "\\.*$" (expand-file-name "~/emacsbackup"))
backup-directory-alist))
;; バックアップファイルの設定
(setq version-control t)
(setq kept-new-versions 5)
(setq kept-old-versions 5)
(setq delete-old-versions t)
;; 終了時の状態を保存
(require 'desktop)
(desktop-save-mode 1)
;; elisp {{{2
;; hiwin-mode無効
(hiwin-mode nil)
;; ESS (ESSは%INST_DIR%/app/emacs/site-lisp/以下に配置)
(require 'ess-site)
(setq ess-ask-for-ess-directory nil)
(setq ess-pre-run-hook
'((lambda ()
(setq default-process-coding-system '(sjis . sjis))
(define-key global-map (kbd "C-t") 'other-window)
)))
(defun ess:format-window-1 ()
(split-window-horizontally)
(other-window 1)
(split-window)
(other-window 1))
(add-hook 'ess-pre-run-hook 'ess:format-window-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment