Added org-mode settings and added ascii art

This commit is contained in:
qorg11 2022-02-10 00:09:20 +01:00
parent d49a164671
commit b039013de2
No known key found for this signature in database
GPG key ID: 343FC20A4ACA62B9
2 changed files with 97 additions and 27 deletions

View file

@ -135,12 +135,10 @@
(add-hook 'after-make-frame-functions 'contextual-menubar)
(use-package zencoding-mode
:ensure t
:defer 1
:init
(add-hook 'sgml-mode-hook 'zencoding-mode))
:defer 1)
#+END_SRC
* customization
* Customization
Emacs customization, Here is where most of the configuration is.
** Pseudopersonalization
The basic emacs persdonalization lol
@ -268,7 +266,6 @@
#+BEGIN_SRC emacs-lisp
(defalias 'perl-mode 'cperl-mode)
(setq cperl-indent-level 5)
#+END_SRC
*** C*
This use c-eldoc mode so it prints the function's prototype in the
@ -287,6 +284,16 @@
(setq raku-indent-offset 5)
(setq raku-exec-path "/home/qorg/.raku/rakudo-moar-2021.10-01-linux-x86_64-gcc/bin/raku")
#+end_src
*** org
#+begin_src emacs-lisp
(setq org-ellipsis " ")
(setq org-src-fontify-natively t)
(setq org-src-tab-acts-natively t)
(setq org-confirm-babel-evaluate nil)
(setq org-export-with-smart-quotes t)
(setq org-src-window-setup 'current-window)
(add-hook 'org-mode-hook 'org-indent-mode)
#+end_src
** Extra functions
Here I put functions I won't bother to document because they're so
@ -323,14 +330,12 @@
#+END_SRC
** Dired
Ahhh, the emacs file browser, better than ranger and others...
Hide dotfiles:
#+BEGIN_SRC emacs-lisp
(use-package dired-hide-dotfiles
:ensure t
:init
(defun my-dired-mode-hook ()
"My `dired' mode hook."
;; To hide dot-files by default
@ -340,11 +345,20 @@
(define-key dired-mode-map "." #'dired-hide-dotfiles-mode))
(add-hook 'dired-mode-hook #'my-dired-mode-hook))
(use-package async
:ensure t
:init (dired-async-mode 1))
(add-hook 'dired-mode-hook
(lambda ()
(dired-hide-details-mode)))
#+END_SRC
Now let's make the thing lysergic
#+begin_src emacs-lisp
(set-face-foreground dired-directory-face "orange")
(set-face-foreground dired-symlink-face "cyan")
(set-face-foreground dired-mark-face "green")
(set-face-foreground dired-marked-face "blue")
#+end_src
** kill ring popup
#+BEGIN_SRC emacs-lisp
(use-package popup-kill-ring
@ -353,22 +367,8 @@
#+END_SRC
** Dired customization
#+BEGIN_SRC emacs-lisp
(add-hook 'dired-mode-hook
(lambda ()
(dired-hide-details-mode)))
#+END_SRC
Now let's make the thing lysergic
#+begin_src emacs-lisp
(set-face-foreground dired-directory-face "yellow")
(set-face-foreground dired-symlink-face "cyan")
(set-face-foreground dired-mark-face "green")
(set-face-foreground dired-marked-face "blue")
#+end_src
** scrolling
Scroll by lines rather than by pages.
#+begin_src emacs-lisp
(setq scroll-step 1)
(setq scroll-conservatively 10000)
@ -412,6 +412,7 @@
#+end_src
** Highlight indent guides
I don't really know, it looks cool.
#+begin_src emacs-lisp
(use-package "highlight-indent-guides"
:ensure t
@ -431,15 +432,15 @@
#+begin_src emacs-lisp
(use-package "ace-window"
:ensure t
:bind("M-u" . 'ace-window))
:bind("M-l" . 'ace-window))
#+end_src
** Expand region
#+begin_src emacs-lisp
(use-package expand-region
:ensure t
:bind ("C-c C-e" . 'er/expand-region))
:bind ("C-x e" . 'er/expand-region))
#+end_src
** Beacon mode
#+begin_src emacs-lisp
@ -463,6 +464,56 @@
(use-package "workgroups"
:ensure t)
#+end_src
** Buffers
Well, you know sometimes you just want to change to the previous
buffer and don't want a whole interface for just pressing enter.
#+begin_src emacs-lisp
(defun switch-to-previous-buffer ()
(interactive)
(switch-to-buffer (other-buffer (current-buffer) 1)))
(global-set-key (kbd "C-x C-b") 'switch-to-previous-buffer)
#+end_src
** Hooks
I am tired of =M-x auto-fill-mode= in some modes
#+begin_src emacs-lisp
(add-hook 'org-mode-hook 'auto-fill-mode)
(add-hook 'sgml-mode-hook 'auto-fill-mode)
(add-hook 'sgml-mode-hook 'zencoding-mode)
#+end_src
** Hungry delete
Having to delete multiple whitespaces is one of the things I hate,
thankfully there's this thing.
#+begin_src emacs-lisp
(use-package "hungry-delete"
:ensure t
:init(global-hungry-delete-mode))
#+end_src
** Yasnippet
#+begin_src emacs-lisp
(use-package "yasnippet"
:ensure t
:config
(use-package "yasnippet-snippets"
:ensure t)
(yas-reload-all))
#+end_src
** Org-mode customization
#+begin_src emacs-lisp
(use-package "org-bullets"
:ensure t
:config
(add-hook 'org-mode-hook 'org-bullets-mode))
#+end_src
** diff-hl
#+begin_src emacs-lisp
(use-package "diff-hl"
:ensure t
:config
(global-diff-hl-mode)
(add-hook 'magit-pre-refresh-hook 'diff-hl-magit-pre-refresh)
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
#+end_src
* Helm
fuck Ido lol
#+begin_src emacs-lisp
@ -493,7 +544,7 @@
(define-key helm-find-files-map (kbd "C-b") 'helm-find-files-up-one-level)
(define-key helm-find-files-map (kbd "C-f") 'helm-execute-persistent-action)
#+end_src
* Dashboard
Dashboard. You can change
~/.emacs.d/img/logo.png
@ -520,3 +571,4 @@
#+end_src

18
img/banner.txt Normal file
View file

@ -0,0 +1,18 @@
_ ___ _ _
_ ___ __ ___ __ _ ___
__ _ ___ __ ___
_ ___ _
_ _ __ _
___ __ _
__ _
_ _ _
_ _ _
_ _ _
__ ___
_ _ _ _
_ _
_ _
_ _
_
__