Emacs: Random changes/improvements

This commit is contained in:
Joseph Ferano 2024-02-14 13:11:32 +08:00
parent 1539af6274
commit cee5d08902

View File

@ -818,7 +818,6 @@ Simple function more quickly align text
(evil-mode t) (evil-mode t)
(evil-global-set-key 'insert (kbd "C-w") #'evil-delete-backward-word) (evil-global-set-key 'insert (kbd "C-w") #'evil-delete-backward-word)
(evil-define-key 'normal 'global (kbd "q") 'avy-goto-word-0)
;; vv to expand selection to line ;; vv to expand selection to line
(evil-global-set-key 'visual (evil-global-set-key 'visual
@ -866,6 +865,7 @@ Simple function more quickly align text
(kbd "SPC ba") 'switch-to-buffer (kbd "SPC ba") 'switch-to-buffer
(kbd "SPC bb") 'consult-buffer (kbd "SPC bb") 'consult-buffer
(kbd "SPC bi") 'ibuffer (kbd "SPC bi") 'ibuffer
(kbd "SPC bu") 'recentf-open-most-recent-file
(kbd "SPC bm") 'joe/toggle-buffer-mode (kbd "SPC bm") 'joe/toggle-buffer-mode
(kbd "SPC br") 'joe/revert-buffer-no-confirm (kbd "SPC br") 'joe/revert-buffer-no-confirm
(kbd "SPC gg") 'magit-status (kbd "SPC gg") 'magit-status
@ -1115,7 +1115,8 @@ Ace Window will show a hint if there are more than 2 windows, but I don't really
"^\\*cargo-run\\*" cargo-run-mode "^\\*cargo-run\\*" cargo-run-mode
"^\\*rustic-compilation\\*" rustic-compilation-mode "^\\*rustic-compilation\\*" rustic-compilation-mode
"^\\*ansi-term\\*$" term-mode "^\\*ansi-term\\*$" term-mode
"^\\*Async Shell Command\\*$" shell-mode ;; "^\\*Async Shell Command\\*$" shell-mode
"^\\*Async Shell Command\\*$"
("^\\*Warnings\\*$" . hide) ("^\\*Warnings\\*$" . hide)
help-mode help-mode
helpful-mode)) helpful-mode))
@ -1497,7 +1498,7 @@ Stuff to immediately switch to Jetbrains for debugging
(interactive) (interactive)
(shell-command (shell-command
(mapconcat #'shell-quote-argument (mapconcat #'shell-quote-argument
(list "rider" (list "pycharm"
"--line" "--line"
(int-to-string (line-number-at-pos)) (int-to-string (line-number-at-pos))
"--column" "--column"
@ -1737,7 +1738,7 @@ When called interactively, prompt for BUFFER."
("D" "~/Documents/" "Documents") ("D" "~/Documents/" "Documents")
("b" "~/Documents/Books/" "Books") ("b" "~/Documents/Books/" "Books")
("p" "~/Development/" "Dev") ("p" "~/Development/" "Dev")
("t" "~/TYCS/" "Teachyourselfcs") ("t" "~/Tutorials/" "Tutorials")
("n" "~/Notes/" "OrgNotes") ("n" "~/Notes/" "OrgNotes")
("r" "~/Repositories" "Repos") ("r" "~/Repositories" "Repos")
("B" "~/pCloudDrive/" "pCloud"))) ("B" "~/pCloudDrive/" "pCloud")))
@ -1920,7 +1921,8 @@ be kept here commented out in case we want to try it again.
(require 'avy) (require 'avy)
(setq avy-case-fold-search nil) (setq avy-case-fold-search nil)
(setq avy-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l ?q ?w ?e ?r ?u ?i ?o ?p ?z ?x ?c ?v ?n ?m)) (setq avy-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l ?q ?w ?e ?r ?u ?i ?o ?p ?z ?x ?c ?v ?n ?m))
(define-key global-map (kbd "C-;") 'avy-goto-char) ;; I use this most frequently ;; (define-key global-map (kbd "C-;") 'avy-goto-char) ;; I use this most frequently
(define-key global-map (kbd "M-s") 'avy-goto-char) ;; I use this most frequently
;; (define-key global-map (kbd "C-'") 'avy-goto-line) ;; Consistent with ivy-avy ;; (define-key global-map (kbd "C-'") 'avy-goto-line) ;; Consistent with ivy-avy
(define-key global-map (kbd "M-g c") 'avy-goto-char) (define-key global-map (kbd "M-g c") 'avy-goto-char)
(define-key global-map (kbd "M-g e") 'avy-goto-word-0) ;; lots of candidates (define-key global-map (kbd "M-g e") 'avy-goto-word-0) ;; lots of candidates
@ -2244,11 +2246,14 @@ the right frame, I'm going to use the frame's name to close and remove the hook
** Programming Languages ** Programming Languages
*** Python *** Python
#+begin_src emacs-lisp #+begin_src emacs-lisp
(require 'python)
(setq python-shell-interpreter "python")
(setq python-shell-interpreter-args "--pylab") ;; What is this for?
(setq python-shell-interpreter-args "") ;; What is this for?
(define-key inferior-python-mode-map (kbd "C-n") #'comint-next-input) (define-key inferior-python-mode-map (kbd "C-n") #'comint-next-input)
(define-key inferior-python-mode-map (kbd "C-p") #'comint-previous-input) (define-key inferior-python-mode-map (kbd "C-p") #'comint-previous-input)
#+end_src> #+end_src
*** Rust *** Rust
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq rustic-lsp-setup-p nil) (setq rustic-lsp-setup-p nil)