2024-07-05 16:38:12 +00:00
|
|
|
|
2024-07-06 15:43:51 +00:00
|
|
|
;;
|
|
|
|
;; Set some defaults
|
|
|
|
;;
|
2024-07-06 09:23:11 +00:00
|
|
|
|
2024-07-06 15:43:51 +00:00
|
|
|
;; automatically revert buffers when they change on disk
|
|
|
|
(global-auto-revert-mode t)
|
|
|
|
;; display line numbers, TODO make this a config option for line number style
|
|
|
|
(global-display-line-numbers-mode 1)
|
|
|
|
;; set our default warning level to error
|
|
|
|
(setq warning-minimum-level :error)
|
|
|
|
;; set the default tab width to 2 spaces
|
|
|
|
(setq-default tab-width 2)
|
|
|
|
(setq tab-width 2)
|
|
|
|
(setq indent-tabs-mode 1)
|
|
|
|
;; Set the default help lines
|
|
|
|
(setq thwap-help-lines '("--------------"
|
|
|
|
"All T.H.W.A.P. commands will start with 'C-c t'"
|
|
|
|
""
|
|
|
|
"Welcome to the T.H.W.A.P. Emacs Dashboard"))
|
|
|
|
|
|
|
|
|
|
|
|
;;
|
|
|
|
;; Golden Ratio Mode helps with window sizing, and is a default feature
|
|
|
|
;;
|
2024-07-05 16:38:12 +00:00
|
|
|
|
|
|
|
;; golden-ratio
|
|
|
|
(straight-use-package 'golden-ratio)
|
|
|
|
(golden-ratio-mode 1)
|
|
|
|
(setq golden-ratio-auto-scale t)
|
|
|
|
|
2024-07-06 15:43:51 +00:00
|
|
|
|
|
|
|
;;
|
|
|
|
;; Set up the T.H.W.A.P. keybindings
|
|
|
|
;;
|
|
|
|
|
2024-07-05 16:38:12 +00:00
|
|
|
;; The T.H.W.A.P. Map
|
|
|
|
;; This is the base starting point for the T.H.W.A.P. keybindings
|
|
|
|
(define-prefix-command 'thwap-map)
|
|
|
|
(global-set-key (kbd "C-c t") 'thwap-map)
|
|
|
|
|
2024-07-06 15:43:51 +00:00
|
|
|
;; Add a command to customize the T.H.W.A.P. group
|
|
|
|
(define-key thwap-map (kbd "C-c") (lambda () (interactive) (customize-group 'thwap-config-group)))
|
|
|
|
(add-to-list 'thwap-help-lines "C-c t C-c : Customize this T.H.W.A.P. Emacs Installation")
|
|
|
|
|
|
|
|
;; quick commenting/uncommenting of a region is just too useful
|
2024-07-05 16:38:12 +00:00
|
|
|
(define-key thwap-map (kbd "c") 'comment-or-uncomment-region)
|
|
|
|
(add-to-list 'thwap-help-lines "C-c t c : Comment or uncomment region")
|
|
|
|
|
2024-07-06 15:43:51 +00:00
|
|
|
;; eval buffer is also very useful
|
2024-07-05 16:38:12 +00:00
|
|
|
(define-key thwap-map (kbd "e b") 'eval-buffer)
|
|
|
|
(add-to-list 'thwap-help-lines "C-c t e b : Eval buffer")
|
|
|
|
|
2024-07-06 15:43:51 +00:00
|
|
|
|
|
|
|
;; our provide statement
|
2024-07-05 16:38:12 +00:00
|
|
|
(provide 'thwap-defaults)
|