├── LaTeX ├── articleheader.tex └── summaryheader.tex ├── README.org ├── myinit.org └── sv └── emacs ├── log └── run └── run /LaTeX/articleheader.tex: -------------------------------------------------------------------------------- 1 | % Created 2019-06-06 Thu 20:47 2 | % Intended LaTeX compiler: pdflatex 3 | \usepackage[utf8]{inputenc} 4 | \usepackage[T1]{fontenc} 5 | \usepackage{graphicx} 6 | \usepackage{grffile} 7 | \usepackage{longtable} 8 | \usepackage{wrapfig} 9 | \usepackage{rotating} 10 | \usepackage[normalem]{ulem} 11 | \usepackage{amsmath} 12 | \usepackage{textcomp} 13 | \usepackage{amssymb} 14 | \usepackage{capt-of} 15 | \usepackage{hyperref} 16 | \usepackage[margin=1in]{geometry} 17 | \usepackage{listings} 18 | \usepackage{color} 19 | \usepackage{xcolor} 20 | \renewcommand{\baselinestretch}{1.5} 21 | \author{Matheus Augusto da Silva} 22 | \date{\today} 23 | \title{TITLE} 24 | \hypersetup{ 25 | pdfauthor={Matheus Augusto da Silva}, 26 | pdftitle={TITLE}, 27 | pdfkeywords={}, 28 | pdfsubject={}, 29 | pdfcreator={Emacs 26.2 (Org mode 9.1.14)}, 30 | pdflang={English}} 31 | 32 | \definecolor{mygreen}{rgb}{0,0.6,0} 33 | \definecolor{mygray}{rgb}{0.5,0.5,0.5} 34 | \definecolor{mymauve}{rgb}{0.58,0,0.82} 35 | 36 | \lstset{ % 37 | backgroundcolor=\color{white}, % choose the background color 38 | basicstyle=\footnotesize, % size of fonts used for the code 39 | breaklines=true, % automatic line breaking only at whitespace 40 | captionpos=b, % sets the caption-position to bottom 41 | commentstyle=\color{mygreen}, % comment style 42 | keywordstyle=\color{blue}, % keyword style 43 | stringstyle=\color{mymauve}, % string literal style 44 | } 45 | 46 | %%% Local Variables: 47 | %%% mode: latex 48 | %%% TeX-master: t 49 | %%% End: 50 | -------------------------------------------------------------------------------- /LaTeX/summaryheader.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a5paper,landscape]{article} 2 | \usepackage[utf8]{inputenc} 3 | \usepackage[margin=0.2 in]{geometry} 4 | \usepackage[dvipsnames]{xcolor} 5 | \usepackage{multicol} 6 | \usepackage{titlesec} 7 | \usepackage{enumitem} 8 | \usepackage{blindtext} 9 | \usepackage{graphicx} 10 | \usepackage{pgfpages} 11 | \pgfpagesuselayout{2 on 1}[a4paper] 12 | %%% List formatting stuff 13 | \setitemize{noitemsep} 14 | \setenumerate{noitemsep} 15 | \pagenumbering{gobble} 16 | 17 | %%% Coloring macros 18 | \newcommand{\cred}[1]{\textcolor{red}{#1}} 19 | \newcommand{\cblue}[1]{\textcolor{blue}{#1}} 20 | \newcommand{\ccyan}[1]{\textcolor{cyan}{#1}} 21 | \newcommand{\cgreen}[1]{\textcolor{green}{#1}} 22 | \newcommand{\cyellow}[1]{\textcolor{yellow}{#1}} 23 | \newcommand{\cpurple}[1]{\textcolor{purple}{#1}} 24 | \newcommand{\corange}[1]{\textcolor{orange}{#1}} 25 | 26 | %%% Macros 27 | \newcommand{\borange}[1]{\colorbox{BurntOrange}{#1}} 28 | \newcommand{\http}{{\cblue{HTTP}}} 29 | \newcommand{\dns}{{\corange{DNS}}} 30 | \newcommand{\ptp}{{\cred{P2P}}} 31 | \newcommand{\spdy}{{\cpurple{SPDY}}} 32 | \newcommand{\cache}{{\cred{cache}}} 33 | \newcommand{\caches}{{\cred{caches}}} 34 | \newcommand{\lfu}{{\corange{LFU}}} 35 | \newcommand{\lru}{{\cgreen{LRU}}} 36 | \newcommand{\dht}{{\cgreen{DHT}}} 37 | \newcommand{\cookie}{\cgreen{cookie}} 38 | \newcommand{\cookies}{\cgreen{cookies}} 39 | \newcommand{\hit}{$P_{hit}$} 40 | 41 | 42 | %%% Section Formatting stuff 43 | \titleformat{\section} 44 | {\color{red} \large \bfseries} 45 | {} 46 | {0em} 47 | {} 48 | \titlespacing{\section}{0pt}{2pt}{2pt}% \titlespacing{}{}{}{}[] 49 | 50 | \titleformat{\subsection} 51 | {\color{blue} \bfseries} 52 | {} 53 | {0em} 54 | {} 55 | \titlespacing{\subsection}{0pt}{2pt}{2pt}% \titlespacing{}{}{}{}[] 56 | 57 | \titleformat{\subsubsection} 58 | {\color{purple} \bfseries} 59 | {} 60 | {0em} 61 | {} 62 | \titlespacing{\subsubsection}{0pt}{2pt}{2pt}% \titlespacing{}{}{}{}[] 63 | -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: showall 2 | * My emacs literate configuration file 3 | My config requires evil-mode, org-mode and use-package. If you want to use it, 4 | make sure you have at least previously installed use-package. A minimal working ~/.emacs can 5 | look like this: 6 | 7 | #+BEGIN_SRC emacs-lisp 8 | ;; Change to your .emacs.d/ directory accordingly 9 | (setq user-emacs-directory "/home/trajanus/.emacs.d") 10 | (require 'package) 11 | (require 'use-package) 12 | 13 | (package-initialize) 14 | (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")) 15 | (add-to-list 'package-archives '("melpa" . "http://stable.melpa.org/packages/")) 16 | 17 | (use-package org 18 | :ensure t) 19 | 20 | (use-package evil 21 | :ensure t 22 | :config 23 | (evil-mode 1)) 24 | 25 | ;; Change to the path where you cloned the config to 26 | (org-babel-load-file "/home/trajanus/.emacs.d/myinit.org") 27 | #+END_SRC 28 | 29 | ** Utility Cheat Sheet 30 | |---------+-----------------------------------+-------------------| 31 | | Key | Function | Evil Equivalent | 32 | |---------+-----------------------------------+-------------------| 33 | | C-x C-w | Write Current Buffer | :write | 34 | | C-x C-s | Save Current Buffer | :write | 35 | | C-x s | Save all open Buffers | | 36 | | C-x b | Switch Buffers | :buffer | 37 | | C-x i | Copy file to current buffer | :read | 38 | | C-x k | Kill Buffer | :quit | 39 | | C-g | Abort commands | | 40 | | C-h t | Emacs basic Tutorial | | 41 | | C-h f | Describe Function by name | | 42 | | C-h v | Describe Variable by name | | 43 | | C-h c | Describe the Function a key calls | | 44 | | C-h m | Get mode-specific information | | 45 | | M-x | Emacs Function Call | | 46 | | C-x C-c | Exit Emacs | | 47 | |---------+-----------------------------------+-------------------| 48 | 49 | 50 | * Emacs runit service 51 | If you are on a Linux distribution which uses runit, you can also use 52 | my runit service for running Emacs in server mode. 53 | 54 | Before doing so, you should change the owner of the emacs service by 55 | changing "trajanus" to the name of your user on the run scripts at 56 | sv/emacs/ and sv/emacs/log/. Notice you can also change the path 57 | inside the script sv/emacs/log/run to move your server logs to 58 | another directory. 59 | 60 | Once that is done, you can enable the service by symlinking the 61 | folder sv/emacs to your /var/service/ directory. 62 | 63 | #+BEGIN_SRC bash 64 | ln -s ${PWD}/sv/emacs /var/service/ 65 | #+END_SRC 66 | 67 | The logging allows you to troubleshoot if you find any issues, so do 68 | leave it enabled if you are setting it up for the first time. Once 69 | that is done, you can add something like this to your rc.local file: 70 | 71 | #+BEGIN_SRC bash 72 | export EDITOR="emacsclient -nc" 73 | #+END_SRC 74 | 75 | To use the graphical emacs client as your default editor, 76 | it may be necessary to also run the command: 77 | 78 | #+BEGIN_SRC bash 79 | xhost + 80 | #+END_SRC 81 | 82 | -------------------------------------------------------------------------------- /myinit.org: -------------------------------------------------------------------------------- 1 | #+STARTUP: overview 2 | * Interface Tweaks 3 | ** Startup, general settings 4 | #+BEGIN_SRC emacs-lisp 5 | ;; Remove initial buffer, set index file 6 | (setq inhibit-startup-message t) 7 | (setq initial-buffer-choice "index.org") 8 | 9 | ;; Hide Scroll bar,menu bar, tool bar 10 | (scroll-bar-mode -1) 11 | (tool-bar-mode -1) 12 | (menu-bar-mode -1) 13 | 14 | ;; Line numbering 15 | (global-display-line-numbers-mode) 16 | (setq display-line-numbers-type 'relative) 17 | 18 | ;; Display battery for when in full screen mode 19 | (display-battery-mode t) 20 | 21 | ;; Keybindings 22 | (global-set-key (kbd "") 'revert-buffer) 23 | (global-set-key (kbd "") 'org-export-dispatch) 24 | (global-set-key (kbd "") 'eshell) 25 | (global-set-key (kbd "") 'ranger) 26 | (global-set-key (kbd "") 'magit) 27 | 28 | ;; Misc stuff 29 | (fset 'yes-or-no-p 'y-or-n-p) 30 | (setenv "HOME" "/home/trajanus/") 31 | (server-start) 32 | #+END_SRC 33 | 34 | #+RESULTS: 35 | 36 | ** Evil mode stuff 37 | #+BEGIN_SRC emacs-lisp 38 | (use-package powerline-evil 39 | :ensure t) 40 | (powerline-evil-vim-theme) 41 | (powerline-evil-vim-color-theme) 42 | (define-key evil-ex-map "e" 'find-file) 43 | (define-key evil-ex-map "W" 'save-buffer) 44 | #+END_SRC 45 | 46 | ** Theming & Aesthethic 47 | #+BEGIN_SRC emacs-lisp 48 | (use-package dracula-theme 49 | :config 50 | (load-theme 'dracula) 51 | :ensure t) 52 | 53 | 54 | (global-hl-line-mode t) ;; This highlights the current line in the buffer 55 | 56 | (use-package beacon ;; This applies a beacon effect to the highlighted line 57 | :ensure t 58 | :config 59 | (beacon-mode 1)) 60 | #+END_SRC 61 | 62 | * Packages 63 | ** Try 64 | #+BEGIN_SRC emacs-lisp 65 | (use-package try 66 | :ensure t) 67 | #+END_SRC 68 | 69 | ** Which-key 70 | #+BEGIN_SRC emacs-lisp 71 | (use-package which-key 72 | :config 73 | (setq which-key-idle-delay 0.3) 74 | (setq which-key-popup-type 'frame) 75 | (which-key-mode) 76 | (which-key-setup-minibuffer) 77 | (set-face-attribute 'which-key-local-map-description-face nil 78 | :weight 'bold) 79 | :ensure t) 80 | #+END_SRC 81 | 82 | ** Helm for navigation 83 | #+BEGIN_SRC emacs-lisp 84 | (use-package helm 85 | :init 86 | (require 'helm-config) 87 | (setq helm-split-window-in-side-p t 88 | helm-move-to-line-cycle-in-source t) 89 | :config 90 | (helm-mode 1) ;; Most of Emacs prompts become helm-enabled 91 | (helm-autoresize-mode 1) ;; Helm resizes according to the number of candidates 92 | (global-set-key (kbd "C-x b") 'helm-buffers-list) ;; List buffers ( Emacs way ) 93 | (define-key evil-ex-map "b" 'helm-buffers-list) ;; List buffers ( Vim way ) 94 | (global-set-key (kbd "C-x r b") 'helm-bookmarks) ;; Bookmarks menu 95 | (global-set-key (kbd "C-x C-f") 'helm-find-files) ;; Finding files with Helm 96 | (global-set-key (kbd "M-c") 'helm-calcul-expression) ;; Use Helm for calculations 97 | (global-set-key (kbd "C-s") 'helm-occur) ;; Replaces the default isearch keybinding 98 | (global-set-key (kbd "C-h a") 'helm-apropos) ;; Helmized apropos interface 99 | (global-set-key (kbd "M-x") 'helm-M-x) ;; Improved M-x menu 100 | (global-set-key (kbd "M-y") 'helm-show-kill-ring) ;; Show kill ring, pick something to paste 101 | :ensure t) 102 | #+END_SRC 103 | 104 | #+RESULTS: 105 | : t 106 | ** Company for Auto completion 107 | #+BEGIN_SRC emacs-lisp 108 | (use-package company 109 | :ensure t 110 | :config 111 | (global-company-mode)) 112 | 113 | (use-package helm-company 114 | :after (company) 115 | (define-key company-mode-map (kbd "C-:") 'helm-company) 116 | (define-key company-active-map (kbd "C-:") 'helm-company) 117 | :ensure t) 118 | 119 | (use-package company-quickhelp 120 | :after (company) 121 | :hook (company-mode . company-quickhelp-mode) 122 | :config 123 | (setq company-quickhelp-delay 0.5) 124 | :ensure t) 125 | #+END_SRC 126 | 127 | ** Magit 128 | #+BEGIN_SRC emacs-lisp 129 | (use-package magit 130 | :ensure t) 131 | #+END_SRC 132 | 133 | ** Flycheck 134 | #+BEGIN_SRC emacs-lisp 135 | (use-package flycheck 136 | :ensure t 137 | :init 138 | (global-flycheck-mode t)) 139 | #+END_SRC 140 | 141 | ** Elpy 142 | #+BEGIN_SRC emacs-lisp 143 | (use-package elpy 144 | :ensure t 145 | :config 146 | (elpy-enable)) 147 | #+END_SRC 148 | 149 | ** Yasnippet 150 | #+BEGIN_SRC emacs-lisp 151 | (use-package yasnippet 152 | :ensure t 153 | :init 154 | (yas-global-mode 1)) 155 | #+END_SRC 156 | 157 | ** Treemacs 158 | #+BEGIN_SRC emacs-lisp 159 | (use-package treemacs 160 | :ensure t 161 | :defer t 162 | :init 163 | (with-eval-after-load 'winum 164 | (define-key winum-keymap (kbd "M-0") 'treemacs-select-window)) 165 | :config 166 | (progn 167 | (setq treemacs-collapse-dirs (if (executable-find "python") 3 0) 168 | treemacs-deferred-git-apply-delay 0.5 169 | treemacs-display-in-side-window t 170 | treemacs-file-event-delay 5000 171 | treemacs-file-follow-delay 0.2 172 | treemacs-follow-after-init t 173 | treemacs-follow-recenter-distance 0.1 174 | treemacs-git-command-pipe "" 175 | treemacs-goto-tag-strategy 'refetch-index 176 | treemacs-indentation 2 177 | treemacs-indentation-string " " 178 | treemacs-is-never-other-window nil 179 | treemacs-max-git-entries 5000 180 | treemacs-no-png-images nil 181 | treemacs-no-delete-other-windows t 182 | treemacs-project-follow-cleanup nil 183 | treemacs-persist-file (expand-file-name ".cache/treemacs-persist" user-emacs-directory) 184 | treemacs-recenter-after-file-follow nil 185 | treemacs-recenter-after-tag-follow nil 186 | treemacs-show-cursor nil 187 | treemacs-show-hidden-files nil 188 | treemacs-silent-filewatch nil 189 | treemacs-silent-refresh nil 190 | treemacs-sorting 'alphabetic-desc 191 | treemacs-space-between-root-nodes t 192 | treemacs-tag-follow-cleanup t 193 | treemacs-tag-follow-delay 1.5 194 | treemacs-width 35) 195 | 196 | ;; The default width and height of the icons is 22 pixels. If you are 197 | ;; using a Hi-DPI display, uncomment this to double the icon size. 198 | ;;(treemacs-resize-icons 44) 199 | 200 | (treemacs-follow-mode t) 201 | (treemacs-filewatch-mode t) 202 | (treemacs-fringe-indicator-mode t) 203 | (pcase (cons (not (null (executable-find "git"))) 204 | (not (null (executable-find "python3")))) 205 | (`(t . t) 206 | (treemacs-git-mode 'deferred)) 207 | (`(t . _) 208 | (treemacs-git-mode 'simple)))) 209 | :bind 210 | (:map global-map 211 | ("M-0" . treemacs-select-window) 212 | ("C-x t 1" . treemacs-delete-other-windows) 213 | ("C-x t t" . treemacs) 214 | ("C-x t B" . treemacs-bookmark) 215 | ("C-x t C-t" . treemacs-find-file) 216 | ("C-x t M-t" . treemacs-find-tag))) 217 | 218 | (use-package treemacs-evil 219 | :after treemacs evil 220 | :ensure t) 221 | 222 | (use-package treemacs-projectile 223 | :after treemacs projectile 224 | :ensure t) 225 | #+END_SRC 226 | 227 | ** Reveal.js 228 | #+BEGIN_SRC emacs-lisp 229 | (use-package ox-reveal 230 | :ensure ox-reveal) 231 | (setenv "PATH" (concat (getenv "PATH") ":/opt/texlive/2019/bin/x86_64-linux")) 232 | 233 | (setq org-reveal-root "http://cdn.jsdelivr.net/reveal.js/3.0.0/") 234 | (setq org-reveal-mathjax t) 235 | (use-package htmlize 236 | :ensure t) 237 | #+END_SRC 238 | 239 | #+RESULTS: 240 | 241 | #+RESULTS: 242 | 243 | ** Dired and Ranger for File Management 244 | #+BEGIN_SRC emacs-lisp 245 | ;(use-package dired 246 | ;:ensure t 247 | ;:config (require 'dired)) 248 | 249 | ;;(add-hook 'dired-load-hook 250 | ;;(function (lambda () (load "dired-x")))) 251 | (use-package ranger 252 | :ensure t) 253 | (setq ranger-preview-file true) 254 | #+END_SRC 255 | 256 | #+RESULTS: 257 | 258 | ** Auto-Complete 259 | #+BEGIN_SRC emacs-lisp 260 | (use-package auto-complete 261 | :ensure t 262 | :config 263 | (ac-config-default) 264 | ) 265 | #+END_SRC 266 | ** Emmet-mode 267 | #+BEGIN_SRC emacs-lisp 268 | (use-package emmet-mode 269 | :ensure t 270 | :config 271 | (add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes 272 | (add-hook 'css-mode-hook 'emmet-mode) ;; enable Emmet's css abbreviation. 273 | ) 274 | (use-package ac-emmet 275 | :ensure t 276 | :config 277 | (add-hook 'sgml-mode-hook 'ac-emmet-html-setup) 278 | (add-hook 'css-mode-hook 'ac-emmet-css-setup) 279 | ) 280 | #+END_SRC 281 | 282 | ** Markdown-mode 283 | #+BEGIN_SRC emacs-lisp 284 | (use-package markdown-mode 285 | :ensure t 286 | :mode (("README\\.md\\'" . gfm-mode) 287 | ("\\.md\\'" . markdown-mode) 288 | ("\\.markdown\\'" . markdown-mode)) 289 | :init (setq markdown-command "multimarkdown")) 290 | 291 | #+END_SRC 292 | 293 | #+RESULTS: 294 | : ((\.markdown\' . markdown-mode) (\.md\' . markdown-mode) (README\.md\' . gfm-mode) (\.html?\' . web-mode) (\.odc\' . archive-mode) (\.odf\' . archive-mode) (\.odi\' . archive-mode) (\.otp\' . archive-mode) (\.odp\' . archive-mode) (\.otg\' . archive-mode) (\.odg\' . archive-mode) (\.ots\' . archive-mode) (\.ods\' . archive-mode) (\.odm\' . archive-mode) (\.ott\' . archive-mode) (\.odt\' . archive-mode) (\.hva\' . latex-mode) (\.drv\' . latex-mode) (.*\.ipynb\' . ein:ipynb-mode) (/git-rebase-todo\' . git-rebase-mode) (\.gpg\(~\|\.~[0-9]+~\)?\' nil epa-file) (\.\(?:avs\|bmp[23]?\|c\(?:als?\|myka?\|u[rt]\)\|d\(?:c[mx]\|ds\|px\)\|f\(?:ax\|its\)\|gif\(?:87\)?\|hrz\|ic\(?:on\|[bo]\)\|j\(?:\(?:pe\|[np]\)g\)\|m\(?:iff\|ng\|s\(?:l\|vg\)\|tv\)\|otb\|p\(?:bm\|c\(?:ds\|[dltx]\)\|db\|gm\|i\(?:ct\|x\)\|jpeg\|n\(?:g\(?:24\|32\|8\)\|[gm]\)\|pm\|sd\|tif\|wp\)\|r\(?:as\|gb[ao]?\|l[ae]\)\|s\(?:c[rt]\|fw\|gi\|un\|vgz?\)\|t\(?:ga\|i\(?:ff\(?:64\)?\|le\|m\)\|tf\)\|uyvy\|v\(?:da\|i\(?:car\|d\|ff\)\|st\)\|w\(?:bmp\|pg\)\|x\(?:bm\|cf\|pm\|wd\|[cv]\)\|y\(?:cbcra?\|uv\)\)\' . image-mode) (\.elc\' . elisp-byte-code-mode) (\.zst\' nil jka-compr) (\.dz\' nil jka-compr) (\.xz\' nil jka-compr) (\.lzma\' nil jka-compr) (\.lz\' nil jka-compr) (\.g?z\' nil jka-compr) (\.bz2\' nil jka-compr) (\.Z\' nil jka-compr) (\.vr[hi]?\' . vera-mode) (\(?:\.\(?:rbw?\|ru\|rake\|thor\|jbuilder\|rabl\|gemspec\|podspec\)\|/\(?:Gem\|Rake\|Cap\|Thor\|Puppet\|Berks\|Vagrant\|Guard\|Pod\)file\)\' . ruby-mode) (\.re?st\' . rst-mode) (\.py[iw]?\' . python-mode) (\.less\' . less-css-mode) (\.scss\' . scss-mode) (\.awk\' . awk-mode) (\.\(u?lpc\|pike\|pmod\(\.in\)?\)\' . pike-mode) (\.idl\' . idl-mode) (\.java\' . java-mode) (\.m\' . objc-mode) (\.ii\' . c++-mode) (\.i\' . c-mode) (\.lex\' . c-mode) (\.y\(acc\)?\' . c-mode) (\.h\' . c-or-c++-mode) (\.c\' . c-mode) (\.\(CC?\|HH?\)\' . c++-mode) (\.[ch]\(pp\|xx\|\+\+\)\' . c++-mode) (\.\(cc\|hh\)\' . c++-mode) (\.\(bat\|cmd\)\' . bat-mode) (\.[sx]?html?\(\.[a-zA-Z_]+\)?\' . mhtml-mode) (\.svgz?\' . image-mode) (\.svgz?\' . xml-mode) (\.x[bp]m\' . image-mode) (\.x[bp]m\' . c-mode) (\.p[bpgn]m\' . image-mode) (\.tiff?\' . image-mode) (\.gif\' . image-mode) (\.png\' . image-mode) (\.jpe?g\' . image-mode) (\.te?xt\' . text-mode) (\.[tT]e[xX]\' . tex-mode) (\.ins\' . tex-mode) (\.ltx\' . latex-mode) (\.dtx\' . doctex-mode) (\.org\' . org-mode) (\.el\' . emacs-lisp-mode) (Project\.ede\' . emacs-lisp-mode) (\.\(scm\|stk\|ss\|sch\)\' . scheme-mode) (\.l\' . lisp-mode) (\.li?sp\' . lisp-mode) (\.[fF]\' . fortran-mode) (\.for\' . fortran-mode) (\.p\' . pascal-mode) (\.pas\' . pascal-mode) (\.\(dpr\|DPR\)\' . delphi-mode) (\.ad[abs]\' . ada-mode) (\.ad[bs].dg\' . ada-mode) (\.\([pP]\([Llm]\|erl\|od\)\|al\)\' . perl-mode) (Imakefile\' . makefile-imake-mode) (Makeppfile\(?:\.mk\)?\' . makefile-makepp-mode) (\.makepp\' . makefile-makepp-mode) (\.mk\' . makefile-gmake-mode) (\.make\' . makefile-gmake-mode) ([Mm]akefile\' . makefile-gmake-mode) (\.am\' . makefile-automake-mode) (\.texinfo\' . texinfo-mode) (\.te?xi\' . texinfo-mode) (\.[sS]\' . asm-mode) (\.asm\' . asm-mode) (\.css\' . css-mode) (\.mixal\' . mixal-mode) (\.gcov\' . compilation-mode) (/\.[a-z0-9-]*gdbinit . gdb-script-mode) (-gdb\.gdb . gdb-script-mode) ([cC]hange\.?[lL]og?\' . change-log-mode) ([cC]hange[lL]og[-.][0-9]+\' . change-log-mode) (\$CHANGE_LOG\$\.TXT . change-log-mode) (\.scm\.[0-9]*\' . scheme-mode) (\.[ckz]?sh\'\|\.shar\'\|/\.z?profile\' . sh-mode) (\.bash\' . sh-mode) (\(/\|\`\)\.\(bash_\(profile\|history\|log\(in\|out\)\)\|z?log\(in\|out\)\)\' . sh-mode) (\(/\|\`\)\.\(shrc\|zshrc\|m?kshrc\|bashrc\|t?cshrc\|esrc\)\' . sh-mode) (\(/\|\`\)\.\([kz]shenv\|xinitrc\|startxrc\|xsession\)\' . sh-mode) (\.m?spec\' . sh-mode) (\.m[mes]\' . nroff-mode) (\.man\' . nroff-mode) (\.sty\' . latex-mode) (\.cl[so]\' . latex-mode) (\.bbl\' . latex-mode) (\.bib\' . bibtex-mode) (\.bst\' . bibtex-style-mode) (\.sql\' . sql-mode) (\.m[4c]\' . m4-mode) (\.mf\' . metafont-mode) (\.mp\' . metapost-mode) (\.vhdl?\' . vhdl-mode) (\.article\' . text-mode) (\.letter\' . text-mode) (\.i?tcl\' . tcl-mode) (\.exp\' . tcl-mode) (\.itk\' . tcl-mode) (\.icn\' . icon-mode) (\.sim\' . simula-mode) (\.mss\' . scribe-mode) (\.f9[05]\' . f90-mode) (\.f0[38]\' . f90-mode) (\.indent\.pro\' . fundamental-mode) (\.\(pro\|PRO\)\' . idlwave-mode) (\.srt\' . srecode-template-mode) (\.prolog\' . prolog-mode) (\.tar\' . tar-mode) (\.\(arc\|zip\|lzh\|lha\|zoo\|[jew]ar\|xpi\|rar\|cbr\|7z\|ARC\|ZIP\|LZH\|LHA\|ZOO\|[JEW]AR\|XPI\|RAR\|CBR\|7Z\)\' . archive-mode) (\.oxt\' . archive-mode) (\.\(deb\|[oi]pk\)\' . archive-mode) (\`/tmp/Re . text-mode) (/Message[0-9]*\' . text-mode) (\`/tmp/fol/ . text-mode) (\.oak\' . scheme-mode) (\.sgml?\' . sgml-mode) (\.x[ms]l\' . xml-mode) (\.dbk\' . xml-mode) (\.dtd\' . sgml-mode) (\.ds\(ss\)?l\' . dsssl-mode) (\.jsm?\' . javascript-mode) (\.json\' . javascript-mode) (\.jsx\' . js-jsx-mode) (\.[ds]?vh?\' . verilog-mode) (\.by\' . bovine-grammar-mode) (\.wy\' . wisent-grammar-mode) ([:/\]\..*\(emacs\|gnus\|viper\)\' . emacs-lisp-mode) (\`\..*emacs\' . emacs-lisp-mode) ([:/]_emacs\' . emacs-lisp-mode) (/crontab\.X*[0-9]+\' . shell-script-mode) (\.ml\' . lisp-mode) (\.ld[si]?\' . ld-script-mode) (ld\.?script\' . ld-script-mode) (\.xs\' . c-mode) (\.x[abdsru]?[cnw]?\' . ld-script-mode) (\.zone\' . dns-mode) (\.soa\' . dns-mode) (\.asd\' . lisp-mode) (\.\(asn\|mib\|smi\)\' . snmp-mode) (\.\(as\|mi\|sm\)2\' . snmpv2-mode) (\.\(diffs?\|patch\|rej\)\' . diff-mode) (\.\(dif\|pat\)\' . diff-mode) (\.[eE]?[pP][sS]\' . ps-mode) (\.\(?:PDF\|DVI\|OD[FGPST]\|DOCX?\|XLSX?\|PPTX?\|pdf\|djvu\|dvi\|od[fgpst]\|docx?\|xlsx?\|pptx?\)\' . doc-view-mode-maybe) (configure\.\(ac\|in\)\' . autoconf-mode) (\.s\(v\|iv\|ieve\)\' . sieve-mode) (BROWSE\' . ebrowse-tree-mode) (\.ebrowse\' . ebrowse-tree-mode) (#\*mail\* . mail-mode) (\.g\' . antlr-mode) (\.mod\' . m2-mode) (\.ses\' . ses-mode) (\.docbook\' . sgml-mode) (\.com\' . dcl-mode) (/config\.\(?:bat\|log\)\' . fundamental-mode) (\.\(?:[iI][nN][iI]\|[lL][sS][tT]\|[rR][eE][gG]\|[sS][yY][sS]\)\' . conf-mode) (\.la\' . conf-unix-mode) (\.ppd\' . conf-ppd-mode) (java.+\.conf\' . conf-javaprop-mode) (\.properties\(?:\.[a-zA-Z0-9._-]+\)?\' . conf-javaprop-mode) (\.toml\' . conf-toml-mode) (\.desktop\' . conf-desktop-mode) (\`/etc/\(?:DIR_COLORS\|ethers\|.?fstab\|.*hosts\|lesskey\|login\.?de\(?:fs\|vperm\)\|magic\|mtab\|pam\.d/.*\|permissions\(?:\.d/.+\)?\|protocols\|rpc\|services\)\' . conf-space-mode) (\`/etc/\(?:acpid?/.+\|aliases\(?:\.d/.+\)?\|default/.+\|group-?\|hosts\..+\|inittab\|ksysguarddrc\|opera6rc\|passwd-?\|shadow-?\|sysconfig/.+\)\' . conf-mode) ([cC]hange[lL]og[-.][-0-9a-z]+\' . change-log-mode) (/\.?\(?:gitconfig\|gnokiirc\|hgrc\|kde.*rc\|mime\.types\|wgetrc\)\' . conf-mode) (/\.\(?:enigma\|gltron\|gtk\|hxplayer\|net\|neverball\|qt/.+\|realplayer\|scummvm\|sversion\|sylpheed/.+\|xmp\)rc\' . conf-mode) (/\.\(?:gdbtkinit\|grip\|orbital/.+txt\|rhosts\|tuxracer/options\)\' . conf-mode) (/\.?X\(?:default\|resource\|re\)s\> . conf-xdefaults-mode) (/X11.+app-defaults/\|\.ad\' . conf-xdefaults-mode) (/X11.+locale/.+/Compose\' . conf-colon-mode) (/X11.+locale/compose\.dir\' . conf-javaprop-mode) (\.~?[0-9]+\.[0-9][-.0-9]*~?\' nil t) (\.\(?:orig\|in\|[bB][aA][kK]\)\' nil t) ([/.]c\(?:on\)?f\(?:i?g\)?\(?:\.[a-zA-Z0-9._-]+\)?\' . conf-mode-maybe) (\.[1-9]\' . nroff-mode) (\.tgz\' . tar-mode) (\.tbz2?\' . tar-mode) (\.txz\' . tar-mode) (\.tzst\' . tar-mode)) 295 | 296 | ** Yang-mode 297 | #+BEGIN_SRC emacs-lisp 298 | (autoload 'yang-mode "yang-mode" "Major mode for editing YANG modules." t) 299 | (add-to-list 'auto-mode-alist '("\\.yang$" . yang-mode)) 300 | #+END_SRC 301 | 302 | #+RESULTS: 303 | : ((\.yang$ . yang-mode) (\.yang\' . yang-mode) (\.html?\' . web-mode) (\.markdown\' . markdown-mode) (\.md\' . markdown-mode) (README\.md\' . gfm-mode) (\.odc\' . archive-mode) (\.odf\' . archive-mode) (\.odi\' . archive-mode) (\.otp\' . archive-mode) (\.odp\' . archive-mode) (\.otg\' . archive-mode) (\.odg\' . archive-mode) (\.ots\' . archive-mode) (\.ods\' . archive-mode) (\.odm\' . archive-mode) (\.ott\' . archive-mode) (\.odt\' . archive-mode) (\.hva\' . latex-mode) (\.drv\' . latex-mode) (.*\.ipynb\' . ein:ipynb-mode) (/git-rebase-todo\' . git-rebase-mode) (\.gpg\(~\|\.~[0-9]+~\)?\' nil epa-file) (\.\(?:avs\|bmp[23]?\|c\(?:als?\|myka?\|u[rt]\)\|d\(?:c[mx]\|ds\|px\)\|f\(?:ax\|its\)\|gif\(?:87\)?\|hrz\|ic\(?:on\|[bo]\)\|j\(?:\(?:pe\|[np]\)g\)\|m\(?:iff\|ng\|s\(?:l\|vg\)\|tv\)\|otb\|p\(?:bm\|c\(?:ds\|[dltx]\)\|db\|gm\|i\(?:ct\|x\)\|jpeg\|n\(?:g\(?:24\|32\|8\)\|[gm]\)\|pm\|sd\|tif\|wp\)\|r\(?:as\|gb[ao]?\|l[ae]\)\|s\(?:c[rt]\|fw\|gi\|un\|vgz?\)\|t\(?:ga\|i\(?:ff\(?:64\)?\|le\|m\)\|tf\)\|uyvy\|v\(?:da\|i\(?:car\|d\|ff\)\|st\)\|w\(?:bmp\|pg\)\|x\(?:bm\|cf\|pm\|wd\|[cv]\)\|y\(?:cbcra?\|uv\)\)\' . image-mode) (\.elc\' . elisp-byte-code-mode) (\.zst\' nil jka-compr) (\.dz\' nil jka-compr) (\.xz\' nil jka-compr) (\.lzma\' nil jka-compr) (\.lz\' nil jka-compr) (\.g?z\' nil jka-compr) (\.bz2\' nil jka-compr) (\.Z\' nil jka-compr) (\.vr[hi]?\' . vera-mode) (\(?:\.\(?:rbw?\|ru\|rake\|thor\|jbuilder\|rabl\|gemspec\|podspec\)\|/\(?:Gem\|Rake\|Cap\|Thor\|Puppet\|Berks\|Vagrant\|Guard\|Pod\)file\)\' . ruby-mode) (\.re?st\' . rst-mode) (\.py[iw]?\' . python-mode) (\.less\' . less-css-mode) (\.scss\' . scss-mode) (\.awk\' . awk-mode) (\.\(u?lpc\|pike\|pmod\(\.in\)?\)\' . pike-mode) (\.idl\' . idl-mode) (\.java\' . java-mode) (\.m\' . objc-mode) (\.ii\' . c++-mode) (\.i\' . c-mode) (\.lex\' . c-mode) (\.y\(acc\)?\' . c-mode) (\.h\' . c-or-c++-mode) (\.c\' . c-mode) (\.\(CC?\|HH?\)\' . c++-mode) (\.[ch]\(pp\|xx\|\+\+\)\' . c++-mode) (\.\(cc\|hh\)\' . c++-mode) (\.\(bat\|cmd\)\' . bat-mode) (\.[sx]?html?\(\.[a-zA-Z_]+\)?\' . mhtml-mode) (\.svgz?\' . image-mode) (\.svgz?\' . xml-mode) (\.x[bp]m\' . image-mode) (\.x[bp]m\' . c-mode) (\.p[bpgn]m\' . image-mode) (\.tiff?\' . image-mode) (\.gif\' . image-mode) (\.png\' . image-mode) (\.jpe?g\' . image-mode) (\.te?xt\' . text-mode) (\.[tT]e[xX]\' . tex-mode) (\.ins\' . tex-mode) (\.ltx\' . latex-mode) (\.dtx\' . doctex-mode) (\.org\' . org-mode) (\.el\' . emacs-lisp-mode) (Project\.ede\' . emacs-lisp-mode) (\.\(scm\|stk\|ss\|sch\)\' . scheme-mode) (\.l\' . lisp-mode) (\.li?sp\' . lisp-mode) (\.[fF]\' . fortran-mode) (\.for\' . fortran-mode) (\.p\' . pascal-mode) (\.pas\' . pascal-mode) (\.\(dpr\|DPR\)\' . delphi-mode) (\.ad[abs]\' . ada-mode) (\.ad[bs].dg\' . ada-mode) (\.\([pP]\([Llm]\|erl\|od\)\|al\)\' . perl-mode) (Imakefile\' . makefile-imake-mode) (Makeppfile\(?:\.mk\)?\' . makefile-makepp-mode) (\.makepp\' . makefile-makepp-mode) (\.mk\' . makefile-gmake-mode) (\.make\' . makefile-gmake-mode) ([Mm]akefile\' . makefile-gmake-mode) (\.am\' . makefile-automake-mode) (\.texinfo\' . texinfo-mode) (\.te?xi\' . texinfo-mode) (\.[sS]\' . asm-mode) (\.asm\' . asm-mode) (\.css\' . css-mode) (\.mixal\' . mixal-mode) (\.gcov\' . compilation-mode) (/\.[a-z0-9-]*gdbinit . gdb-script-mode) (-gdb\.gdb . gdb-script-mode) ([cC]hange\.?[lL]og?\' . change-log-mode) ([cC]hange[lL]og[-.][0-9]+\' . change-log-mode) (\$CHANGE_LOG\$\.TXT . change-log-mode) (\.scm\.[0-9]*\' . scheme-mode) (\.[ckz]?sh\'\|\.shar\'\|/\.z?profile\' . sh-mode) (\.bash\' . sh-mode) (\(/\|\`\)\.\(bash_\(profile\|history\|log\(in\|out\)\)\|z?log\(in\|out\)\)\' . sh-mode) (\(/\|\`\)\.\(shrc\|zshrc\|m?kshrc\|bashrc\|t?cshrc\|esrc\)\' . sh-mode) (\(/\|\`\)\.\([kz]shenv\|xinitrc\|startxrc\|xsession\)\' . sh-mode) (\.m?spec\' . sh-mode) (\.m[mes]\' . nroff-mode) (\.man\' . nroff-mode) (\.sty\' . latex-mode) (\.cl[so]\' . latex-mode) (\.bbl\' . latex-mode) (\.bib\' . bibtex-mode) (\.bst\' . bibtex-style-mode) (\.sql\' . sql-mode) (\.m[4c]\' . m4-mode) (\.mf\' . metafont-mode) (\.mp\' . metapost-mode) (\.vhdl?\' . vhdl-mode) (\.article\' . text-mode) (\.letter\' . text-mode) (\.i?tcl\' . tcl-mode) (\.exp\' . tcl-mode) (\.itk\' . tcl-mode) (\.icn\' . icon-mode) (\.sim\' . simula-mode) (\.mss\' . scribe-mode) (\.f9[05]\' . f90-mode) (\.f0[38]\' . f90-mode) (\.indent\.pro\' . fundamental-mode) (\.\(pro\|PRO\)\' . idlwave-mode) (\.srt\' . srecode-template-mode) (\.prolog\' . prolog-mode) (\.tar\' . tar-mode) (\.\(arc\|zip\|lzh\|lha\|zoo\|[jew]ar\|xpi\|rar\|cbr\|7z\|ARC\|ZIP\|LZH\|LHA\|ZOO\|[JEW]AR\|XPI\|RAR\|CBR\|7Z\)\' . archive-mode) (\.oxt\' . archive-mode) (\.\(deb\|[oi]pk\)\' . archive-mode) (\`/tmp/Re . text-mode) (/Message[0-9]*\' . text-mode) (\`/tmp/fol/ . text-mode) (\.oak\' . scheme-mode) (\.sgml?\' . sgml-mode) (\.x[ms]l\' . xml-mode) (\.dbk\' . xml-mode) (\.dtd\' . sgml-mode) (\.ds\(ss\)?l\' . dsssl-mode) (\.jsm?\' . javascript-mode) (\.json\' . javascript-mode) (\.jsx\' . js-jsx-mode) (\.[ds]?vh?\' . verilog-mode) (\.by\' . bovine-grammar-mode) (\.wy\' . wisent-grammar-mode) ([:/\]\..*\(emacs\|gnus\|viper\)\' . emacs-lisp-mode) (\`\..*emacs\' . emacs-lisp-mode) ([:/]_emacs\' . emacs-lisp-mode) (/crontab\.X*[0-9]+\' . shell-script-mode) (\.ml\' . lisp-mode) (\.ld[si]?\' . ld-script-mode) (ld\.?script\' . ld-script-mode) (\.xs\' . c-mode) (\.x[abdsru]?[cnw]?\' . ld-script-mode) (\.zone\' . dns-mode) (\.soa\' . dns-mode) (\.asd\' . lisp-mode) (\.\(asn\|mib\|smi\)\' . snmp-mode) (\.\(as\|mi\|sm\)2\' . snmpv2-mode) (\.\(diffs?\|patch\|rej\)\' . diff-mode) (\.\(dif\|pat\)\' . diff-mode) (\.[eE]?[pP][sS]\' . ps-mode) (\.\(?:PDF\|DVI\|OD[FGPST]\|DOCX?\|XLSX?\|PPTX?\|pdf\|djvu\|dvi\|od[fgpst]\|docx?\|xlsx?\|pptx?\)\' . doc-view-mode-maybe) (configure\.\(ac\|in\)\' . autoconf-mode) (\.s\(v\|iv\|ieve\)\' . sieve-mode) (BROWSE\' . ebrowse-tree-mode) (\.ebrowse\' . ebrowse-tree-mode) (#\*mail\* . mail-mode) (\.g\' . antlr-mode) (\.mod\' . m2-mode) (\.ses\' . ses-mode) (\.docbook\' . sgml-mode) (\.com\' . dcl-mode) (/config\.\(?:bat\|log\)\' . fundamental-mode) (\.\(?:[iI][nN][iI]\|[lL][sS][tT]\|[rR][eE][gG]\|[sS][yY][sS]\)\' . conf-mode) (\.la\' . conf-unix-mode) (\.ppd\' . conf-ppd-mode) (java.+\.conf\' . conf-javaprop-mode) (\.properties\(?:\.[a-zA-Z0-9._-]+\)?\' . conf-javaprop-mode) (\.toml\' . conf-toml-mode) (\.desktop\' . conf-desktop-mode) (\`/etc/\(?:DIR_COLORS\|ethers\|.?fstab\|.*hosts\|lesskey\|login\.?de\(?:fs\|vperm\)\|magic\|mtab\|pam\.d/.*\|permissions\(?:\.d/.+\)?\|protocols\|rpc\|services\)\' . conf-space-mode) (\`/etc/\(?:acpid?/.+\|aliases\(?:\.d/.+\)?\|default/.+\|group-?\|hosts\..+\|inittab\|ksysguarddrc\|opera6rc\|passwd-?\|shadow-?\|sysconfig/.+\)\' . conf-mode) ([cC]hange[lL]og[-.][-0-9a-z]+\' . change-log-mode) (/\.?\(?:gitconfig\|gnokiirc\|hgrc\|kde.*rc\|mime\.types\|wgetrc\)\' . conf-mode) (/\.\(?:enigma\|gltron\|gtk\|hxplayer\|net\|neverball\|qt/.+\|realplayer\|scummvm\|sversion\|sylpheed/.+\|xmp\)rc\' . conf-mode) (/\.\(?:gdbtkinit\|grip\|orbital/.+txt\|rhosts\|tuxracer/options\)\' . conf-mode) (/\.?X\(?:default\|resource\|re\)s\> . conf-xdefaults-mode) (/X11.+app-defaults/\|\.ad\' . conf-xdefaults-mode) (/X11.+locale/.+/Compose\' . conf-colon-mode) (/X11.+locale/compose\.dir\' . conf-javaprop-mode) (\.~?[0-9]+\.[0-9][-.0-9]*~?\' nil t) (\.\(?:orig\|in\|[bB][aA][kK]\)\' nil t) ([/.]c\(?:on\)?f\(?:i?g\)?\(?:\.[a-zA-Z0-9._-]+\)?\' . conf-mode-maybe) (\.[1-9]\' . nroff-mode) (\.tgz\' . tar-mode) (\.tbz2?\' . tar-mode) (\.txz\' . tar-mode) (\.tzst\' . tar-mode)) 304 | 305 | ** Restclient 306 | #+BEGIN_SRC emacs-lisp 307 | (use-package restclient 308 | :ensure t) 309 | #+END_SRC 310 | 311 | ** Chess-mode for fun 312 | 313 | #+BEGIN_SRC emacs-lisp 314 | ;; This also requires an external chess engine such as gnuchess or crafty 315 | (use-package chess 316 | :ensure t) 317 | #+END_SRC 318 | 319 | #+RESULTS: 320 | 321 | * Org Mode Stuff 322 | ** Aesthetics, customizations 323 | #+BEGIN_SRC emacs-lisp 324 | (use-package org-superstar ;; Improved version of org-bullets 325 | :ensure t 326 | :config 327 | (add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))) 328 | 329 | (setq org-startup-indented t) ;; Indent according to section 330 | (setq org-startup-with-inline-images t) ;; Display images in-buffer by default 331 | #+END_SRC 332 | 333 | 334 | ** Evil-org for evil-mode integration 335 | This is very fancy, it treats org-mode elements (i.e. sections, source blocks, tables) 336 | as regular text objects ( 'ae' object ). Additionally, it allows reordering stuff using 337 | M-j, M-k, M-l and M-h instead of the regular M-. 338 | Operators that deal with indentation ( < and > ) also indent headers. 339 | #+BEGIN_SRC emacs-lisp 340 | (use-package evil-org 341 | :ensure t 342 | :after (evil org) 343 | :config 344 | (add-hook 'org-mode-hook 'evil-org-mode) 345 | (add-hook 'evil-org-mode-hook 346 | (lambda () 347 | (evil-org-set-key-theme '(navigation insert textobjects additional calendar)))) 348 | (require 'evil-org-agenda) 349 | (evil-org-agenda-set-keys)) 350 | #+END_SRC 351 | 352 | #+RESULTS: 353 | : t 354 | 355 | ** Org-agenda 356 | #+BEGIN_SRC emacs-lisp 357 | (setq org-agenda-custom-commands 358 | '(("h" "Daily habits" 359 | ((agenda "")) 360 | ((org-agenda-show-log t) 361 | (org-agenda-ndays 7) 362 | (org-agenda-log-mode-items '(state)) 363 | (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp ":DAILY:")))))) 364 | #+END_SRC 365 | 366 | #+RESULTS: 367 | | h | Daily habits | ((agenda )) | ((org-agenda-show-log t) (org-agenda-ndays 7) (org-agenda-log-mode-items (quote (state))) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote notregexp) :DAILY:)))) | 368 | 369 | ** Org-babel 370 | #+BEGIN_SRC emacs-lisp 371 | (org-babel-do-load-languages 372 | 'org-babel-load-languages 373 | '((python . t))) 374 | #+END_SRC 375 | 376 | #+RESULTS: 377 | 378 | * Elisp Stuff 379 | ** ParEdit mode 380 | This minor mode for Elisp balances quotes and parenthesis automatically 381 | #+BEGIN_SRC emacs-lisp 382 | (use-package paredit 383 | :ensure t) 384 | (autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t) 385 | (add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) 386 | (add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode) 387 | (add-hook 'ielm-mode-hook #'enable-paredit-mode) 388 | (add-hook 'lisp-mode-hook #'enable-paredit-mode) 389 | (add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode) 390 | (add-hook 'scheme-mode-hook #'enable-paredit-mode) 391 | #+END_SRC 392 | 393 | * LaTeX Stuff 394 | #+BEGIN_SRC emacs-lisp 395 | ; Auctex stuff 396 | (setq TeX-auto-save t) 397 | (setq TeX-parse-self t) 398 | (setq-default TeX-master nil) 399 | (add-to-list 'org-latex-packages-alist '("" "listings" nil)) 400 | (setq org-latex-listings t) 401 | (setq org-latex-listings-options '(("breaklines" "true"))) 402 | 403 | (use-package auctex 404 | :ensure t) 405 | 406 | (add-hook 'LaTeX-mode-hook 'visual-line-mode) 407 | (add-hook 'LaTeX-mode-hook 'flyspell-mode) 408 | (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) 409 | 410 | (add-hook 'LaTeX-mode-hook 'turn-on-reftex) 411 | (setq reftex-plug-into-AUCTeX t) 412 | 413 | #+END_SRC 414 | 415 | #+RESULTS: 416 | 417 | * Skeletons 418 | ** Latex 419 | #+BEGIN_SRC emacs-lisp 420 | (define-skeleton latex-skeleton 421 | "Skeleton for article type latex documents" 422 | "Preamble:" 423 | "\\documentclass{article}\n" 424 | "\\usepackage[utf8]{inputenc}\n" 425 | "\\usepackage[margin=1 in]{geometry}\n" 426 | "\\usepackage{graphicx}\n" 427 | "\\setlength{\\parindent}{4em}\n" 428 | "\\setlength{\\parskip}{1em}\n" 429 | "\\renewcommand{\\baselinestretch}{1.5}\n\n" 430 | "\\author{Matheus Augusto da Silva}\n" 431 | "\\title{"_"}\n" 432 | "\\date{\\today}\n\n" 433 | "\\begin{document}\n" 434 | "\\maketitle\n\n" 435 | "\\end{document}\n") 436 | #+END_SRC 437 | 438 | ** Org mode 439 | #+BEGIN_SRC emacs-lisp 440 | (define-skeleton org-latex-summary 441 | "Skeleton for summaries " 442 | "Preamble:" 443 | "#+LATEX_CLASS: article\n" 444 | "#+LATEX_CLASS_OPTIONS: [a5paper,landscape,fourcolumn]\n" 445 | "#+LATEX_COMPILER: lualatex\n" 446 | "#+LATEX_HEADER: \\input{/home/trajanus/Documents/LaTeX/summaryheader.tex}\n" 447 | "#+STARTUP: showeverything\n" 448 | "#+OPTIONS: toc:nil\n" 449 | "\\begin{multicols*}{4}\n" 450 | "* "_"\n" 451 | "\\end{multicols*}\n") 452 | #+END_SRC 453 | 454 | #+BEGIN_SRC emacs-lisp 455 | (define-skeleton org-latex-article 456 | "Skeleton for articles " 457 | "Preamble:" 458 | "#+STARTUP: showeverything\n" 459 | "#+TITLE: TITLE\n" 460 | "#+AUTHOR: Matheus Augusto da Silva\n" 461 | "#+DATE: \\today\n" 462 | "#+LATEX_CLASS: article\n" 463 | "#+LATEX_CLASS_OPTIONS: [a4paper]\n" 464 | "#+LATEX_HEADER: \\input{/home/trajanus/Documents/LaTeX/articleheader.tex}\n" 465 | "#+STARTUP: showeverything\n" 466 | "#+OPTIONS: toc:nil\n") 467 | #+END_SRC 468 | 469 | #+BEGIN_SRC emacs-lisp 470 | (define-skeleton org-wiki-entry 471 | "Skeleton for articles " 472 | "Preamble:" 473 | "#+STARTUP: showeverything\n" 474 | "#+TITLE: "_"\n" 475 | "#+AUTHOR: Matheus Augusto da Silva\n" 476 | "#+STARTUP: showeverything\n" 477 | "\n" 478 | "* Index") 479 | #+END_SRC 480 | 481 | #+BEGIN_SRC emacs-lisp 482 | (define-skeleton org-wiki-index 483 | "Skeleton for articles " 484 | "Preamble:" 485 | "#+STARTUP: showeverything\n" 486 | "#+TITLE: "_"\n" 487 | "#+AUTHOR: Matheus Augusto da Silva\n" 488 | "#+STARTUP: showeverything\n" 489 | "\n" 490 | "* Index\n" 491 | "\n" 492 | "** Summaries\n" 493 | "[[./summaries/summaries.org][Summaries]]" 494 | ) 495 | #+END_SRC 496 | 497 | * Language Related 498 | #+BEGIN_SRC emacs-lisp 499 | ;; This requires SDCV 500 | ;; This little function looks in a stardict file for words that look like 501 | ;; the word under the cursor. I use it when correcting my spelling in french 502 | (defun dict-search () 503 | (interactive) 504 | (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt) 505 | (shell-command (format "export STARDICT_DATA_DIR=/home/trajanus/Documents/Stardict ;sdcv %s | head -5" (thing-at-point 'word)))) 506 | 507 | (define-key evil-normal-state-map (kbd "ç") 'ispell-word) 508 | (define-key evil-normal-state-map (kbd "Ç") 'dict-search) 509 | 510 | #+END_SRC 511 | 512 | #+RESULTS: 513 | : dict-search 514 | 515 | -------------------------------------------------------------------------------- /sv/emacs/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec chpst -u trajanus svlogd -tt /opt/logs/emacs 3 | -------------------------------------------------------------------------------- /sv/emacs/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec chpst -u trajanus emacs -u trajanus --fg-daemon 2>&1 3 | --------------------------------------------------------------------------------