General update
This commit is contained in:
parent
f72c8805ea
commit
504efc57e7
9 changed files with 71 additions and 62 deletions
18
README.md
18
README.md
|
@ -1,10 +1,12 @@
|
||||||

|
[](./LICENSE)
|
||||||

|
|
||||||
|
|
||||||
This is an Emacs configuration for stubborn vimmers and silent demon
|
This is an Emacs configuration for stubborn vimmers and silent demon
|
||||||
annihilating protagonists alike. It strives to emulate vim as best it can, and
|
annihilating protagonists alike. It strives to emulate vim as best it can, and
|
||||||
surpass it in any way possible.
|
surpass it in any way possible.
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -44,7 +46,7 @@ To get a picture of what's in here, check out:
|
||||||
* Project-wide search and replace with **helm-ag** (press shift-Tab while in results
|
* Project-wide search and replace with **helm-ag** (press shift-Tab while in results
|
||||||
buffer)
|
buffer)
|
||||||
* Session persistence (and tab emulation) with **workgroups2**
|
* Session persistence (and tab emulation) with **workgroups2**
|
||||||

|

|
||||||
* Run code inline with **quickrun**
|
* Run code inline with **quickrun**
|
||||||
* REPLs for many major modes with **repl-toggle**, including Ruby, Python,
|
* REPLs for many major modes with **repl-toggle**, including Ruby, Python,
|
||||||
PHP, JS, Elisp, Haskell and Lua.
|
PHP, JS, Elisp, Haskell and Lua.
|
||||||
|
@ -66,14 +68,14 @@ To get a picture of what's in here, check out:
|
||||||
* **Modeline improvements**
|
* **Modeline improvements**
|
||||||
* evil-search/iedit/evil-substitute mode-line integration:
|
* evil-search/iedit/evil-substitute mode-line integration:
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
* Macro-recording indicator:
|
* Macro-recording indicator:
|
||||||
|
|
||||||

|

|
||||||
* Show (py|rb)env version in mode-line
|
* Show (py|rb)env version in mode-line
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
---
|
---
|
||||||

|

