LoginSignup
0
0

More than 3 years have passed since last update.

Emacs: init.el file を分割する / init-loader

Last updated at Posted at 2020-09-05

目的

  • init.el file を分割し, 個別 file へ分割する
    • init.el に多くの設定を記述すると, 肥大化するため

方法

導入

分割 file の保存先 dir を作成

$ mkdir ~/.emacs.d/inits/

init-loader を install

M-x package-list-packages
  • list から init-loaderi で選択
  • x で install

init-loader 有効化

  • 以下を記述し, emacs を再起動

    $ emacs ~/.emacs.d/init.el
    
    (package-initialize)
    (init-loader-load)
    
  • 以上で, ~/.emacs.d/inits/ 配下の file を読み込む様になる

init.el から既存設定を移動

  • init.el に記述されている既存設定を分割して, ~/.emacs.d/inits/ へ配置する
  • 以下例

    - .emacs.d
        - init.el
        - inits
            - 0000_init.el
            - 0100_python.el
            - 0110_lisp.el
            - 0200_org.el
    

参考サイト

http://emacs.rubikitch.com/init-loader/

0
0
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
0
0