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