Better bindings. Use ibuffer.
This commit is contained in:
parent
ed4bfe44c2
commit
18ad943003
60
.emacs
60
.emacs
@ -94,6 +94,7 @@
|
|||||||
;; If we cannot detect the theme, default to light
|
;; If we cannot detect the theme, default to light
|
||||||
(load-theme light-theme t)))))
|
(load-theme light-theme t)))))
|
||||||
|
|
||||||
|
|
||||||
;; Apply theme at startup
|
;; Apply theme at startup
|
||||||
(my/set-theme-based-on-appearance)
|
(my/set-theme-based-on-appearance)
|
||||||
|
|
||||||
@ -101,6 +102,9 @@
|
|||||||
;; UI Customizations
|
;; UI Customizations
|
||||||
;; ===========================
|
;; ===========================
|
||||||
|
|
||||||
|
;; Use ibuffer, instead of Buffer-menu-mode.
|
||||||
|
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
||||||
|
|
||||||
;; Replace yes-no prompts to y-n
|
;; Replace yes-no prompts to y-n
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
|
|
||||||
@ -169,28 +173,64 @@
|
|||||||
(use-package evil
|
(use-package evil
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(setq evil-want-integration t)
|
(setq evil-want-integration t
|
||||||
(setq evil-want-keybinding nil)
|
evil-want-keybinding nil)
|
||||||
:config
|
:config
|
||||||
(evil-mode 1)) ;; Enable Evil Mode globally
|
(evil-mode 1)
|
||||||
|
|
||||||
|
;; Force modes to start in Emacs state
|
||||||
|
(dolist (mode '(;;Buffer-menu-mode
|
||||||
|
;;ibuffer-mode
|
||||||
|
dired-mode
|
||||||
|
help-mode
|
||||||
|
bookmark-bmenu-mode
|
||||||
|
gnus-summary-mode
|
||||||
|
gnus-group-mode
|
||||||
|
package-menu-mode))
|
||||||
|
(evil-set-initial-state mode 'emacs))
|
||||||
|
|
||||||
|
;; Correct keybindings for minibuffer maps using actual keymap objects
|
||||||
|
(dolist (keymap '(minibuffer-local-map
|
||||||
|
minibuffer-local-ns-map
|
||||||
|
minibuffer-local-completion-map
|
||||||
|
minibuffer-local-must-match-map
|
||||||
|
minibuffer-local-isearch-map))
|
||||||
|
(define-key (symbol-value keymap) [escape] 'minibuffer-keyboard-quit))
|
||||||
|
|
||||||
|
;; Set escape to quit in Evil states
|
||||||
|
(with-eval-after-load 'evil-maps
|
||||||
|
(define-key evil-normal-state-map [escape] 'keyboard-quit)
|
||||||
|
(define-key evil-visual-state-map [escape] 'keyboard-quit))
|
||||||
|
|
||||||
|
(keymap-global-set "C-u" 'evil-scroll-up))
|
||||||
|
|
||||||
(use-package evil-collection
|
(use-package evil-collection
|
||||||
:init
|
|
||||||
:after evil
|
:after evil
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(evil-collection-init))
|
(evil-collection-init))
|
||||||
|
|
||||||
(keymap-global-set "C-u" 'evil-scroll-up)
|
(defun my/buffer-menu-evil-fix ()
|
||||||
|
"Disable Evil's C-n and C-p in `Buffer-menu-mode'."
|
||||||
|
(evil-define-key 'normal Buffer-menu-mode-map
|
||||||
|
(kbd "C-n") nil
|
||||||
|
(kbd "C-p") nil))
|
||||||
|
|
||||||
|
(add-hook 'buffer-menu-mode-hook #'my/buffer-menu-evil-fix)
|
||||||
|
|
||||||
;; ===========================
|
;; ===========================
|
||||||
;; Additional Packages
|
;; Additional Packages
|
||||||
;; ===========================
|
;; ===========================
|
||||||
|
|
||||||
;; Install and enable Helm
|
;; Skip helm for now, since it interferes with evil
|
||||||
(use-package helm
|
;;(use-package helm
|
||||||
:config
|
;;:ensure t
|
||||||
(helm-mode 1))
|
;;:init
|
||||||
|
;;(setq helm-display-function #'helm-default-display-buffer) ;; Fix potential display issues
|
||||||
|
;;:config
|
||||||
|
;;(helm-mode 1)
|
||||||
|
;;(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ;; Better navigation
|
||||||
|
;;(define-key helm-map (kbd "C-z") 'helm-select-action)) ;; Show actions list
|
||||||
|
|
||||||
;; Install and enable Company Mode globally
|
;; Install and enable Company Mode globally
|
||||||
(use-package company
|
(use-package company
|
||||||
@ -297,7 +337,7 @@
|
|||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(helm-minibuffer-history-key "M-p")
|
'(helm-minibuffer-history-key "M-p")
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(rainbow-delimiters rainbow-delimiter catppuccin-theme lsp-pyright zenburn-theme which-key solarized-theme rust-mode projectile poetry magit lsp-ui lsp-treemacs kotlin-mode helm flycheck evil-collection dracula-theme company better-defaults)))
|
'(helm-evil rainbow-delimiters rainbow-delimiter catppuccin-theme lsp-pyright zenburn-theme which-key solarized-theme rust-mode projectile poetry magit lsp-ui lsp-treemacs kotlin-mode helm flycheck evil-collection dracula-theme company better-defaults)))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user