diff --git a/files/nvim/.config/nvim/snippets/snippets/latex.json b/files/nvim/.config/nvim/snippets/snippets/latex.json index d3ba20c..db8be1c 100644 --- a/files/nvim/.config/nvim/snippets/snippets/latex.json +++ b/files/nvim/.config/nvim/snippets/snippets/latex.json @@ -71,8 +71,9 @@ "\\newtheorem{theorem}{Satz}[section]", "\\newtheorem*{remark}{Bemerkung}", "", - "%%% acronyms - use with \\ac{} - don't print a list of acronyms", - "\\usepackage[nolist]{acronym}", + "%%% glossary, use with \\gls{}", + "% make sure to run `makeglossaries FILE` to generate the glossary entries", + "\\usepackage{glossaries}", "", "%%% bibtex - cite with \\autocite{}, will show in footnote", "\\usepackage{csquotes}", @@ -84,20 +85,21 @@ "\\date{\\today}", "", "\\bibliography{bibliography}", + "\\makeglossaries", "", "\\begin{document}", "", + "% use with \\gls{nvim}", + "% \\newglossaryentry{nvim}{name=Neovim, description={Bester Editor der Welt}}", + "", "% create title page with toc", "\\maketitle", "\\newpage", "\\tableofcontents", + "% \\newpage", + "% \\printglossaries", "\\newpage", "", - "% use with \\ac{}", - "\\begin{acronym}[Acronyms]", - " \\acro{latex}[LaTeX]{Bestes Doku Tool der Welt}", - "\\end{acronym}", - "", "% begin here; don't forget to relaunch nvim :>", "\\section{}", "", diff --git a/files/vim/.vimrc b/files/vim/.vimrc index f47027a..5043598 100644 --- a/files/vim/.vimrc +++ b/files/vim/.vimrc @@ -117,3 +117,10 @@ map :noh map gs :Git status map gb :Git blame map :Git grep + +fun! TrimWhitespace() + let l:save = winsaveview() + keeppatterns %s/\s\+$//e + call winrestview(l:save) +endfun +noremap ws :call TrimWhitespace()