Add new snippets
This commit is contained in:
parent
12a048253f
commit
80fa5b8e78
|
|
@ -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"))
|
||||
#+end_src
|
||||
Disable LateX preview in Org-mode by default
|
||||
Disable LaTeX preview in Org-mode by default
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(setq org-startup-with-latex-preview nil)
|
||||
#+end_src
|
||||
|
|
@ -121,6 +121,7 @@ Disable LateX preview in Org-mode by default
|
|||
(setq org-highlight-latex-and-related '(native))
|
||||
#+end_src
|
||||
|
||||
|
||||
*** Add a hook so that the org file is tangled before the build
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'org-export-before-processing-hook #'org-babel-tangle)
|
||||
|
|
|
|||
4
init.el
4
init.el
|
|
@ -82,7 +82,7 @@
|
|||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
(spell +flyspell) ; tasing you for misspelling mispelling
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
ansible
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
(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
|
||||
plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
|
@ -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}
|
||||
Loading…
Reference in New Issue