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"
|
||||||
"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)
|
||||||
|
|
|
||||||
4
init.el
4
init.el
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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