2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

よく使うEmacs初期設定

Last updated at Posted at 2022-04-29
はじめに

よく使うEmacs初期設定をまとめました。Emacsの起動時は、

  1. ~/.emacs.el
  2. ~/.emacs
  3. ~/.emacs.d/init.el
  4. ~/.emacs.d/init

の順に優先的にどれか一つだけ読み込まれます。今回は~/.emacsに書き込みます。

「Ctrl-h」をBackSpaceに変換

;; C-h
(global-set-key "\C-h" 'delete-backward-char)
;; helpを退避
(global-set-key "\C-c\C-h" 'help-command)

デフォルトの起動時のメッセージを非表示

;; デフォルトの起動時のメッセージを表示しない
(setq inhibit-startup-message t)

括弧を自動補完

;; 括弧を自動補完
(electric-pair-mode 1)
;; 括弧のペアを光らせる
(show-paren-mode 1)

メニューバーの非表示

;; メニューバーの非表示
(menu-bar-mode -1)
;; ツールバーの非表示
(tool-bar-mode -1)

あとはemacsを再起動するか、以下のように.emacsをリロードすれば設定が有効になります。

M-x load-file (RETURN) ~/.emacs
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?