|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
(use-package evil
|
(use-package evil
|
||||||
:init
|
:init
|
||||||
;; Disable highlights on insert-mode
|
|
||||||
(add-hook 'evil-insert-state-entry-hook 'evil-ex-nohighlight)
|
|
||||||
(setq evil-magic t
|
(setq evil-magic t
|
||||||
evil-want-C-u-scroll t
|
evil-want-C-u-scroll t
|
||||||
evil-ex-visual-char-range t ; column range for ex commands
|
evil-ex-visual-char-range t ; column range for ex commands
|
||||||
|
@ -25,7 +23,7 @@
|
||||||
;; Color-coded state cursors
|
;; Color-coded state cursors
|
||||||
evil-default-cursor (face-attribute 'minibuffer-prompt :foreground nil t)
|
evil-default-cursor (face-attribute 'minibuffer-prompt :foreground nil t)
|
||||||
evil-normal-state-cursor 'box
|
evil-normal-state-cursor 'box
|
||||||
evil-emacs-state-cursor `(,(face-attribute 'highlight :foreground nil t) box)
|
evil-emacs-state-cursor `(,(face-attribute 'shadow :foreground nil nil) box)
|
||||||
evil-insert-state-cursor 'bar
|
evil-insert-state-cursor 'bar
|
||||||
evil-visual-state-cursor 'hollow
|
evil-visual-state-cursor 'hollow
|
||||||
|
|
||||||
|
@ -42,6 +40,8 @@
|
||||||
(add-hook 'evil-operator-state-entry-hook 'show-paren-mode)
|
(add-hook 'evil-operator-state-entry-hook 'show-paren-mode)
|
||||||
(add-hook 'evil-operator-state-exit-hook 'show-paren-mode-off)
|
(add-hook 'evil-operator-state-exit-hook 'show-paren-mode-off)
|
||||||
(add-hook 'evil-normal-state-entry-hook 'show-paren-mode-off)
|
(add-hook 'evil-normal-state-entry-hook 'show-paren-mode-off)
|
||||||
|
;; Disable highlights on insert-mode
|
||||||
|
(add-hook 'evil-insert-state-entry-hook 'evil-ex-nohighlight)
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(evil-mode 1)
|
(evil-mode 1)
|
||||||
|
@ -344,17 +344,15 @@
|
||||||
:config
|
:config
|
||||||
(setq evil-escape-key-sequence "jk"
|
(setq evil-escape-key-sequence "jk"
|
||||||
evil-escape-delay 0.25)
|
evil-escape-delay 0.25)
|
||||||
(evil-escape-mode +1)
|
(push 'neotree-mode evil-escape-excluded-major-modes)
|
||||||
|
;; evil-escape causes noticable lag in commands that start with j, so we
|
||||||
;; evil-escape causes noticable lag in linewise motions in visual mode, so disable it in
|
;; enable it only where we need it.
|
||||||
;; visual mode
|
|
||||||
(defun doom|evil-escape-disable () (evil-escape-mode -1))
|
(defun doom|evil-escape-disable () (evil-escape-mode -1))
|
||||||
(defun doom|evil-escape-enable () (evil-escape-mode +1))
|
(defun doom|evil-escape-enable () (evil-escape-mode +1))
|
||||||
(add-hook 'evil-visual-state-entry-hook 'doom|evil-escape-disable)
|
(add-hook 'evil-insert-state-entry-hook 'doom|evil-escape-enable)
|
||||||
(add-hook 'evil-visual-state-exit-hook 'doom|evil-escape-enable)
|
(add-hook 'evil-insert-state-exit-hook 'doom|evil-escape-disable)
|
||||||
(add-hook 'evil-insert-state-exit-hook 'doom|evil-escape-enable)
|
(add-hook 'evil-replace-state-entry-hook 'doom|evil-escape-enable)
|
||||||
|
(add-hook 'evil-replace-state-exit-hook 'doom|evil-escape-disable))
|
||||||
(push 'neotree-mode evil-escape-excluded-major-modes))
|
|
||||||
|
|
||||||
(provide 'core-evil)
|
(provide 'core-evil)
|
||||||
;;; core-evil.el ends here
|
;;; core-evil.el ends here
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
:commands (helm helm-other-buffer helm-mode)
|
:commands (helm helm-other-buffer helm-mode)
|
||||||
:init
|
:init
|
||||||
(defvar helm-global-prompt "››› ")
|
(defvar helm-global-prompt "››› ")
|
||||||
(setq-default
|
(defvar helm-projectile-find-file-map (make-sparse-keymap))
|
||||||
helm-quick-update t
|
(setq helm-quick-update t
|
||||||
;; Speedier without fuzzy matching
|
;; Speedier without fuzzy matching
|
||||||
helm-mode-fuzzy-match nil
|
helm-mode-fuzzy-match nil
|
||||||
helm-buffers-fuzzy-matching nil
|
helm-buffers-fuzzy-matching nil
|
||||||
|
@ -24,8 +24,6 @@
|
||||||
;; Don't wrap item cycling
|
;; Don't wrap item cycling
|
||||||
helm-move-to-line-cycle-in-source t)
|
helm-move-to-line-cycle-in-source t)
|
||||||
|
|
||||||
(defvar helm-projectile-find-file-map (make-sparse-keymap))
|
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(set-keymap-parent helm-projectile-find-file-map helm-map)
|
(set-keymap-parent helm-projectile-find-file-map helm-map)
|
||||||
(map! :map helm-map
|
(map! :map helm-map
|
||||||
|
@ -46,8 +44,7 @@
|
||||||
:e "ESC" 'helm-keyboard-quit)
|
:e "ESC" 'helm-keyboard-quit)
|
||||||
|
|
||||||
;;; Helm hacks
|
;;; Helm hacks
|
||||||
(defvar doom-helm-header-fg (face-attribute 'helm-source-header :foreground) "docstring")
|
(defconst doom-helm-header-fg (face-attribute 'helm-source-header :foreground))
|
||||||
|
|
||||||
;; Shrink source headers if there is only one source
|
;; Shrink source headers if there is only one source
|
||||||
(add-hook 'helm-after-initialize-hook 'doom*helm-hide-source-header-maybe)
|
(add-hook 'helm-after-initialize-hook 'doom*helm-hide-source-header-maybe)
|
||||||
;; A simpler prompt: see `helm-global-prompt'
|
;; A simpler prompt: see `helm-global-prompt'
|
||||||
|
|
|
@ -241,12 +241,13 @@
|
||||||
(setq org-agenda-archives-mode nil
|
(setq org-agenda-archives-mode nil
|
||||||
org-agenda-buffer nil))))
|
org-agenda-buffer nil))))
|
||||||
|
|
||||||
|
(after! org-agenda
|
||||||
(map! :map org-agenda-mode-map
|
(map! :map org-agenda-mode-map
|
||||||
:e "<escape>" 'doom/org-agenda-quit
|
:e "<escape>" 'doom/org-agenda-quit
|
||||||
:e "ESC" 'doom/org-agenda-quit
|
:e "ESC" 'doom/org-agenda-quit
|
||||||
:e [escape] 'doom/org-agenda-quit
|
:e [escape] 'doom/org-agenda-quit
|
||||||
"q" 'doom/org-agenda-quit
|
"q" 'doom/org-agenda-quit
|
||||||
"Q" 'doom/org-agenda-quit))
|
"Q" 'doom/org-agenda-quit)))
|
||||||
|
|
||||||
(after! realgud
|
(after! realgud
|
||||||
;; This allows realgud debuggers to run in a popup.
|
;; This allows realgud debuggers to run in a popup.
|
||||||
|
|
|
@ -143,6 +143,9 @@
|
||||||
(push "assets" projectile-globally-ignored-directories)
|
(push "assets" projectile-globally-ignored-directories)
|
||||||
(push ".cask" projectile-globally-ignored-directories)
|
(push ".cask" projectile-globally-ignored-directories)
|
||||||
|
|
||||||
|
(push ".elc" projectile-globally-ignored-file-suffixes)
|
||||||
|
(push doom-temp-dir projectile-globally-ignored-directories)
|
||||||
|
|
||||||
(projectile-global-mode +1))
|
(projectile-global-mode +1))
|
||||||
|
|
||||||
(provide 'core-project)
|
(provide 'core-project)
|
||||||
|
|
|
@ -48,9 +48,9 @@
|
||||||
(setq doom-buffer-edited nil)
|
(setq doom-buffer-edited nil)
|
||||||
(insert
|
(insert
|
||||||
(let* ((auto-detect-frame (or auto-detect-frame (not (display-graphic-p))))
|
(let* ((auto-detect-frame (or auto-detect-frame (not (display-graphic-p))))
|
||||||
(width (if auto-detect-frame
|
(width (max 3 (- (if auto-detect-frame
|
||||||
(window-width)
|
(window-width)
|
||||||
(cdr (assq 'width default-frame-alist))))
|
(cdr (assq 'width default-frame-alist))) 3)))
|
||||||
(height (if auto-detect-frame
|
(height (if auto-detect-frame
|
||||||
(window-height)
|
(window-height)
|
||||||
(cdr (assq 'height default-frame-alist))))
|
(cdr (assq 'height default-frame-alist))))
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
;; Initialize UI
|
;; Initialize UI
|
||||||
(load-theme doom-current-theme t)
|
(load-theme doom-current-theme t)
|
||||||
(tooltip-mode -1) ; show tooltips in echo area
|
(tooltip-mode -1) ; show tooltips in echo area
|
||||||
(if (not window-system)
|
(if (not (display-graphic-p))
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
(scroll-bar-mode -1) ; no scrollbar
|
(scroll-bar-mode -1) ; no scrollbar
|
||||||
(tool-bar-mode -1) ; no toolbar
|
(tool-bar-mode -1) ; no toolbar
|
||||||
|
@ -63,10 +63,13 @@
|
||||||
;; Show tilde in margin on empty lines
|
;; Show tilde in margin on empty lines
|
||||||
(define-fringe-bitmap 'tilde [64 168 16] nil nil 'center)
|
(define-fringe-bitmap 'tilde [64 168 16] nil nil 'center)
|
||||||
(set-fringe-bitmap-face 'tilde 'fringe)
|
(set-fringe-bitmap-face 'tilde 'fringe)
|
||||||
(setcdr (assq 'empty-line fringe-indicator-alist) 'tilde))
|
(setcdr (assq 'empty-line fringe-indicator-alist) 'tilde)
|
||||||
|
;; Fix certain unicode characters without upsetting line-height
|
||||||
|
(doom-fix-unicode "DejaVu Sans" '(?⚠ ?★ ?λ ?➊ ?➋ ?➌ ?➍ ?➎ ?❻ ?➐ ?➑ ?➒ ?➓)))
|
||||||
|
|
||||||
;; Fix certain unicode characters without upsetting line-height
|
;; Hide mode-line in help/compile window
|
||||||
(doom-fix-unicode "DejaVu Sans" '(?⚠ ?★ ?λ ?➊ ?➋ ?➌ ?➍ ?➎ ?❻ ?➐ ?➑ ?➒ ?➓))
|
(add-hook 'help-mode-hook 'doom|hide-mode-line)
|
||||||
|
(add-hook 'compilation-mode-hook 'doom|hide-mode-line)
|
||||||
|
|
||||||
;; On by default in Emacs 25. I'll enable it manually, so disable it globally
|
;; On by default in Emacs 25. I'll enable it manually, so disable it globally
|
||||||
(when (and (> emacs-major-version 24) (featurep 'eldoc))
|
(when (and (> emacs-major-version 24) (featurep 'eldoc))
|
||||||
|
@ -79,10 +82,6 @@
|
||||||
("\\<\\(FIXME\\(?:(.*)\\)?:?\\)\\>" 1 'error prepend)
|
("\\<\\(FIXME\\(?:(.*)\\)?:?\\)\\>" 1 'error prepend)
|
||||||
("\\<\\(NOTE\\(?:(.*)\\)?:?\\)\\>" 1 'success prepend))))
|
("\\<\\(NOTE\\(?:(.*)\\)?:?\\)\\>" 1 'success prepend))))
|
||||||
|
|
||||||
;; Hide mode-line in help/compile window
|
|
||||||
(add-hook 'help-mode-hook 'doom|hide-mode-line)
|
|
||||||
(add-hook 'compilation-mode-hook 'doom|hide-mode-line)
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Plugins
|
;; Plugins
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
(doom|nlinum-enable)))
|
(doom|nlinum-enable)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom|nlinum-enable ()
|
(defun doom|nlinum-enable (&rest _)
|
||||||
(nlinum-mode +1)
|
(nlinum-mode +1)
|
||||||
(add-hook 'post-command-hook 'doom|nlinum-hl-line nil t)
|
(add-hook 'post-command-hook 'doom|nlinum-hl-line nil t)
|
||||||
(doom|nlinum-unhl-line))
|
(doom|nlinum-unhl-line))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom|nlinum-disable ()
|
(defun doom|nlinum-disable (&rest _)
|
||||||
(nlinum-mode -1)
|
(nlinum-mode -1)
|
||||||
(remove-hook 'post-command-hook 'doom|nlinum-hl-line t)
|
(remove-hook 'post-command-hook 'doom|nlinum-hl-line t)
|
||||||
(doom|nlinum-unhl-line))
|
(doom|nlinum-unhl-line))
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
(when ov
|
(when ov
|
||||||
(doom|nlinum-unhl-line)
|
(doom|nlinum-unhl-line)
|
||||||
(let ((str (nth 1 (get-text-property 0 'display (overlay-get ov 'before-string)))))
|
(let ((str (nth 1 (get-text-property 0 'display (overlay-get ov 'before-string)))))
|
||||||
(put-text-property 0 (length str) 'face 'linum-highlight-face str)
|
(put-text-property 0 (length str) 'face 'doom-nlinum-highlight str)
|
||||||
(setq doom--hl-nlinum-overlay ov
|
(setq doom--hl-nlinum-overlay ov
|
||||||
doom--hl-nlinum-line line-no))))))))
|
doom--hl-nlinum-line line-no))))))))
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,15 @@ evil-window-move-* (e.g. `evil-window-move-far-left')"
|
||||||
(switch-to-buffer this-buffer))
|
(switch-to-buffer this-buffer))
|
||||||
(select-window that-window))))
|
(select-window that-window))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom/evil-window-move-l () (interactive) (doom/evil-window-move 'left))
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom/evil-window-move-d () (interactive) (doom/evil-window-move 'down))
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom/evil-window-move-u () (interactive) (doom/evil-window-move 'up))
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom/evil-window-move-r () (interactive) (doom/evil-window-move 'right))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom/new-buffer ()
|
(defun doom/new-buffer ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue