Advertisement
wolfjb

Emacs Minimal Config

Jul 5th, 2024
1,447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 5.01 KB | None | 0 0
  1. ;;; init.el --- Minimal initialization file -*- lexical-binding: t; -*-
  2.  
  3. ;;; Commentary:
  4. ;; Minimal initialization to get a well configured Emacs, no packages
  5. ;; installed.
  6.  
  7. ;;; Code:
  8.  
  9. (custom-set-variables
  10.  ;; custom-set-variables was added by Custom.
  11.  ;; If you edit it by hand, you could mess it up, so be careful.
  12.  ;; Your init file should contain only one such instance.
  13.  ;; If there is more than one, they won't work right.
  14.  '(Man-notify-method 'aggressive)
  15.  '(after-save-hook '(executable-make-buffer-file-executable-if-script-p))
  16.  '(bidi-paragraph-direction 'left-to-right)
  17.  '(bookmark-save-flag 1)
  18.  '(column-number-mode t)
  19.  '(completion-auto-select 'second-tab)
  20.  '(completion-category-overrides '((file (styles partial-completion))))
  21.  '(completion-cycle-threshold 3)
  22.  '(completion-styles '(basic initials partial-completion emacs22))
  23.  '(completions-detailed t)
  24.  '(completions-format 'vertical)
  25.  '(completions-group t)
  26.  '(completions-group-sort 'alphabetical)
  27.  '(completions-max-height 10)
  28.  '(delete-selection-mode t)
  29.  '(dired-auto-revert-buffer t)
  30.  '(dired-dwim-target t)
  31.  '(dired-listing-switches "-al --group-directories-first")
  32.  '(dynamic-completion-mode t)
  33.  '(ediff-window-setup-function 'ediff-setup-windows-plain)
  34.  '(eglot-autoshutdown t)
  35.  '(electric-pair-mode t)
  36.  '(epg-pinentry-mode 'loopback)
  37.  '(fast-but-imprecise-scrolling t)
  38.  '(font-use-system-font t)
  39.  '(global-auto-revert-mode t)
  40.  '(global-auto-revert-non-file-buffers t)
  41.  '(global-display-line-numbers-mode t)
  42.  '(global-so-long-mode t)
  43.  '(ibuffer-movement-cycle nil)
  44.  '(ibuffer-old-time 24)
  45.  '(indent-tabs-mode nil)
  46.  '(isearch-allow-motion t)
  47.  '(isearch-lazy-count t)
  48.  '(isearch-yank-on-move 'shift)
  49.  '(kill-do-not-save-duplicates t)
  50.  '(load-prefer-newer t)
  51.  '(org-adapt-indentation t t)
  52.  '(org-agenda-files nil)
  53.  '(org-agenda-include-diary t t)
  54.  '(org-duration-format '(("h") (special . h:mm)) t)
  55.  '(org-export-backends '(ascii html icalendar latex md odt) t)
  56.  '(org-outline-path-complete-in-steps nil t)
  57.  '(org-refile-allow-creating-parent-nodes 'confirm t)
  58.  '(org-refile-targets '((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9)) t)
  59.  '(org-refile-use-outline-path 'file t)
  60.  '(package-archive-priorities
  61.    '(("gnu" . 99)
  62.      ("nongnu" . 80)
  63.      ("stable" . 70)
  64.      ("melpa" . 0)))
  65.  '(prog-mode-hook
  66.    '(flyspell-prog-mode abbrev-mode flymake-mode display-line-numbers-mode))
  67.  '(repeat-mode t)
  68.  '(savehist-mode t)
  69.  '(scroll-conservatively 101)
  70.  '(speedbar-update-flag t)
  71.  '(speedbar-use-images nil)
  72.  '(switch-to-buffer-in-dedicated-window 'pop)
  73.  '(switch-to-buffer-obey-display-actions t)
  74.  '(tab-always-indent 'complete)
  75.  '(tab-bar-mode t)
  76.  '(tab-bar-new-tab-choice "*scratch*")
  77.  '(tab-bar-new-tab-to 'rightmost)
  78.  '(tab-bar-select-tab-modifiers '(control meta))
  79.  '(tab-bar-tab-hints t)
  80.  '(tempo-interactive t)
  81.  '(text-mode-hook
  82.    '(turn-on-flyspell turn-on-auto-fill text-mode-hook-identify))
  83.  '(tool-bar-mode nil)
  84.  '(whitespace-action '(cleanup auto-cleanup) t)
  85.  '(whitespace-style '(face empty trailing tab-mark indentation::space) t)
  86.  '(winner-mode t)
  87.  '(xref-show-definitions-function 'xref-show-definitions-completing-read))
  88. (custom-set-faces
  89.  ;; custom-set-faces was added by Custom.
  90.  ;; If you edit it by hand, you could mess it up, so be careful.
  91.  ;; Your init file should contain only one such instance.
  92.  ;; If there is more than one, they won't work right.
  93.  '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant normal :weight regular :height 158 :width normal))))
  94.  '(fixed-pitch ((t (:inherit (default)))))
  95.  '(fixed-pitch-serif ((t (:inherit (default)))))
  96.  '(tab-bar-tab ((t (:box (:line-width (2 . -2) :color "orange") :foreground "LightSteelBlue" :background "black" :inherit mode-line-active))))
  97.  '(tab-bar-tab-inactive ((t (:foreground "SteelBlue" :background "grey75" :inherit tab-bar-tab)))))
  98.  
  99. ;;;; key bindings
  100. (global-set-key [remap list-buffers] #'ibuffer-list-buffers)
  101. (global-set-key (kbd "C-+") #'text-scale-increase)
  102. (global-set-key (kbd "C--") #'text-scale-decrease)
  103. (global-set-key (kbd "M-#") #'dictionary-lookup-definition)
  104.  
  105. ;;;;; window navigation and control
  106. (define-prefix-command 'minimal-windows-key-map)
  107.  
  108. (keymap-set 'minimal-windows-key-map "u" 'winner-undo)
  109. (keymap-set 'minimal-windows-key-map "r" 'winner-redo)
  110. (keymap-set 'minimal-windows-key-map "n" 'windmove-down)
  111. (keymap-set 'minimal-windows-key-map "p" 'windmove-up)
  112. (keymap-set 'minimal-windows-key-map "b" 'windmove-left)
  113. (keymap-set 'minimal-windows-key-map "f" 'windmove-right)
  114.  
  115. (keymap-global-set "C-c w" 'minimal-windows-key-map)
  116.  
  117.  
  118. ;;;; lists
  119.  
  120. (add-to-list 'display-buffer-alist
  121.              '("^\\*Dictionary\\*"
  122.                (display-buffer-in-side-window)
  123.                (side . left)
  124.                (window-width . 70)))
  125. (add-to-list 'display-buffer-alist
  126.              '("\\*Help\\*"
  127.                (display-buffer-reuse-window display-buffer-pop-up-window)))
  128.  
  129.  
  130.  
  131. (provide 'init)
  132.  
  133. ;; Local Variables:
  134. ;; eval: (eldoc-mode)
  135. ;; eval: (outline-minor-mode 1)
  136. ;; End:
  137.  
  138. ;;; init.el ends here
  139.  
Tags: emacs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement