.emacsのバッファにて
M-x eval-current-buffer
または、
M-x road-file
で
~/.emacs
を指定。
$emacs -q
emacsを立ち上げてoptionsメニューの「Set Font/Fontset...」をクリック
フォントサイズの変更は、C-x C-+ で拡大、C-x C--で縮小
$emacs -nw
※いくつか使えないキーバインドがある
M-x toggle-truncate-linesで折り返し。
一行の文字数を変える場合
http://www.serendip.ws/archives/1228
シェルから現在のEmacsにアクセスする。Emacsの起動時間を省くことができる。 編集が終了したら C-x #(server-edit)
;;; emacsclient (server-start)
# emacs client export EDITOR=emacsclient export VISUAL=emacsclient
やり直し(undoの逆)を追加する。ここではM-zとしてある。 インストール
M-x install-elisp-from-emacswiki redo+.el
;;; redo+.el ;; M-x install-elisp-from-emacswiki redo+.el (require 'redo+) (global-set-key (kbd "\M-z" ) 'redo) (setq undo-no-redo t); 過去のundoがredoされないようにする ;; 大量のundoに耐えられるようにする (setq undo-limit 600000) (setq undo-strong-limit 900000)
インターネット上のEmacs Lispをインストールする作業を自動化する。 auto-install.elのインストールは手動で行う必要がある。
$mkdir -p ~/.emacs.d/auto-install $cd ~/.emacs.d/auto-install $wget http://www.emacswiki.org/emacs/download/auto-install.el $emacs --batch -Q -f batch-byte-compile auto-install.el
;;;Emacs Lispインストーラを利用 (add-to-list 'load-path "~/.emacs.d/auto-install") ;;(install-elisp-from-emacswiki "auto-install.el") (require 'auto-install) ;;起動時にEmacswikiのページを補完候補に加える (auto-install-update-emacswiki-package-name t) ;;install-elisp.el互換モード (auto-install-compatibility-setup) ;;ediff関連のバッファを一つのフレームにまとめる (setq ediff-window-setup-function 'ediff-setup-windows-plain)
リモートファイル名の書式 /METHOD:USERNAME@HOSTNAME:FILENAME
例)ssh でユーザ「foo」がホスト「foonet」にある「~/.bashrc」を編集する C-x C-f /ssh:foo@foonet:~/.bashrc
ssh-agentやkeychainなどのパスワード入力を回避するプログラムを使っているならパスワードは聞かれない タブでファイル名の補完可能。
特定のディレクトリ内のファイルを、ファイル作成時に自動挿入する。 作成するときに「Perform \.c& auto-jinsertion?(y or n)」と聞かれるので、挿入するならy 自動挿入するファイル、ディレクトリがない場合は事前に作成
(auto-insert-mode) ;;最後の/は必須 (setq auto-insert-directory "~/.emacs.d/insert/");自動挿入するファイルのあるディレクトリ (define-auto-insert "\\.c" "c-template.c");自動挿入するファイル
vline についてのエラーはvline.elをインストール
M-x womanでmanをEmacsで読む
M-x woman ミニバッファにて Manual Entry:マニュアル名
n/p | セクション間を前後に移動 |
g | セクション名の入力によるジャンプ |
s | See Alsoセクションへジャンプ |
マニュアルにカーソルを合わせてrキーで該当マニュアルを別バッファでオープン |
※manコマンドを使用せず、Emacsでマニュアルを表示するという、without man が由来。
参考文献