summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2022-08-15 00:33:05 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2022-08-15 00:33:05 +0900
commitce37ae84876b7f131325f1ab1268fe1ca5873496 (patch)
treee7192812465cd8f4abd210dee8da0197681fdcb5
Initical commit.
-rw-r--r--.gitignore1
-rw-r--r--init.org105
2 files changed, 106 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8aad2b4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.el \ No newline at end of file
diff --git a/init.org b/init.org
new file mode 100644
index 0000000..dd77033
--- /dev/null
+++ b/init.org
@@ -0,0 +1,105 @@
+#+TITLE: サブ環境の Emacs の設定ファイル
+
+* はじめに
+
+サブ環境用の Emacs の設定ファイル。
+可能な限りの可搬性を優先し、自動化や一部の詳細な設定はこのファイルではおこなわない。
+
+** 設定すること/しないこと
+
+可搬性を優先するため下記の設定はこのファイルではない。
+
+- 見た目に関連する設定
+ - フォントの設定
+ - テーマの設定
+- Gnus の設定
+
+それに対して org 関連は重要なため設定する。
+どの環境も =~/org= を使う org のファイル置き場と仮定する。
+なお、メイン環境との =~/org= の共有はしないとする。
+
+* 環境構築の仕方
+
+ホームディレクトリで下記を実行する。
+
+#+begin_src shell :eval no
+ git clone https://git.tojo.tokyo/init.el.git
+#+end_src
+
+=~/.emacs.d/init.el= の先頭に下記を追記。
+
+#+begin_example
+ (org-babel-load-file "~/init.el.git/init.org")
+#+end_example
+
+設定はこれで完了。
+
+環境依存の設定はこのファイルを変更するのではなくて、
+=~/.emacs.d/init.el= に設定を追記するように。
+
+* パッケージマネージャの導入
+
+=straight.el= を導入する。
+
+#+begin_src emacs-lisp
+ (defvar bootstrap-version)
+ (let ((bootstrap-file
+ (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
+ (bootstrap-version 5))
+ (unless (file-exists-p bootstrap-file)
+ (with-current-buffer
+ (url-retrieve-synchronously
+ "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
+ 'silent 'inhibit-cookies)
+ (goto-char (point-max))
+ (eval-print-last-sexp)))
+ (load bootstrap-file nil 'nomessage))
+#+end_src
+
+* バックアップファイルを作らないようにする
+
+助けられた経験よりも邪魔に感じることの方が明らかに多いため。
+
+#+begin_src emacs-lisp
+ (setq make-backup-files nil)
+#+end_src
+
+* インデントの設定
+
+デフォルト設定は空白とタブを混ぜてインデントしてしまう。
+空白のみを使ってインデントする。
+
+#+begin_src emacs-lisp
+ (setq-default indent-tabs-mode nil)
+#+end_src
+
+* 文字コードの設定
+
+#+begin_src emacs-lisp
+ (prefer-coding-system 'utf-8-unix)
+#+end_src
+
+* undo-tree-mode の設定
+
+#+begin_src emacs-lisp
+ (straight-use-package 'undo-tree)
+#+end_src
+
+#+begin_src emacs-lisp
+ (setq undo-tree-auto-save-history nil)
+ (global-undo-tree-mode)
+#+end_src
+
+* ベルを無効化する
+
+ベルが鳴らないようにする。
+
+#+begin_src emacs-lisp
+ (setq ring-bell-function 'ignore)
+#+end_src
+
+* SKK
+
+#+begin_src emacs-lisp
+ (straight-use-package 'ddskk)
+#+end_src