スキップしてメイン コンテンツに移動

投稿

6月, 2010の投稿を表示しています

emacsの設定: ファイル構成

  私のemacsの設定ファイルのファイル構成を以下に示す. base.el: 基本的なemacsの設定をおこなう. ime.el: OSや環境によって,適当なIMEの設定をおこなう. anthy.el: anthy-elの設定をおこなう. atokx.el: atokx for linuxの設定をおこなう. canna.el: japanese-cannaの設定をおこなう. msime.el: windows imeの設定をおこなう. faces.el: 配色などの表示関連の設定をおこなう. packages.el: site-lispの読み込みをおこなう. key-assign: キーボード入力に対する処理方法をいくつか定義する. mouse.el: マウス入力の設定をおこなう. server.el: emacsserverを立ち上げる. hook.el: プログラムフックの設定をおこなう.   ディレクトリ構成は以下のようにしている. ~/ lib/ conf/ emacs/ dot.emacs.el anthy.el atokx.el base.el canna.el faces.el hook.el ime.el key-assign.el mouse.el msime.el package.el server.el

emacsの設定: atokx.el

  ~/lib/conf/emacs/atokx.el (progn (require 'un-define) (setq coding-category-utf-8 'utf-8) (setq iiimcf-server-control-hostlist '("localhost")) (setq iiimcf-server-control-default-language "ja") (setq default-input-method 'iiim-server-control) (require 'iiimcf-sc) ;; 変換トグルの設定 (define-key global-map "\C-\\" 'toggle-input-method) ;; Shift-Space または 半角/全角 でも起動 (global-set-key [?\S-\ ] 'toggle-input-method) (global-set-key [zenkaku-hankaku] 'toggle-input-method) ;;モードライン表示をすっきりと ;;(setcar default-mode-line-format "") ) >> emacsの設定

emacsの設定: dot.emacs.el

  ~/lib/conf/emacs/dot.emacs.el (load "~/lib/conf/emacs/base.el") (load "~/lib/conf/emacs/ime.el") (load "~/lib/conf/emacs/server.el") (load "~/lib/conf/emacs/faces.el") (load "~/lib/conf/emacs/mouse.el") (load "~/lib/conf/emacs/hook.el") (load "~/lib/conf/emacs/key-assign.el") (load "~/lib/conf/emacs/package.el") >> emacsの設定

