Archived
1
0
Fork 0

add prefix to some custom function, tweak keymap to run dired in left side window, tweak keymap to have better 'select all' function ; add persp-mode back to allow restoring prior sessions via auto-save

This commit is contained in:
KemoNine 2023-04-08 10:09:49 -04:00
parent 03538e2ec6
commit f657642113

View file

@ -8,7 +8,7 @@
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) ; this goes in chemacs2 init -- DO NOT UNCOMMENT (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) ; this goes in chemacs2 init -- DO NOT UNCOMMENT
(package-initialize) ; this goes in chemacs2 init -- DO NOT UNCOMMENT (package-initialize) ; this goes in chemacs2 init -- DO NOT UNCOMMENT
(add-to-list 'package-selected-packages (add-to-list 'package-selected-packages
'(burly rainbow-mode rainbow-delimiters markdown-mode devdocs devdocs-browser focus zoom popwin dired-single diredfl xclip doominhibitinhibit-modeline magit helpful helm helm-org helm-ls-git dired-rainbow dired-rainbow-listing dired-single dash s origami modus-themes use-package) '(persp-mode burly rainbow-mode rainbow-delimiters markdown-mode devdocs devdocs-browser focus zoom popwin dired-single diredfl xclip doominhibitinhibit-modeline magit helpful helm helm-org helm-ls-git dired-rainbow dired-rainbow-listing dired-single dash s origami modus-themes use-package)
) )
(require 'use-package) (require 'use-package)
@ -192,7 +192,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; modern home/end via C-a and C-e ; modern home/end via C-a and C-e
(defun my--smart-beginning-of-line () (defun kmn/my--smart-beginning-of-line ()
"Move point to `beginning-of-line'. If repeat command it cycle "Move point to `beginning-of-line'. If repeat command it cycle
position between `back-to-indentation' and `beginning-of-line'." position between `back-to-indentation' and `beginning-of-line'."
(interactive "^") (interactive "^")
@ -202,11 +202,11 @@ position between `back-to-indentation' and `beginning-of-line'."
(beginning-of-line)) (beginning-of-line))
(back-to-indentation))) (back-to-indentation)))
(defun my--smart-end-of-line () (defun kmn/my--smart-end-of-line ()
"Move point to `end-of-line'. If repeat command it cycle "Move point to `end-of-line'. If repeat command it cycle
position between last non-whitespace and `end-of-line'." position between last non-whitespace and `end-of-line'."
(interactive "^") (interactive "^")
(if (and (eq last-command 'my--smart-end-of-line) (if (and (eq last-command 'kmn/my--smart-end-of-line)
(= (line-end-position) (point))) (= (line-end-position) (point)))
(skip-syntax-backward " " (line-beginning-position)) (skip-syntax-backward " " (line-beginning-position))
(end-of-line))) (end-of-line)))
@ -231,9 +231,10 @@ position between last non-whitespace and `end-of-line'."
(global-set-key (kbd "C-g") 'goto-line) (global-set-key (kbd "C-g") 'goto-line)
(global-set-key (kbd "C-c u") 'toggle-truncate-lines) (global-set-key (kbd "C-c u") 'toggle-truncate-lines)
(global-set-key (kbd "C-o") 'helm-find-files) (global-set-key (kbd "C-o") 'helm-find-files)
(global-set-key (kbd "C-k") 'dired) (global-set-key (kbd "C-k") 'kmn/dired-default-directory-on-left)
(global-set-key (kbd "C-a") 'my--smart-beginning-of-line) (global-set-key (kbd "M-a") 'mark-whole-buffer)
(global-set-key (kbd "C-e") 'my--smart-end-of-line) (global-set-key (kbd "C-a") 'kmn/my--smart-beginning-of-line)
(global-set-key (kbd "C-e") 'knn/my--smart-end-of-line)
(global-set-key (kbd "C-c w") (global-set-key (kbd "C-c w")
(lambda () (lambda ()
(interactive) (interactive)
@ -567,3 +568,11 @@ position between last non-whitespace and `end-of-line'."
(global-set-key (kbd "C-x r k") 'bookmark-delete) (global-set-key (kbd "C-x r k") 'bookmark-delete)
(global-set-key (kbd "C-x r f") 'burly-bookmark-frames) (global-set-key (kbd "C-x r f") 'burly-bookmark-frames)
(global-set-key (kbd "C-x r w") 'burly-bookmark-windows) (global-set-key (kbd "C-x r w") 'burly-bookmark-windows)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; persp-mode
(setq persp-auto-resume-time -1.0)
(with-eval-after-load "persp-mode-autoloads"
(setq wg-morph-on nil) ;; switch off animation
(setq persp-autokill-buffer-on-remove 'kill-weak)
(add-hook 'window-setup-hook #'(lambda () (persp-mode 1))))