mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 11:30:23 +10:00
Minor edits
This commit is contained in:
@@ -50,6 +50,8 @@
|
||||
:config
|
||||
(dashboard-setup-startup-hook))
|
||||
|
||||
(delete-selection-mode 1)
|
||||
|
||||
(use-package diminish)
|
||||
|
||||
(use-package dired-open
|
||||
@@ -139,13 +141,11 @@
|
||||
(dt/leader-keys
|
||||
"SPC" '(counsel-M-x :wk "Counsel M-x")
|
||||
"." '(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"))
|
||||
|
||||
(dt/leader-keys
|
||||
"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-other-window :wk "Clone indirect buffer in new window")
|
||||
"b d" '(bookmark-delete :wk "Delete bookmark")
|
||||
@@ -160,8 +160,7 @@
|
||||
"b R" '(rename-buffer :wk "Rename buffer")
|
||||
"b s" '(basic-save-buffer :wk "Save buffer")
|
||||
"b S" '(save-some-buffers :wk "Save multiple buffers")
|
||||
"b w" '(bookmark-save :wk "Save current bookmarks to bookmark file")
|
||||
"b y" '(yank-buffer :wk "Yank buffer"))
|
||||
"b w" '(bookmark-save :wk "Save current bookmarks to bookmark file"))
|
||||
|
||||
(dt/leader-keys
|
||||
"d" '(:ignore t :wk "Dired")
|
||||
@@ -178,7 +177,42 @@
|
||||
"e h" '(counsel-esh-history :which-key "Eshell history")
|
||||
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
|
||||
"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
|
||||
"h" '(:ignore t :wk "Help")
|
||||
@@ -232,6 +266,14 @@
|
||||
"m d" '(:ignore t :wk "Date/deadline")
|
||||
"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
|
||||
"p" '(projectile-command-map :wk "Projectile"))
|
||||
|
||||
@@ -241,6 +283,7 @@
|
||||
"t f" '(flycheck-mode :wk "Toggle flycheck")
|
||||
"t l" '(display-line-numbers-mode :wk "Toggle line numbers")
|
||||
"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 t" '(visual-line-mode :wk "Toggle truncated lines")
|
||||
"t v" '(vterm-toggle :wk "Toggle vterm"))
|
||||
@@ -309,6 +352,16 @@
|
||||
(use-package haskell-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
|
||||
:ensure t
|
||||
:init (doom-modeline-mode 1)
|
||||
@@ -416,11 +469,7 @@
|
||||
(reusable-frames . visible)
|
||||
(window-height . 0.4))))
|
||||
|
||||
(use-package sudo-edit
|
||||
:config
|
||||
(dt/leader-keys
|
||||
"fu" '(sudo-edit-find-file :wk "Sudo find file")
|
||||
"fU" '(sudo-edit :wk "Sudo edit file")))
|
||||
(use-package sudo-edit)
|
||||
|
||||
(add-to-list 'custom-theme-load-path "~/.config/emacs/themes/")
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
- [[#backup][BACKUP]]
|
||||
- [[#company][COMPANY]]
|
||||
- [[#dashboard][DASHBOARD]]
|
||||
- [[#deletion-selection][DELETION SELECTION]]
|
||||
- [[#diminish][DIMINISH]]
|
||||
- [[#dired][DIRED]]
|
||||
- [[#evil][EVIL]]
|
||||
@@ -25,6 +26,9 @@
|
||||
- [[#display-line-numbers-and-truncated-lines][Display Line Numbers and Truncated Lines]]
|
||||
- [[#ivy-counsel][IVY (COUNSEL)]]
|
||||
- [[#language-support][LANGUAGE SUPPORT]]
|
||||
- [[#git-programs][GIT PROGRAMS]]
|
||||
- [[#git-time-machine][Git Time Machine]]
|
||||
- [[#magit][Magit]]
|
||||
- [[#modeline][MODELINE]]
|
||||
- [[#neotree][NEOTREE]]
|
||||
- [[#org-mode][ORG MODE]]
|
||||
@@ -128,6 +132,14 @@ Emacs Dashboard is an extensible startup screen showing you recent files, bookma
|
||||
|
||||
#+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
|
||||
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
|
||||
"SPC" '(counsel-M-x :wk "Counsel M-x")
|
||||
"." '(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"))
|
||||
|
||||
(dt/leader-keys
|
||||
"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-other-window :wk "Clone indirect buffer in new window")
|
||||
"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 l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
|
||||
"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
|
||||
"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 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
|
||||
"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 l" '(display-line-numbers-mode :wk "Toggle line numbers")
|
||||
"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 t" '(visual-line-mode :wk "Toggle truncated lines")
|
||||
"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
|
||||
|
||||
* 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
|
||||
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.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package sudo-edit
|
||||
:config
|
||||
(dt/leader-keys
|
||||
"fu" '(sudo-edit-find-file :wk "Sudo find file")
|
||||
"fU" '(sudo-edit :wk "Sudo edit file")))
|
||||
(use-package sudo-edit)
|
||||
#+end_src
|
||||
|
||||
* THEME
|
||||
|
||||
Reference in New Issue
Block a user