emacsの設定: canna.el

  ~/lib/conf/emacs/canna.el (progn (if (and (or (and (boundp 'CANNA) CANNA) (<= emacs-major-version 20)) (not (equal emacs-ime "canna-tamago"))) (progn ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; emacs-dl-canna/emcws の場合 (load-library "canna") ;; color-mate を使わないで、漢字変換に色を付けたい時に ;(setq canna-use-color t) ;; フェンスモードでなくアンダーラインを使う ;;(setq canna-with-fences nil) ;;(setq canna-underline t) ;; Canna サーバの指定 (if (null (getenv "CANNA_SERVER")) (setq canna-server "unix") (setq canna-server (getenv "CANNA_SERVER"))) (canna) ;; Canna を Ctrl-\ で起動します。コメントアウトすれば、 ;; Ctrl-\ で skk が立ち上がります。 (global-set-key "\C-\\" 'canna-toggle-japanese-mode) (global-set-key "\C-o" 'canna-toggle-japanese-mode) ;; Shift-Space または 半角/全角 でも起動 (global-set-key [?\S-\ ] 'canna-toggle-japanese-mode) (global-set-key [zenkaku-

emacsの設定: base.el

  ~/lib/conf/emacs/base.el ;;; 言語環境の指定 (set-language-environment "Japanese") ;;; 漢字コードの設定 (if (equal (getenv "LANG") "ja_JP.UTF-8") (progn (cond ((<= emacs-major-version 21) (require 'un-define))) (set-default-coding-systems 'utf-8) (set-buffer-file-coding-system 'utf-8-unix) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8)) ;;; 日本語メニューバー (UTF-8のメニューバーを用意?) ;(cond ; (and (>= emacs-major-version 21) ; (equal (substring (concat (getenv "LANG") "__") 0 2) "ja") ; (load "menu-tree-utf8"))) (progn (set-default-coding-systems 'euc-jp) (set-buffer-file-coding-system 'euc-jp-unix) (set-terminal-coding-system 'euc-jp) (set-keyboard-coding-system 'euc-jp) ;;; 日本語メニューバー ;(cond ;((and (>= emacs-major-version 21) ;(equal (substring (concat (getenv "LANG"

emacsの設定: msime.el

  ~/lib/conf/emacs/msime.el (when (fboundp 'mw32-ime-initialize) (setq default-input-method "MW32-IME") (setq-default mw32-ime-mode-line-state-indicator "[--]") (setq mw32-ime-mode-line-state-indicator-list '("[--]" "[あ]" "[--]")) (mw32-ime-initialize) (wrap-function-to-control-ime 'y-or-n-p nil nil) (wrap-function-to-control-ime 'yes-or-no-p nil nil) (wrap-function-to-control-ime 'universal-argument t nil) (wrap-function-to-control-ime 'read-string nil nil) (wrap-function-to-control-ime 'read-from-minibuffer nil nil) (wrap-function-to-control-ime 'read-key-sequence nil nil) (wrap-function-to-control-ime 'map-y-or-n-p nil nil) (wrap-function-to-control-ime 'read-passwd t t) ; don't work as we expect. ) >> emacsの設定

emacsの設定: faces.el

  ~/lib/conf/emacs/faces.el ;;; 起動画面の非表示 (setq inhibit-startup-message t) ;;; タイトルバー ;;(setq frame-title-format (format "emacs@%s : %%f" (system-name))) ;;; メニューバーを消す (menu-bar-mode nil) ;;; ツールバーを消す (tool-bar-mode nil) ;;; cursor の blink を止める ;(blink-cursor-mode nil) ;;; スクロールバーを右側に表示する (set-scroll-bar-mode 'right) ;;; visible-bell (setq visible-bell nil) ;;; 行番号を表示する (line-number-mode t) ;;; active でない window の空 cursor を出さない (setq cursor-in-non-selected-windows nil) ;;; フォントのスケールをしない (setq scalable-fonts-allowed nil) ;;; mark 領域に色付け (setq transient-mark-mode nil) ;;; image.el における JPEG の判定基準を緩める ;(eval-after-load "image" ; '(setq image-type-regexps ; (cons (cons "^\377\330" 'jpeg) image-type-regexps))) ;;; 表示の行間を拡げる (setq line-spacing 2) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; フォントの設定 ;; ~/.emacsによるフォントの読み込みは遅いので, ;; UNIX系OSの場合は~/.Xresourcesに記述 ;; Windowsの場合は以下で設定 ;;(if (eq window-system

emacsの設定: hook.el

  ~/lib/conf/emacs/hook.el ;;;;;;;;;;;;;;;;;;;; ;; verilog-mode ;;;;;;;;;;;;;;;;;;;; (add-hook 'verilog-mode-hook '(lambda () (font-lock-mode 1))) ;;;;;;;;;;;;;;;;;;;; ;; Dired ;;;;;;;;;;;;;;;;;;;; ;; Dired のリストフォーマット設定 (ls へのオプション) ;; (setq dired-listing-switches "-aoFLt") ;; ls の出力を英語にする(ls を LANG=C で実行) (add-hook 'dired-mode-hook '(lambda () (setenv "LANG" "C"))) ;;;;;;;;;;;;;;;;;;;; ;; c-mode ;;;;;;;;;;;;;;;;;;;; (add-hook 'c-mode-common-hook '(lambda () (setq indent-tabs-mode nil) ; use 'spaces' instead of 'tab' (c-set-style "k&r") ;; c-mode, two space 'tab', replace tab with spaces ;;(setq-default tab-width 5) (setq c-basic-offset 4))) ;(put 'set-goal-column 'disabled nil) ;;;;;;;;;;;;;;;;;;;; ;; wanderlust ;;;;;;;;;;;;;;;;;;;; (add-hook 'wl-summary-mode-hook '(lambda () (defun wl-summary-redisplay-force ()

emacsの設定: ime.el

  ~/lib/conf/emacs/ime.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; IMEの設定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (cond ((eq system-type 'berkeley-unix) (setq emacs-ime (getenv "EMACS_IME"))) ((eq system-type 'gnu/linux) (setq emacs-ime (getenv "EMACS_IME"))) ((eq system-type 'linux) (setq emacs-ime (getenv "EMACS_IME"))) ((eq system-type 'berkeley-unix) (setq emacs-ime (getenv "EMACS_IME"))) ((eq system-type 'windows-nt) (setq emacs-ime "ms-ime")) ((eq system-type 'darwin) (setq emacs-ime "kotoeri")) ((eq system-type 'cygwin) (setq emacs-ime "none")) (t (setq emacs-ime "none"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; かんなの設定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (if (or (equal emacs-ime "canna&qu

emacsの設定: mouse.el

  ~/lib/conf/emacs/mouse.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ホイールマウス対応 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun up-slightly () (interactive) (scroll-up 5)) (defun down-slightly () (interactive) (scroll-down 5)) (global-set-key [mouse-4] 'down-slightly) (global-set-key [mouse-5] 'up-slightly) (defun up-one () (interactive) (scroll-up 1)) (defun down-one () (interactive) (scroll-down 1)) (global-set-key [S-mouse-4] 'down-one) (global-set-key [S-mouse-5] 'up-one) (defun up-a-lot () (interactive) (scroll-up)) (defun down-a-lot () (interactive) (scroll-down)) (global-set-key [C-mouse-4] 'down-a-lot) (global-set-key [C-mouse-5] 'up-a-lot) >> emacsの設定

emacsの設定: package.el

  ~/lib/conf/emacs/package.el ;; load-path (setq load-path (append '( "~/lib/conf/emacs/site-lisp/apel" "~/lib/conf/emacs/site-lisp/elscreen" "~/lib/conf/emacs/site-lisp/emu" "~/lib/conf/emacs/site-lisp/flim" "~/lib/conf/emacs/site-lisp/gnuplot-mode" "~/lib/conf/emacs/site-lisp/howm" "~/lib/conf/emacs/site-lisp/ruby-mode" "~/lib/conf/emacs/site-lisp/semi" "~/lib/conf/emacs/site-lisp/w3m" "~/lib/conf/emacs/site-lisp/wl" "~/lib/conf/emacs/site-lisp/riece" "~/lib/conf/emacs/site-lisp/yatex" ) load-path)) ;;;;;;;;;;;;;;;;;;;; ;; dot-mode ;;;;;;;;;;;;;;;;;;;; (load-file "~/lib/conf/emacs/site-lisp/dot-mode/graphviz-dot-mode.el") ;;;;;;;;;;;;;;;;;;;; ;; gnuplot-mode ;;;;;;;;;;;;;;;;;;;; ;; these lines enable the use of gnuplot mode (autoload 'gnuplot-mode "gnuplot&quo

emacsの設定: key-assign.el

~/lib/conf/emacs/key-assign.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (load-file "~/lib/conf/emacs/site-lisp/smart-compile/smart-compile.el") (when (require 'redo nil t) (define-key ctl-x-map (if window-system "U" "r") 'redo)) (load-file "~/lib/conf/emacs/site-lisp/redo/redo.el") ;;; [Home] Key と [End] Key を従来の動作に戻す (define-key global-map [home] 'beginning-of-buffer) (define-key global-map [end] 'end-of-buffer) ;;; Ctrl-H を前1文字削除に変更し, ;;;HelpをShift + Ctrl + hに割り当て (let ((the-table (make-string 128 0))) (let ((i 0)) (while (< i 128) (aset the-table i i) (setq i (1+ i)))) ;; Swap ^H and DEL ; (aset the-table ?\177 ?\^h) (aset the-table ?\^h ?\177) (setq keyboard-translate-table the-table)) ;;; function keys (global-set-key [f3] 'undo) (global-set-key [f4] 'redo) (global-set-key [f5] 'smart-compile) (global-set-key [f6] "\C-x\C-s") (global-set-k

emacsの設定: anthy.el

  ~/lib/conf/emacs/anthy.el (progn ;; anthy.el をロードできるようにする (load-file "~/lib/conf/emacs/site-lisp/anthy/leim-list.el") (push "~/lib/conf/emacs/site-lisp/anthy/" load-path) ;; anthy.el をロードする。 (load-library "anthy") ;; japanese-anthy をデフォルトの input-method にする。 (setq default-input-method "japanese-anthy") ;; 変換開始キー (define-key global-map "\C-\\" 'toggle-input-method) ;;(define-key global-map "\C-o" 'toggle-input-method) ;;(define-key global-map [kanji] 'toggle-input-method) ;;(define-key global-map [M-kanji] 'toggle-input-method) ;;(global-set-key [?\S-\ ] 'toggle-input-method) ;;(global-set-key [zenkaku-hankaku] 'toggle-input-method) ;; バックスペースでローマ字単位で消す ;;(anthy-set-break-into-roman 't) ;; 句読点を「,.」に変更 (anthy-load-hiragana-map anthy-alt-char-map) ;;変換時の文字の色 (set-face-foreground 'anthy-highlight-face "white") (set-face-background 'a

Debian install

OSインストール   インストーラでの設定は,基本ソフトウェア以外のチェックを外し,インストール.   基本的なものはディスクからインストールするため,ネットからパッケージは落とさないよう設定する. 不要なソフトウェアの削除 $ aptitude remove nano ロケールの設定 $ dpkg-reconfigure locales aptのダウンロードサイトをDVDに変更   X window systemは,ネットからダウンロードすれば時間がかかるので(最近はネットも速いけど),DVDからインストールすることとする.   ネットからダウンロードしない設定でインストールをおこなっていれば,設定されているはず.   /etc/apt/sources.list deb-src cdrom:[Debian GNU/Linux 5.0.2 _Lenny_ - Official Multi-architecture i386/amd64/source DVD #1 20090628-18:45]/ lenny main deb cdrom:[Debian GNU/Linux 5.0.2 _Lenny_ - Official Multi-architecture i386/amd64/source DVD #1 20090628-18:45]/ lenny main deb http://security.debian.org/ lenny/updates main deb-src http://security.debian.org/ lenny/updates main deb http://volatile.debian.org/debian-volatile lenny/volatile main deb-src http://volatile.debian.org/debian-volatile lenny/volatile main X windowのインストール $ aptitude install x-window-system aptのダウンロードサイトをネットワークに変更   /etc/apt/source.list   aptのパッケージのダウンロードリストを,DVDからネットワークサイトに変更する. deb http://ftp.jp.debia

dot.screenrc

screenの私的設定 # $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $ # # /etc/screenrc # # This is the system wide screenrc. # # You can use this file to change the default behavior of screen system wide # or copy it to ~/.screenrc and use it as a starting point for your own # settings. # # Commands in this file are used to set options, bind screen functions to # keys, redefine terminal capabilities, and to automatically establish one or # more windows at the beginning of your screen session. # # This is not a comprehensive list of options, look at the screen manual for # details on everything that you can put in this file. # # ------------------------------------------------------------------------------ # SCREEN SETTINGS # ------------------------------------------------------------------------------ ### escape charactor escape ^t^t ### startup message startup_message off nethack on #defflow on # will force screen to process ^S/^Q deflogin on ###autodetach off auto