Move some key bindings around
Some checks are pending
/ Test config on ${{matrix.node}} (20) (push) Has started running
Some checks are pending
/ Test config on ${{matrix.node}} (20) (push) Has started running
This commit is contained in:
parent
85be9c3caa
commit
f0340183f6
6 changed files with 40 additions and 29 deletions
|
|
@ -9,6 +9,12 @@
|
|||
;; Avy is a navigation manager.
|
||||
|
||||
;;; Code:
|
||||
(use-package avy :straight t :defer t)
|
||||
(use-package avy :straight t :defer t
|
||||
:config
|
||||
(setq avy-timeout-seconds 1)
|
||||
:bind (:map icejam-keys-mode-map
|
||||
([(hyper j)] . avy-goto-char-timer)) ;; Jump to text.
|
||||
)
|
||||
|
||||
(provide 'icejam-avy)
|
||||
;;; icejam-avy.el ends here
|
||||
|
|
|
|||
|
|
@ -44,13 +44,7 @@
|
|||
:config (global-set-key [remap kill-ring-save] 'easy-kill))
|
||||
|
||||
;; Move buffers around with buffer keys
|
||||
(use-package buffer-move
|
||||
:straight t
|
||||
:defer t
|
||||
:bind ("C-c m [" . buf-move-left)
|
||||
("C-c m ]" . buf-move-right)
|
||||
("C-c m {" . buf-move-up)
|
||||
("C-c m }" . buf-move-down))
|
||||
(use-package buffer-move :straight t :defer t)
|
||||
|
||||
;; #====================== Backup config #==============================
|
||||
(setq backup-directory-alist
|
||||
|
|
@ -108,7 +102,6 @@
|
|||
(exec-path-from-shell-initialize))
|
||||
|
||||
(use-package direnv :straight t :config (direnv-mode))
|
||||
;; (use-package shadowenv :straight t :config (shadowenv-global-mode))
|
||||
|
||||
;; Draw underline lower
|
||||
(setq x-underline-at-descent-line t)
|
||||
|
|
@ -120,7 +113,10 @@
|
|||
indicate-empty-lines nil)
|
||||
|
||||
;;;;;;;;;;;;;;;;; Treemacs
|
||||
(use-package treemacs :straight t :defer t)
|
||||
(use-package treemacs :straight t :defer t
|
||||
:bind (:map icejam-keys-mode-map
|
||||
([(hyper b)] . treemacs))) ;; Show the folder tree
|
||||
|
||||
(use-package treemacs-all-the-icons :defer t :requires (treemacs) :straight t
|
||||
:config
|
||||
(treemacs-load-theme "all-the-icons")
|
||||
|
|
|
|||
|
|
@ -52,5 +52,10 @@
|
|||
(define-key icejam-keys-mode-map [home] 'beginning-of-line)
|
||||
(define-key icejam-keys-mode-map [end] 'end-of-line)
|
||||
|
||||
;;;;;;;;; Translate keys ;;;;;;;;;;;;;;;;;;;;;
|
||||
(define-key key-translation-map (kbd "<f6>") (kbd "C-c l")) ;; On F6, send C-c l
|
||||
(define-key key-translation-map (kbd "<f7>") (kbd "C-c c")) ;; On F7, send C-c c
|
||||
(define-key key-translation-map (kbd "<f8>") (kbd "C-c p")) ;; On F8, send C-c p
|
||||
|
||||
(provide 'icejam-keys-mode)
|
||||
;;; icejam-keys-mode.el ends here
|
||||
|
|
|
|||
|
|
@ -2,12 +2,15 @@
|
|||
;;; Commentary:
|
||||
;;; Code:
|
||||
|
||||
(require 'icejam-keys-mode)
|
||||
|
||||
(use-package magit
|
||||
:straight t
|
||||
:defer t
|
||||
:bind ("<f5> c" . magit-checkout)
|
||||
("<f5> b" . magit-blame-addition)
|
||||
("<f5> g" . magit-status)
|
||||
:bind (:map icejam-keys-mode-map
|
||||
("<f5> c" . magit-checkout)
|
||||
("<f5> b" . magit-blame-addition)
|
||||
("<f5> g" . magit-status))
|
||||
(:map magit-blame-mode-map
|
||||
("<f5> b" . 'magit-blame-quit)))
|
||||
|
||||
|
|
|
|||
|
|
@ -31,22 +31,23 @@
|
|||
(setq mac-command-modifier 'meta))))
|
||||
|
||||
;;;;;;;;; Mac binding (fix) ;;;;;;;;;;;;;;;;;;
|
||||
(define-key icejam-keys-mode-map (kbd "H-<right>") 'end-of-line)
|
||||
(define-key icejam-keys-mode-map (kbd "H-<left>") 'beginning-of-line)
|
||||
(define-key icejam-keys-mode-map (kbd "H-<up>") 'scroll-down) ; WTF is this reverse, I dunno
|
||||
(define-key icejam-keys-mode-map (kbd "H-<down>") 'scroll-up)
|
||||
(define-key icejam-keys-mode-map (kbd "H-<right>") #'end-of-line)
|
||||
(define-key icejam-keys-mode-map (kbd "H-<left>") #'beginning-of-line)
|
||||
(define-key icejam-keys-mode-map (kbd "H-<up>") #'scroll-down) ; WTF is this reverse, I dunno
|
||||
(define-key icejam-keys-mode-map (kbd "H-<down>") #'scroll-up)
|
||||
|
||||
(define-key icejam-keys-mode-map [(hyper a)] 'mark-whole-buffer)
|
||||
(define-key icejam-keys-mode-map [(hyper v)] 'yank)
|
||||
(define-key icejam-keys-mode-map [(hyper x)] 'kill-region)
|
||||
(define-key icejam-keys-mode-map [(hyper c)] 'kill-ring-save)
|
||||
(define-key icejam-keys-mode-map [(hyper s)] 'save-buffer)
|
||||
(define-key icejam-keys-mode-map [(hyper l)] 'goto-line)
|
||||
(define-key icejam-keys-mode-map [(hyper b)] 'treemacs)
|
||||
(define-key icejam-keys-mode-map [(hyper w)] 'icejam-function-delete-window)
|
||||
(define-key icejam-keys-mode-map [(hyper z)] 'undo)
|
||||
(define-key icejam-keys-mode-map [(hyper q)] 'kill-emacs)
|
||||
;; Use CMD bindings that you know from the operating system
|
||||
(define-key icejam-keys-mode-map [(hyper a)] #'mark-whole-buffer) ;; Select all
|
||||
(define-key icejam-keys-mode-map [(hyper v)] #'yank) ;; Paste
|
||||
(define-key icejam-keys-mode-map [(hyper x)] #'kill-region) ;; Cut
|
||||
(define-key icejam-keys-mode-map [(hyper c)] #'kill-ring-save) ;; Copy
|
||||
(define-key icejam-keys-mode-map [(hyper s)] #'save-buffer) ;; Save
|
||||
(define-key icejam-keys-mode-map [(hyper z)] #'undo) ;; Undo
|
||||
(define-key icejam-keys-mode-map [(hyper q)] #'kill-emacs) ;; Close emacs
|
||||
(define-key icejam-keys-mode-map [(hyper w)] #'icejam-function-delete-window) ;; Close window
|
||||
|
||||
;; And then some extras
|
||||
(define-key icejam-keys-mode-map [(hyper l)] #'goto-line) ;; Goto Line
|
||||
;; Disable meta on right alt (useful for Polish characters)
|
||||
;; (setq mac-right-option-modifier nil)
|
||||
))
|
||||
|
|
@ -62,7 +63,7 @@
|
|||
(setq mac-option-modifier 'meta)
|
||||
(setq mac-right-option-modifier nil))))
|
||||
|
||||
;;;;;;;;; Mac-specific config ;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;;; Linux-specific config ;;;;;;;;;;;;;;;;;;;;;
|
||||
(if IS-GNU
|
||||
(progn
|
||||
;;;; Save and undo
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
;; Company list override
|
||||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-yasnippet company-elisp)))
|
||||
'(company-yasnippet company-capf)))
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook 'icejam/activate-emacs-lisp-mode)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue