From fb46bd68d95e26a0082c199ccd9f37fd5f043158 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Thu, 31 Mar 2022 10:34:16 +0200 Subject: [PATCH] Fix buggy emacs TAB error --- files/emacs/init.org | 34 ++++++++++++++++++++++++++-------- files/zsh/.zshrc | 8 +++++--- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/files/emacs/init.org b/files/emacs/init.org index 81d2188..7b09795 100644 --- a/files/emacs/init.org +++ b/files/emacs/init.org @@ -319,10 +319,11 @@ Use =doom-modeline= as a bar... together with icons and nyan cat! (use-package nyan-mode :straight t :init - ;; (nyan-mode) + (nyan-mode) ;; (nyan-start-animation) :config - (setq nyan-cat-face-number 4)) + (setq nyan-cat-face-number 4 + nyan-minimum-window-width 100)) #+end_src *** Inline colors @@ -474,14 +475,12 @@ Bootstrap =org-mode= together with keybindings. "odi" 'org-display-inline-images) :hook (org-mode . (lambda () (electric-indent-local-mode -1))) ;; dont make real spaces at the start of a line - (org-mode . org-indent-mode) ;; add virtual spaces - :config - (define-key evil-normal-state-map (kbd "TAB") 'org-cycle)) ;; use TAB to FOLD in every evil-mode + (org-mode . org-indent-mode)) ;; add virtual spaces #+end_src *** Misc #+begin_src emacs-lisp -(setq org-startup-with-inline-images t ;; start with inline images enabled +(setq org-startup-with-inline-images nil ;; start with inline images disabled org-image-actual-width nil ;; rescale inline images org-directory "~/org" ;; set org file directory org-edit-src-content-indentation 0 ;; don't indent stupidly in org-edit-src-code @@ -568,6 +567,14 @@ I need my =hjkl= :( (setq org-ref-completion-library 'org-ref-ivy-cite)) #+end_src +*** org-screenshot +#+begin_src emacs-lisp +(use-package org-attach-screenshot + :straight t + :config (setq org-attach-screenshot-command-line "gnome-screenshot -a -f %f" + org-attach-screenshot-auto-refresh "never")) +#+end_src + *** LaTeX Export Enable LaTeX export with =pdflatex= and use =minted= for code highlighting. Also fix math =utf8= chars. @@ -703,7 +710,7 @@ Sometimes, a big red TODO is more intimidating than one with normal text color. '((t :background "#cc241d" :foreground "#ffffff")) "TODO Face") (defface hl-todo-UNUSED - '((t :background "#859900" :foreground "#ffffff")) + '((t :background "#B58900" :foreground "#ffffff")) "TODO Face") (setq hl-todo-highlight-punctuation ":" hl-todo-color-background t @@ -713,6 +720,13 @@ Sometimes, a big red TODO is more intimidating than one with normal text color. ("UNUSED" . hl-todo-UNUSED)))) #+end_src +*** Code style +I want =bsd= style C. +#+begin_src emacs-lisp +(setq c-default-style "bsd" + c-basic-offset 4) +#+end_src + ** Code completion *** completion @@ -799,6 +813,7 @@ We also need the actual snippets. (rust-mode . lsp) (python-mode . lsp) (haskell-mode . lsp) + (c-mode . lsp) (c++-mode . lsp)) #+end_src @@ -994,7 +1009,10 @@ Keybinds: (define-key pdf-view-mode-map [remap swiper] 'isearch-forward-regexp) (define-key pdf-view-mode-map [remap evil-ex] 'pdf-view-goto-page) (setq-default pdf-view-display-size 'fit-page) - (setq pdf-view-resize-factor 1.1)) + (setq pdf-view-resize-factor 1.1) + :hook + (pdf-misc-minor-mode . auto-revert-mode)) + ;; load necessary things, when a PDF gets opened (pdf-tools-install) diff --git a/files/zsh/.zshrc b/files/zsh/.zshrc index 8674072..60d2da5 100644 --- a/files/zsh/.zshrc +++ b/files/zsh/.zshrc @@ -51,15 +51,17 @@ alias rm='rm -i' # Ask before removal alias cp='cp -i' # Ask before removal alias mv='mv -i' # Ask before removal -alias powershell='PS1="windowsadm@powershell$ " bash' +# tools alias conservation='cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode' - alias truecolor='curl -s https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh | bash' - alias nssh='SSH_AUTH_SOCK= ssh' alias cpu='watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"' +# troll +alias powershell='PS1="windowsadm@powershell$ " bash' +alias mucdai='rm -rf' + if [ -f ~/.zshrc_local ]; then source ~/.zshrc_local fi