Add new snippets

This commit is contained in:
Samuel Ortion 2025-06-28 19:31:23 +02:00
parent 12a048253f
commit 80fa5b8e78
Signed by: sortion
GPG Key ID: 9B02406F8C4FB765
4 changed files with 38 additions and 3 deletions

View File

@ -112,7 +112,7 @@ Use minted for code listings:
'("lualatex -shell-escape -interaction nonstopmode -output-directory %o %f" '("lualatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"lualatex -shell-escape -interaction nonstopmode -output-directory %o %f")) "lualatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
#+end_src #+end_src
Disable LateX preview in Org-mode by default Disable LaTeX preview in Org-mode by default
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
(setq org-startup-with-latex-preview nil) (setq org-startup-with-latex-preview nil)
#+end_src #+end_src
@ -121,6 +121,7 @@ Disable LateX preview in Org-mode by default
(setq org-highlight-latex-and-related '(native)) (setq org-highlight-latex-and-related '(native))
#+end_src #+end_src
*** Add a hook so that the org file is tangled before the build *** Add a hook so that the org file is tangled before the build
#+begin_src emacs-lisp #+begin_src emacs-lisp
(add-hook 'org-export-before-processing-hook #'org-babel-tangle) (add-hook 'org-export-before-processing-hook #'org-babel-tangle)

View File

@ -82,7 +82,7 @@
:checkers :checkers
syntax ; tasing you for every semicolon you forget syntax ; tasing you for every semicolon you forget
(spell +flyspell) ; tasing you for misspelling mispelling (spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make grammar ; tasing grammar mistake every you make
:tools :tools
ansible ansible
@ -154,7 +154,7 @@
;;nim ; python + lisp at the speed of c ;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!" ;;nix ; I hereby declare "nix geht mehr!"
(ocaml +lsp) ; an objective camel (ocaml +lsp) ; an objective camel
(org +hugo +pandoc +brain) ; organize your plain life in plain text (org +hugo +pandoc +brain +roam) ; organize your plain life in plain text
php ; perl's insecure younger brother php ; perl's insecure younger brother
plantuml ; diagrams for confusing people more plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional ;;purescript ; javascript, but functional

View File

@ -0,0 +1,17 @@
# -*- mode: snippet -*-
# name: exception
# key: exception
# condition: t
# --
class $0Exception : public std::exception {
private:
std::string m_message;
public:
$0Exception(const char* message) :
m_message(message) {}
const char* what() const noexcept {
return m_message.c_str();
}
};

17
snippets/latex-mode/table Normal file
View File

@ -0,0 +1,17 @@
# -*- mode: snippet -*-
# name: table
# key: table
# condition: t
# --
\begin{table}[H]
\centering
\caption{$2}
\begin{tabular}{lr}
\toprule
\midrule
\bottomrule
\end{tabular}
\label{tab:$3}
\end{table}