Minor edits

This commit is contained in:
Derek Taylor
2023-08-16 20:47:48 -05:00
parent b9dd8bfb31
commit e93d4662a5
3 changed files with 143 additions and 20 deletions

View File

@@ -50,6 +50,8 @@
:config :config
(dashboard-setup-startup-hook)) (dashboard-setup-startup-hook))
(delete-selection-mode 1)
(use-package diminish) (use-package diminish)
(use-package dired-open (use-package dired-open
@@ -139,13 +141,11 @@
(dt/leader-keys (dt/leader-keys
"SPC" '(counsel-M-x :wk "Counsel M-x") "SPC" '(counsel-M-x :wk "Counsel M-x")
"." '(find-file :wk "Find file") "." '(find-file :wk "Find file")
"f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Edit emacs config")
"f r" '(counsel-recentf :wk "Find recent files")
"TAB TAB" '(comment-line :wk "Comment lines")) "TAB TAB" '(comment-line :wk "Comment lines"))
(dt/leader-keys (dt/leader-keys
"b" '(:ignore t :wk "Bookmarks/Buffers") "b" '(:ignore t :wk "Bookmarks/Buffers")
"b b" '(counsel-switch-buffer :wk "Switch buffer") "b b" '(switch-to-buffer :wk "Switch to buffer")
"b c" '(clone-indirect-buffer :wk "Create indirect buffer copy in a split") "b c" '(clone-indirect-buffer :wk "Create indirect buffer copy in a split")
"b C" '(clone-indirect-buffer-other-window :wk "Clone indirect buffer in new window") "b C" '(clone-indirect-buffer-other-window :wk "Clone indirect buffer in new window")
"b d" '(bookmark-delete :wk "Delete bookmark") "b d" '(bookmark-delete :wk "Delete bookmark")
@@ -160,8 +160,7 @@
"b R" '(rename-buffer :wk "Rename buffer") "b R" '(rename-buffer :wk "Rename buffer")
"b s" '(basic-save-buffer :wk "Save buffer") "b s" '(basic-save-buffer :wk "Save buffer")
"b S" '(save-some-buffers :wk "Save multiple buffers") "b S" '(save-some-buffers :wk "Save multiple buffers")
"b w" '(bookmark-save :wk "Save current bookmarks to bookmark file") "b w" '(bookmark-save :wk "Save current bookmarks to bookmark file"))
"b y" '(yank-buffer :wk "Yank buffer"))
(dt/leader-keys (dt/leader-keys
"d" '(:ignore t :wk "Dired") "d" '(:ignore t :wk "Dired")
@@ -178,7 +177,42 @@
"e h" '(counsel-esh-history :which-key "Eshell history") "e h" '(counsel-esh-history :which-key "Eshell history")
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point") "e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
"e r" '(eval-region :wk "Evaluate elisp in region") "e r" '(eval-region :wk "Evaluate elisp in region")
"e s" '(eshell :which-key "Eshell")) "e R" '(eww-reload :which-key "Reload current page in EWW")
"e s" '(eshell :which-key "Eshell")
"e w" '(eww :which-key "EWW emacs web wowser"))
(dt/leader-keys
"f" '(:ignore t :wk "Files")
"f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Open emacs config")
"f e" '((lambda () (interactive) (dired "~/.config/emacs/")) :wk "Open file in user-emacs-directory")
"f j" '(counsel-file-jump :wk "Jump to a file below current directory")
"f l" '(counsel-locate :wk "Locate a file")
"f r" '(counsel-recentf :wk "Find recent files")
"f u" '(sudo-edit-find-file :wk "Sudo find file")
"f U" '(sudo-edit :wk "Sudo edit file"))
(dt/leader-keys
"g" '(:ignore t :wk "Git")
"g /" '(magit-displatch :wk "Magit dispatch")
"g ." '(magit-file-displatch :wk "Magit file dispatch")
"g b" '(magit-branch-checkout :wk "Switch branch")
"g c" '(:ignore t :wk "Create")
"g c b" '(magit-branch-and-checkout :wk "Create branch and checkout")
"g c c" '(magit-commit-create :wk "Create commit")
"g c f" '(magit-commit-fixup :wk "Create fixup commit")
"g C" '(magit-clone :wk "Clone repo")
"g f" '(:ignore t :wk "Find")
"g f c" '(magit-show-commit :wk "Show commit")
"g f f" '(magit-find-file :wk "Magit find file")
"g f g" '(magit-find-git-config-file :wk "Find gitconfig file")
"g F" '(magit-fetch :wk "Git fetch")
"g g" '(magit-status :wk "Magit status")
"g i" '(magit-init :wk "Initialize git repo")
"g l" '(magit-log-buffer-file :wk "Magit buffer log")
"g r" '(vc-revert :wk "Git revert file")
"g s" '(magit-stage-file :wk "Git stage file")
"g t" '(git-timemachine :wk "Git time machine")
"g u" '(magit-stage-file :wk "Git unstage file"))
(dt/leader-keys (dt/leader-keys
"h" '(:ignore t :wk "Help") "h" '(:ignore t :wk "Help")
@@ -232,6 +266,14 @@
"m d" '(:ignore t :wk "Date/deadline") "m d" '(:ignore t :wk "Date/deadline")
"m d t" '(org-time-stamp :wk "Org time stamp")) "m d t" '(org-time-stamp :wk "Org time stamp"))
(dt/leader-keys
"o" '(:ignore t :wk "Open")
"o d" '(dashboard-open :wk "Dashboard")
"o f" '(make-frame :wk "Open buffer in new frame")
"o F" '(select-frame-by-name :wk "Select frame by name"))
;; projectile-command-map already has a ton of bindings
;; set for us, so no need to specify each individually.
(dt/leader-keys (dt/leader-keys
"p" '(projectile-command-map :wk "Projectile")) "p" '(projectile-command-map :wk "Projectile"))
@@ -241,6 +283,7 @@
"t f" '(flycheck-mode :wk "Toggle flycheck") "t f" '(flycheck-mode :wk "Toggle flycheck")
"t l" '(display-line-numbers-mode :wk "Toggle line numbers") "t l" '(display-line-numbers-mode :wk "Toggle line numbers")
"t n" '(neotree-toggle :wk "Toggle neotree file viewer") "t n" '(neotree-toggle :wk "Toggle neotree file viewer")
"t o" '(org-mode :wk "Toggle org mode")
"t r" '(rainbow-mode :wk "Toggle rainbow mode") "t r" '(rainbow-mode :wk "Toggle rainbow mode")
"t t" '(visual-line-mode :wk "Toggle truncated lines") "t t" '(visual-line-mode :wk "Toggle truncated lines")
"t v" '(vterm-toggle :wk "Toggle vterm")) "t v" '(vterm-toggle :wk "Toggle vterm"))
@@ -309,6 +352,16 @@
(use-package haskell-mode) (use-package haskell-mode)
(use-package lua-mode) (use-package lua-mode)
(use-package git-timemachine
:after git-timemachine
:hook (evil-normalize-keymaps . git-timemachine-hook)
:config
(evil-define-key 'normal git-timemachine-mode-map (kbd "C-j") 'git-timemachine-show-previous-revision)
(evil-define-key 'normal git-timemachine-mode-map (kbd "C-k") 'git-timemachine-show-next-revision)
)
(use-package magit)
(use-package doom-modeline (use-package doom-modeline
:ensure t :ensure t
:init (doom-modeline-mode 1) :init (doom-modeline-mode 1)
@@ -416,11 +469,7 @@
(reusable-frames . visible) (reusable-frames . visible)
(window-height . 0.4)))) (window-height . 0.4))))
(use-package sudo-edit (use-package sudo-edit)
:config
(dt/leader-keys
"fu" '(sudo-edit-find-file :wk "Sudo find file")
"fU" '(sudo-edit :wk "Sudo edit file")))
(add-to-list 'custom-theme-load-path "~/.config/emacs/themes/") (add-to-list 'custom-theme-load-path "~/.config/emacs/themes/")

View File

@@ -12,6 +12,7 @@
- [[#backup][BACKUP]] - [[#backup][BACKUP]]
- [[#company][COMPANY]] - [[#company][COMPANY]]
- [[#dashboard][DASHBOARD]] - [[#dashboard][DASHBOARD]]
- [[#deletion-selection][DELETION SELECTION]]
- [[#diminish][DIMINISH]] - [[#diminish][DIMINISH]]
- [[#dired][DIRED]] - [[#dired][DIRED]]
- [[#evil][EVIL]] - [[#evil][EVIL]]
@@ -25,6 +26,9 @@
- [[#display-line-numbers-and-truncated-lines][Display Line Numbers and Truncated Lines]] - [[#display-line-numbers-and-truncated-lines][Display Line Numbers and Truncated Lines]]
- [[#ivy-counsel][IVY (COUNSEL)]] - [[#ivy-counsel][IVY (COUNSEL)]]
- [[#language-support][LANGUAGE SUPPORT]] - [[#language-support][LANGUAGE SUPPORT]]
- [[#git-programs][GIT PROGRAMS]]
- [[#git-time-machine][Git Time Machine]]
- [[#magit][Magit]]
- [[#modeline][MODELINE]] - [[#modeline][MODELINE]]
- [[#neotree][NEOTREE]] - [[#neotree][NEOTREE]]
- [[#org-mode][ORG MODE]] - [[#org-mode][ORG MODE]]
@@ -128,6 +132,14 @@ Emacs Dashboard is an extensible startup screen showing you recent files, bookma
#+end_src #+end_src
* DELETION SELECTION
Delete Selection mode lets you treat an Emacs region much like a typical text selection outside of Emacs: You can replace the active region just by typing text, and you can delete the selected text just by hitting the Backspace key (DEL).
#+begin_src emacs-lisp
(delete-selection-mode 1)
#+end_src
* DIMINISH * DIMINISH
This package implements hiding or abbreviation of the modeline displays (lighters) of minor-modes. With this package installed, you can add ':diminish' to any use-package block to hide that particular mode in the modeline. This package implements hiding or abbreviation of the modeline displays (lighters) of minor-modes. With this package installed, you can add ':diminish' to any use-package block to hide that particular mode in the modeline.
@@ -252,12 +264,11 @@ You can use the bindings CTRL plus =/- for zooming in/out. You can also use CTR
(dt/leader-keys (dt/leader-keys
"SPC" '(counsel-M-x :wk "Counsel M-x") "SPC" '(counsel-M-x :wk "Counsel M-x")
"." '(find-file :wk "Find file") "." '(find-file :wk "Find file")
"f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Edit emacs config")
"f r" '(counsel-recentf :wk "Find recent files")
"TAB TAB" '(comment-line :wk "Comment lines")) "TAB TAB" '(comment-line :wk "Comment lines"))
(dt/leader-keys (dt/leader-keys
"b" '(:ignore t :wk "Bookmarks/Buffers") "b" '(:ignore t :wk "Bookmarks/Buffers")
"b b" '(switch-to-buffer :wk "Switch to buffer")
"b c" '(clone-indirect-buffer :wk "Create indirect buffer copy in a split") "b c" '(clone-indirect-buffer :wk "Create indirect buffer copy in a split")
"b C" '(clone-indirect-buffer-other-window :wk "Clone indirect buffer in new window") "b C" '(clone-indirect-buffer-other-window :wk "Clone indirect buffer in new window")
"b d" '(bookmark-delete :wk "Delete bookmark") "b d" '(bookmark-delete :wk "Delete bookmark")
@@ -289,7 +300,42 @@ You can use the bindings CTRL plus =/- for zooming in/out. You can also use CTR
"e h" '(counsel-esh-history :which-key "Eshell history") "e h" '(counsel-esh-history :which-key "Eshell history")
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point") "e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
"e r" '(eval-region :wk "Evaluate elisp in region") "e r" '(eval-region :wk "Evaluate elisp in region")
"e s" '(eshell :which-key "Eshell")) "e R" '(eww-reload :which-key "Reload current page in EWW")
"e s" '(eshell :which-key "Eshell")
"e w" '(eww :which-key "EWW emacs web wowser"))
(dt/leader-keys
"f" '(:ignore t :wk "Files")
"f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Open emacs config")
"f e" '((lambda () (interactive) (dired "~/.config/emacs/")) :wk "Open file in user-emacs-directory")
"f j" '(counsel-file-jump :wk "Jump to a file below current directory")
"f l" '(counsel-locate :wk "Locate a file")
"f r" '(counsel-recentf :wk "Find recent files")
"f u" '(sudo-edit-find-file :wk "Sudo find file")
"f U" '(sudo-edit :wk "Sudo edit file"))
(dt/leader-keys
"g" '(:ignore t :wk "Git")
"g /" '(magit-displatch :wk "Magit dispatch")
"g ." '(magit-file-displatch :wk "Magit file dispatch")
"g b" '(magit-branch-checkout :wk "Switch branch")
"g c" '(:ignore t :wk "Create")
"g c b" '(magit-branch-and-checkout :wk "Create branch and checkout")
"g c c" '(magit-commit-create :wk "Create commit")
"g c f" '(magit-commit-fixup :wk "Create fixup commit")
"g C" '(magit-clone :wk "Clone repo")
"g f" '(:ignore t :wk "Find")
"g f c" '(magit-show-commit :wk "Show commit")
"g f f" '(magit-find-file :wk "Magit find file")
"g f g" '(magit-find-git-config-file :wk "Find gitconfig file")
"g F" '(magit-fetch :wk "Git fetch")
"g g" '(magit-status :wk "Magit status")
"g i" '(magit-init :wk "Initialize git repo")
"g l" '(magit-log-buffer-file :wk "Magit buffer log")
"g r" '(vc-revert :wk "Git revert file")
"g s" '(magit-stage-file :wk "Git stage file")
"g t" '(git-timemachine :wk "Git time machine")
"g u" '(magit-stage-file :wk "Git unstage file"))
(dt/leader-keys (dt/leader-keys
"h" '(:ignore t :wk "Help") "h" '(:ignore t :wk "Help")
@@ -343,6 +389,14 @@ You can use the bindings CTRL plus =/- for zooming in/out. You can also use CTR
"m d" '(:ignore t :wk "Date/deadline") "m d" '(:ignore t :wk "Date/deadline")
"m d t" '(org-time-stamp :wk "Org time stamp")) "m d t" '(org-time-stamp :wk "Org time stamp"))
(dt/leader-keys
"o" '(:ignore t :wk "Open")
"o d" '(dashboard-open :wk "Dashboard")
"o f" '(make-frame :wk "Open buffer in new frame")
"o F" '(select-frame-by-name :wk "Select frame by name"))
;; projectile-command-map already has a ton of bindings
;; set for us, so no need to specify each individually.
(dt/leader-keys (dt/leader-keys
"p" '(projectile-command-map :wk "Projectile")) "p" '(projectile-command-map :wk "Projectile"))
@@ -352,6 +406,7 @@ You can use the bindings CTRL plus =/- for zooming in/out. You can also use CTR
"t f" '(flycheck-mode :wk "Toggle flycheck") "t f" '(flycheck-mode :wk "Toggle flycheck")
"t l" '(display-line-numbers-mode :wk "Toggle line numbers") "t l" '(display-line-numbers-mode :wk "Toggle line numbers")
"t n" '(neotree-toggle :wk "Toggle neotree file viewer") "t n" '(neotree-toggle :wk "Toggle neotree file viewer")
"t o" '(org-mode :wk "Toggle org mode")
"t r" '(rainbow-mode :wk "Toggle rainbow mode") "t r" '(rainbow-mode :wk "Toggle rainbow mode")
"t t" '(visual-line-mode :wk "Toggle truncated lines") "t t" '(visual-line-mode :wk "Toggle truncated lines")
"t v" '(vterm-toggle :wk "Toggle vterm")) "t v" '(vterm-toggle :wk "Toggle vterm"))
@@ -445,6 +500,29 @@ Emacs has built-in programming language modes for Lisp, Scheme, DSSSL, Ada, ASM,
#+end_src #+end_src
* GIT PROGRAMS
** Git Time Machine
[[https://github.com/emacsmirror/git-timemachine][git-timemachine]] is a program that allows you to move backwards and forwards through a file's commits. 'SPC g t' will open the time machine on a file if it is in a git repo. Then, while in normal mode, you can use 'CTRL-j' and 'CTRL-k' to move backwards and forwards through the commits.
#+begin_src emacs-lisp
(use-package git-timemachine
:after git-timemachine
:hook (evil-normalize-keymaps . git-timemachine-hook)
:config
(evil-define-key 'normal git-timemachine-mode-map (kbd "C-j") 'git-timemachine-show-previous-revision)
(evil-define-key 'normal git-timemachine-mode-map (kbd "C-k") 'git-timemachine-show-next-revision)
)
#+end_src
** Magit
[[https://magit.vc/manual/][Magit]] is a full-featured git client for Emacs.
#+begin_src emacs-lisp
(use-package magit)
#+end_src
* MODELINE * MODELINE
The modeline is the bottom status bar that appears in Emacs windows. While you can create your own custom modeline, why go to the trouble when Doom Emacs already has a nice modeline package available. For more information on what is available to configure in the Doom modeline, check out: [[https://github.com/seagle0128/doom-modeline][Doom Modeline]] The modeline is the bottom status bar that appears in Emacs windows. While you can create your own custom modeline, why go to the trouble when Doom Emacs already has a nice modeline package available. For more information on what is available to configure in the Doom modeline, check out: [[https://github.com/seagle0128/doom-modeline][Doom Modeline]]
@@ -642,11 +720,7 @@ Vterm is a terminal emulator within Emacs. The 'shell-file-name' setting sets t
[[https://github.com/nflath/sudo-edit][sudo-edit]] gives us the ability to open files with sudo privileges or switch over to editing with sudo privileges if we initially opened the file without such privileges. [[https://github.com/nflath/sudo-edit][sudo-edit]] gives us the ability to open files with sudo privileges or switch over to editing with sudo privileges if we initially opened the file without such privileges.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package sudo-edit (use-package sudo-edit)
:config
(dt/leader-keys
"fu" '(sudo-edit-find-file :wk "Sudo find file")
"fU" '(sudo-edit :wk "Sudo edit file")))
#+end_src #+end_src
* THEME * THEME

View File

@@ -457,7 +457,7 @@ def init_widgets_screen1():
# All other monitors' bars will display everything but widgets 22 (systray) and 23 (spacer). # All other monitors' bars will display everything but widgets 22 (systray) and 23 (spacer).
def init_widgets_screen2(): def init_widgets_screen2():
widgets_screen2 = init_widgets_list() widgets_screen2 = init_widgets_list()
del widgets_screen2[22:23] del widgets_screen2[22:24]
return widgets_screen2 return widgets_screen2
# For adding transparency to your bar, add (background="#00000000") to the "Screen" line(s) # For adding transparency to your bar, add (background="#00000000") to the "Screen" line(s)