Add toggles and git keymaps

This commit is contained in:
James Dixon 2025-05-19 21:58:07 -04:00
parent 5bff65947b
commit 86bb687a35

View File

@ -22,7 +22,6 @@
;; Lines and columns ;; Lines and columns
(global-display-line-numbers-mode 1) ; Display line numbers (global-display-line-numbers-mode 1) ; Display line numbers
(column-number-mode 1) ; Toggle column number display in the mode line. (column-number-mode 1) ; Toggle column number display in the mode line.
;; (add-hook 'prog-mode-hook #'display-fill-column-indicator-mode) ; Column width indicator
;; Bells and whistles ;; Bells and whistles
(setq visible-bell 1) ; Flash when the bell rings (no sound) (setq visible-bell 1) ; Flash when the bell rings (no sound)
@ -356,7 +355,7 @@
:straight t :straight t
:config (general-evil-setup)) :config (general-evil-setup))
;; Global Normal Mode Keymaps ;; Global Normal Mode :: General Keymaps
(general-nmap (general-nmap
:prefix "SPC" :prefix "SPC"
;; Eval Keybinds ;; Eval Keybinds
@ -366,11 +365,11 @@
"E" 'eval-print-last-sexp "E" 'eval-print-last-sexp
"b" 'eval-buffer "b" 'eval-buffer
"." 'repeat-complex-command "." 'repeat-complex-command
"q" 'evil-quit-all "Q" 'evil-quit-all
;; Buffer Management ;; Buffer Management
"w" 'save-buffer "w" 'save-buffer
"l" 'ibuffer "l" 'ibuffer
"d" 'evil-delete-buffer "q" 'evil-delete-buffer
;; Search and replace (interactive) ;; Search and replace (interactive)
"o" 'occur "o" 'occur
"r" 'replace-regexp "r" 'replace-regexp
@ -379,7 +378,6 @@
"c" 'compile "c" 'compile
"!" 'shell-command "!" 'shell-command
"&" 'async-shell-command "&" 'async-shell-command
"g" 'magit-status
;; Jumping places ;; Jumping places
"f" 'ffap "f" 'ffap
"-" 'dired-jump "-" 'dired-jump
@ -391,13 +389,32 @@
"s" 'yas-insert-snippet "s" 'yas-insert-snippet
"F" 'format-all-region-or-buffer) "F" 'format-all-region-or-buffer)
;; Global Toggle Keymaps ;; Global Normal Mode :: Toggle Keymaps
(general-nmap (general-nmap
:prefix "SPC t" :prefix "SPC t"
;; Toggle Modes ;; Toggle Modes
"A" 'abbrev-mode "a" 'abbrev-mode
"W" 'whitespace-mode "w" 'whitespace-mode
"P" 'smartparens-mode) "p" 'smartparens-mode
"t" 'indent-tabs-mode
"c" 'display-fill-column-indicator-mode)
;; Global Normal Mode :: Git Keymaps
(general-nmap
:prefix "SPC g"
;; Magit Commands
"s" 'magit-status
"l" 'magit-log
"d" 'magit-diff-dwim
"b" 'magit-branch
"i" 'magit-init
"a" 'magit-stage-files
"t" 'magit-stage-files
"u" 'magit-unstage-files
"c" 'magit-commit-create
"p" 'magit-push-to-remote
"f" 'magit-fetch-from-upstream
"F" 'magit-pull-from-upstream)
;; Global Visual Mode Keymaps ;; Global Visual Mode Keymaps
(general-vmap (general-vmap
@ -524,7 +541,9 @@
;; (use-package vertico ;; (use-package vertico
;; :straight t ;; :straight t
;; :init (vertico-mode)) ;; :init (vertico-mode))
(fido-vertical-mode)
;; Let's try [icomplete / fido / ido] mode for a while.
(fido-mode)
;; Ordering regex for completion ;; Ordering regex for completion
;; https://github.com/oantolin/orderless ;; https://github.com/oantolin/orderless