Emacs Tips
.emacs Sample 1(Meadow用)
.emacs Sample 2
Color 設定
.Xresources に以下好きなものを好きなだけ追加
色指定の後ろにスペースが入っていると認識されないので注意。
色は xcolors や "/usr/X11R6/lib/X11/rgb.txt" などを参考にするとよい。
-------------------------------ここから-------------------------------
!普通の背景色 Emacs*background: NavyBlue
!普通の文字色 Emacs*foreground: AntiqueWhite
!カーソルの色 Emacs*cursorColor: PaleGreen2
Emacs*pointerColor: PaleGreen2
!マウスでドラッグした時の背景色
Emacs*region*attributeBackground: DeepSkyBlue
!マウスでドラッグした時の文字色
Emacs*region*attributeForeground: black
! メニューバーの背景と文字の色
Emacs*menubar.background: gray
Emacs*menubar.foreground: black
!メニューバーの背景色
Emacs*pane*background: LightGray
!メニューバーの文字色
Emacs*pane*foreground: MidnightBlue
!Ctrl+マウスボタン で表示されるメニューの背景色
Emacs*menu*background: LightGray
!Ctrl+マウスボタン で表示されるメニューの文字色
Emacs*menu*foreground: black !Emacsダイアログの背景色
Emacs*dialog*background: LightSteelBlue
!Emacsダイアログの文字色
Emacs*dialog*foreground: black
!Emacs のメッセージバーの背景色
Emacs*modeline*attributeBackground: SteelBlue
!Emacs のメッセージバーの文字色
Emacs*modeline*attributeForeground: Cyan
!Emacs のメッセージバーの背景色
Emacs*modeline*attributeBackground: SteelBlue
-------------------------------ここまで-------------------------------
M-x list-colors-display
も参照にするとよい
.emacs
以下の設定は各ユーザーのホームディレクトリにある.emacsに書く
ホイール機能を使う
(cond (window-system
(mwheel-install)
))
警告音のかわりに画面フラッシュ
(setq visible-bell t)
行番号・桁番号をモードラインに表示する
(line-number-mode t) ; 行番号
(column-number-mode t) ; 桁番号
hoge.txt~ みたいなバックアップファイルを作らないようにする
(setq backup-inhibited t)
行末の空白を削除する
(goto-char (point-min))
(while (re-search-forward "[ \t]+$" nil t)
(replace-match "" nil nil))
メニュー,スクロール,ツールバーの表示
(menu-bar-mode -1) ;メニュー
(scroll-bar-mode -1) ;スクロールバー
(tool-bar-mode -1) ;ツールバー
ステータスラインに時間を表示する
(display-time)
最終更新日の自動挿入
ファイルの先頭から 8 行以内に
Time-stamp: <>
あるいは
Time-stamp: " "
と書いてあれば、保存時に自動的に日付が挿入される。
(if (not (memq 'time-stamp write-file-hooks))
(setq write-file-hooks
(cons 'time-stamp write-file-hooks)))
C-x C-f した時に常にホームディレクトリから
(cd "~")
スクロールを一行毎にする
(setq scroll-step 1)
color-theme
color-theme.elをsite-lispなどのパスの通った所に置く
;;; color-theme
(require 'color-theme)
(color-theme-gnome2)
gnome2以外にもいくつかテーマがある。
M-x color-theme-xxxxで選択できる。
メール