This commit is contained in:
elkowar 2020-11-08 21:08:22 +01:00
parent 33457af4f4
commit 542859a3b3
2 changed files with 116 additions and 34 deletions

View file

@ -63,18 +63,33 @@ Which key makes Emacs self documenting.
(which-key-mode 1)) (which-key-mode 1))
#+END_SRC #+END_SRC
Tramp is awesome for editing remote files.
By default it's slow as fuck though. ** Restart emacs
Restarting emacs from within emacs!
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq tramp-default-method "ssh") (use-package restart-emacs
:config
(setq restart-emacs-restore-frames t))
#+END_SRC #+END_SRC
Avoid typing stupid code block thingys all the time. ** disable clipboard whatever
Clipboard shit is fucked, so this is necessary to unfuck.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(add-to-list 'org-structure-template-alist (setq x-select-enable-clipboard-manager nil)
'("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC")) #+END_SRC
** Store recent files
#+BEGIN_SRC emacs-lisp
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(setq recentf-max-saved-items 25)
;; (run-at-time nil (* 5 60) 'recentf-save-list)
#+END_SRC #+END_SRC
@ -86,16 +101,6 @@ Avoid typing stupid code block thingys all the time.
(setq-default tab-width 4) (setq-default tab-width 4)
#+END_SRC #+END_SRC
** =nyan-mode=
Nya-nya-nya-nya-nya...
#+BEGIN_SRC emacs-lisp
(use-package nyan-mode
:config
(nyan-mode))
#+END_SRC
** Font ** Font
@ -173,6 +178,19 @@ Flx does fancy fuzzy matching with good sorting
#+END_SRC #+END_SRC
* Projectile
#+begin_src emacs-lisp
(use-package projectile
:config
(projectile-mode t))
(use-package counsel-projectile
:after projectile counsel
:config
)
#+end_src
* general.el * general.el
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -195,18 +213,18 @@ Flx does fancy fuzzy matching with good sorting
(elk-leader-def (elk-leader-def
"a" 'org-agenda "a" 'org-agenda
"s" 'org-store-link "s" 'org-store-link
"c" 'org-capture "t" '((lambda () (interactive) (org-capture nil "t")) :wk "org-capture whatever")
"t" '((lambda () (interactive) (org-capture nil "t")) :which-key "org-capture whatever") "f" '(counsel-find-file :wk "open a file")
"f" '(counsel-find-file :which-key "open a file")
"1" 'delete-other-windows "1" 'delete-other-windows
"0" 'delete-window "0" 'delete-window
"p" '(:keymap projectile-command-map :wk "Project")
) )
(which-key-add-key-based-replacements "SPC y" "Emacs stuff") (which-key-add-key-based-replacements "SPC y" "Emacs stuff")
(elk-leader-def (elk-leader-def
:prefix "SPC y" :prefix "SPC y"
"c" '((lambda () (interactive) (find-file "~/.emacs.d/config.org")) :which-key "open config.org") "c" '((lambda () (interactive) (find-file "~/.emacs.d/config.org")) :wk "open config.org")
"r" '((lambda () (interactive) (load-file "~/.emacs.d/init.el")) :which-key "reload config.org"))) "r" '((lambda () (interactive) (load-file "~/.emacs.d/init.el")) :wk "reload config.org")))
#+END_SRC #+END_SRC
@ -217,11 +235,13 @@ Flx does fancy fuzzy matching with good sorting
(which-key-add-key-based-replacements "SPC b" "Window management") (which-key-add-key-based-replacements "SPC b" "Window management")
(elk-leader-def (elk-leader-def
:prefix "SPC b" :prefix "SPC b"
"c" '(delete-window :which-key "close window") "c" '(delete-window :wk "close window")
"b" '(counsel-switch-buffer :which-key "Switch buffer") "f" '(counsel-buffer-or-recentf :wk "Switch to file")
"d" '(kill-buffer :which-key "close buffer") "b" '(counsel-switch-buffer :wk "Switch buffer")
"s" '(split-window-below :which-key "h-split") "o" '(counsel-switch-buffer-other-window :wk "Switch buffer in other window")
"v" '(split-window-right :which-key "v-split")) "d" '(kill-buffer :wk "close buffer")
"s" '(split-window-below :wk "h-split")
"v" '(split-window-right :wk "v-split"))
#+END_SRC #+END_SRC
@ -264,12 +284,24 @@ Emacs is lacks a good editor.
Makes evil work everywhere. Makes evil work everywhere.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package evil-collection (use-package evil-collection
:after evil :after evil
:config :config
(evil-collection-init)) (evil-collection-init))
#+END_SRC #+END_SRC
*** evil-surround
#+BEGIN_SRC emacs-lisp
(use-package evil-surround
:ensure t
:after evil
:config
(global-evil-surround-mode t))
#+END_SRC
** Undo-tree ** Undo-tree
Undo tree is based. Undo tree is based.
@ -278,7 +310,8 @@ Undo tree is based.
(use-package undo-tree (use-package undo-tree
:init :init
:config :config
(global-undo-tree-mode t)) (global-undo-tree-mode t)
(setq undo-tree-auto-save-history t))
#+END_SRC #+END_SRC
@ -310,3 +343,53 @@ because rainbows are fancy!
** Nerdcommenter
#+BEGIN_SRC emacs-lisp
(use-package evil-nerd-commenter)
(which-key-add-key-based-replacements "SPC c" "Commenting")
(elk-leader-def
:prefix "SPC c"
"SPC" '(evilnc-comment-or-uncomment-lines :wk "toggle comment")
"c" '(evilnc-copy-and-comment-lines :wk "copy and comment"))
#+END_SRC
* Git integration
** Diff-hl gitgutter
#+BEGIN_SRC emacs-lisp
(use-package diff-hl
:init
:config
(diff-hl-mode t))
#+END_SRC
** Magit
#+BEGIN_SRC emacs-lisp
(use-package magit
:init
:config
(rainbow-delimiters-mode t))
(use-package evil-magit
:init
:config
(rainbow-delimiters-mode t))
(which-key-add-key-based-replacements "SPC g" "Git shit")
(elk-leader-def
:prefix "SPC g"
"s" '(magit-status :wk "status")
"b" '(counsel-switch-buffer :wk "Switch buffer")
"d" '(kill-buffer :wk "close buffer"))
#+END_SRC

@ -1 +0,0 @@
Subproject commit 9a2c72ef17250be5f0719ca6d50e0669f0cddd84