From 6ee435a6627c582657a24aae1613f05b8fd3cda2 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Fri, 19 May 2017 20:42:54 +0200 Subject: [PATCH] =?UTF-8?q?Mehr=20foo=20f=C3=BCr=20emacs.=20latex-mode=20w?= =?UTF-8?q?ill=20noch=20nicht=20so=20ganz.....?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emacs/.emacs | 19 +++++++++++++++++++ .../snippets/latex-mode/description-env | 11 +++++++++++ emacs/.emacs.d/snippets/latex-mode/emph | 5 +++++ emacs/.emacs.d/snippets/latex-mode/item-desc | 6 ++++++ 4 files changed, 41 insertions(+) create mode 100644 emacs/.emacs.d/snippets/latex-mode/description-env create mode 100644 emacs/.emacs.d/snippets/latex-mode/emph create mode 100644 emacs/.emacs.d/snippets/latex-mode/item-desc diff --git a/emacs/.emacs b/emacs/.emacs index 75a7f83..41299ce 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -58,6 +58,9 @@ (ensure-package-installed 'use-package) +;; *.tex files are Latex-Files +(add-to-list 'auto-mode-alist '("\\.py\\'" . LaTeX-mode)) + ;; theme (use-package heroku-theme :ensure t) @@ -92,10 +95,26 @@ (setq ivy-count-format "(%d/%d) ") (define-key ivy-minibuffer-map (kbd "") 'ivy-immediate-done))) +;; Neotree +(use-package neotree + :ensure t + :demand t + :bind ("C-x n" . neotree-show) + :config + (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter) + (evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-enter) + (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter) + (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide) + (add-hook 'neo-enter-hook + (lambda (type path arg) (if (equal type 'file) + (neotree-hide))))) + + ;; Cursor centered (use-package centered-cursor-mode :ensure t :demand t + :disabled :config (global-centered-cursor-mode)) ;; Yasnippet diff --git a/emacs/.emacs.d/snippets/latex-mode/description-env b/emacs/.emacs.d/snippets/latex-mode/description-env new file mode 100644 index 0000000..e42b9ed --- /dev/null +++ b/emacs/.emacs.d/snippets/latex-mode/description-env @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: description-env +# key: desc +# -- +\begin{description} + +\item[$1] $2 + +$0 + +\end{description} \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/latex-mode/emph b/emacs/.emacs.d/snippets/latex-mode/emph new file mode 100644 index 0000000..6f6762f --- /dev/null +++ b/emacs/.emacs.d/snippets/latex-mode/emph @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: emph +# key: emph +# -- +\emph{$1} $0 \ No newline at end of file diff --git a/emacs/.emacs.d/snippets/latex-mode/item-desc b/emacs/.emacs.d/snippets/latex-mode/item-desc new file mode 100644 index 0000000..43555c4 --- /dev/null +++ b/emacs/.emacs.d/snippets/latex-mode/item-desc @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: item-desc +# key: itd +# -- +\item[$1] $2 +$0 \ No newline at end of file