about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el32
1 files changed, 29 insertions, 3 deletions
diff --git a/init.el b/init.el index 0fc3118..7be1c30 100644 --- a/init.el +++ b/init.el
@@ -132,9 +132,9 @@
132(acdw/set '((cursor-type bar) 132(acdw/set '((cursor-type bar)
133 (cursor-in-non-selected-windows hollow))) 133 (cursor-in-non-selected-windows hollow)))
134 134
135(defun hook--overwrite-mode-change-cursor () 135;; (defun hook--overwrite-mode-change-cursor ()
136 (setq cursor-type (if overwrite-mode 'hbar 'bar))) 136;; (setq cursor-type (if overwrite-mode 'hbar 'bar)))
137(add-hook 'overwrite-mode-hook #'hook--overwrite-mode-change-cursor) 137;; (add-hook 'overwrite-mode-hook #'hook--overwrite-mode-change-cursor)
138 138
139;; Scrolling 139;; Scrolling
140(acdw/set '((auto-window-vscroll nil) 140(acdw/set '((auto-window-vscroll nil)
@@ -178,6 +178,32 @@
178 (savehist-file ,(acdw/in-dir "savehist.el")))) 178 (savehist-file ,(acdw/in-dir "savehist.el"))))
179 (savehist-mode +1)) 179 (savehist-mode +1))
180 180
181;; God mode
182(acdw/pkg god-mode
183 :binds (("<escape>" god-local-mode)
184 ("i" god-local-mode :map god-local-mode-map)
185 ("." repeat :map god-local-mode-map)
186 ("C-x C-1" delete-other-windows)
187 ("C-x C-2" split-window-below)
188 ("C-x C-3" split-window-right)
189 ("C-x C-0" delete-window))
190 :now ((defun acdw/god-mode-update-cursor ()
191 (setq cursor-type (if (or god-local-mode buffer-read-only)
192 'box
193 'bar)))
194 (defun acdw/god-mode-toggle-on-overwrite ()
195 (if (bound-and-true-p overwrite-mode)
196 (progn
197 (setq cursor-type 'hbar)
198 (god-local-mode-pause))
199 (god-local-mode-resume)
200 (acdw/god-mode-update-cursor)))
201 (require 'god-mode)
202 (god-mode))
203 :hooks (((god-mode-enabled-hook god-mode-disabled-hook)
204 acdw/god-mode-update-cursor)
205 (overwrite-mode-hook acdw/god-mode-toggle-on-overwrite)))
206
181;; Icomplete (-vertical) 207;; Icomplete (-vertical)
182(when (require 'icomplete) 208(when (require 'icomplete)
183 (acdw/set '((completion-ignore-case t) 209 (acdw/set '((completion-ignore-case t)