commit ceff231ebc009784e700fd9c4f914d424d164b25 Author: Marc Pohling Date: Tue Oct 24 20:38:51 2017 +0200 Erster Test-Commit diff --git a/elisp/base-backup.el b/elisp/base-backup.el new file mode 100644 index 0000000..a70f6e0 --- /dev/null +++ b/elisp/base-backup.el @@ -0,0 +1,34 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Backup Settings +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(setq version-control t ;; Versionsnummern für backups + kept-new-versions 10 ;; Anzahl der Versionen, die zu behalten sind + kept-old-versions 0 ;; Anzahl der ältesten Versionen, die zu behalten sind + delete-old-versions t ;; Nicht nachfragen, ob alte Versionen gelöscht werden sollen + backup-by-copying t ;; Kopiere die Dateien, benenn sie nicht um + vc-make-backup-files t) ;; Mach backups von versionskontrollierten Dateien + +(defvar PATH_BACKUP_BASE (expand-file-name "~/.emacs.d/backup/")) + +;; N.B. backtrick and comma allow evaluation of expression when forming list +(setq backup-directory-alist + `(("" . ,(expand-file-name "per-save" PATH_BACKUP_BASE)))) + +;; Erstell Backup bei jedem Speichern +;; Dateien werden in den Unterordnern "per-session" einmalig je Emacs-Session und +;; in "per-save" bei jedem Speichern gebackupt +(defun backup-every-save () + (when (not buffer-backed-up) ;; erstell ein per-session-backup beim ersten Speichern + (let ((backup-directory-alist ;; überschreib die default Parameter für per-sesssion-Backups + `(("." . ,(expand-file-name "per-session" PATH_BACKUP_BASE)))) + (kept-new-versions 3)))) + + (let ((buffer-backed-up nil))) ;; Erstell per-save-Backup bei jedem Speichern. + ;; Erstes Speichern ergibt ebenfalls ein per-session-Backup +) + +(add-hook 'before-save-hook 'backup-every-save) ;;save hook hinzufügen + + +(provide 'base-backup) diff --git a/elisp/base-functions.el b/elisp/base-functions.el new file mode 100644 index 0000000..12efb3a --- /dev/null +++ b/elisp/base-functions.el @@ -0,0 +1,6 @@ +;; Eigene Funktionen hier einfügen + +;;(defun something +;; (do-somehing)) + +(provide 'base-functions) diff --git a/elisp/base-global-keys.el b/elisp/base-global-keys.el new file mode 100644 index 0000000..a8a4270 --- /dev/null +++ b/elisp/base-global-keys.el @@ -0,0 +1,5 @@ +;; Hier eigene keys hinzufügen im Format + +;(global-key-set (kbd "[SHORTCUT]") '[FUNCTION]) + +(provide 'base-global-keys) diff --git a/elisp/base-theme.el b/elisp/base-theme.el new file mode 100644 index 0000000..452bd53 --- /dev/null +++ b/elisp/base-theme.el @@ -0,0 +1,7 @@ +(use-package material-theme + :defer t + :ensure t + :init + (load-theme 'material t)) + +(provide 'base-theme) diff --git a/elisp/base.el b/elisp/base.el new file mode 100644 index 0000000..98a4af0 --- /dev/null +++ b/elisp/base.el @@ -0,0 +1,66 @@ +(setq debug-on-error t) ;; Debug-Meldung, wenn Fehler bei init.el + +(require 'package) + +(defvar gnu '("gnu" . "https://elpa.gnu.org/packages/")) +(defvar melpa '("melpa" . "https://melpa.org/packages/")) +(defvar melpa-stable '("melpa-stable" . "https://stable.melpa.org/packages/")) +(defvar org '("org" . "http://orgmode.org/elpa/")) +;;(defvar elpy '("elpy" . "http://jorgenschaefer.github.io/packages/")) + +(setq package-archive nil) +(add-to-list 'package-archives melpa-stable t) +(add-to-list 'package-archives melpa t) +(add-to-list 'package-archives gnu t) +(add-to-list 'package-archives org t) + +(package-initialize) ;; Archiv initialisieren und Inhalt + ;; aktualisieren, wenn kein Cache vorhanden +(unless (and (file-exists-p "~/.emacs.d/elpa/archives/melpa-stable") + (file-exists-p "~/.emacs.d/elpa/archives/melpa") + (file-exists-p "~/.emacs.d/elpa/archives/gnu") + (file-exists-p "~/.emacs.d/elpa/archives/org")) + (package-refresh-contents)) + +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) + +(add-to-list 'custom-theme-load-path "~/.emacs.d/themes") ;; Speicherpfad für Themes + +(defvar PATH_START "~/Archiv/Dokumente/") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Optik +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(setq inhibit-startup-message t) ;; keine Startnachricht +(setq inhibit-splash-screen t) ;; kein Splashscreen +(setq initial-scratch-message nil) ;; keine Scratchmessage +(setq initial-buffer-choice PATH_START) ;; Dateibrowser öffnen +(add-to-list 'default-frame-alist '(fullscreen . maximized)) ;; Vollbild beim Start + +(show-paren-mode 1) ;; zeigt zusammenhängende Klammern +(setq show-paren-delay 0) ;; zeigt die Klammern umgehend + +(global-hl-line-mode 1) ;; Aktuelle Zeile hervorheben +(make-variable-buffer-local 'global-hl-line-mode) ;; deaktiviere Hervorhebung bei Bedarf +(global-linum-mode t) ;; Generell Zeilennummern anzeigen +(set-face-attribute 'default nil :font "Hack-12") + +(setq scroll-step 1 + scroll-conservatively 10000) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; which-key +;; https://github.com/justbur/emacs-which-key +;; Info in Emacs: M-x customize-group which-key + +;;(setq which-key-mode) ;; aktiviert which-key +;;(which-key-setup-side-window-right-bottom) ;; zeigt hotkeys rechts an, wenn Platz, sonst unten +;;(which-key-setup-minibuffer) ;; take over the minibuffer +;;(setq which-key-idle-delay 0.5) ;; hotkeys werden nach 0.5s angezeigt + + +(provide 'base) diff --git a/elisp/lang-python.el b/elisp/lang-python.el new file mode 100644 index 0000000..b329e98 --- /dev/null +++ b/elisp/lang-python.el @@ -0,0 +1,65 @@ +(use-package python + :mode ("\\.py\\'" . python-mode)) +;; ############## +;; damit der EPC-Server funktioniert, +;; muss in /etc/hosts der Eintrag +;; 127.0.0.1 localhost +;; enthalten sein! +;; ############## + +;; virtualenv für python muss installiert sein +;; Benutzung +;; venv-workon: virtualenv aussuchen und setzen +;; venv-deactivate: deaktiviert virtualenv +;; venv-mkvirtualenv: erstellt neue virtualenv in venv-location +;; venv-lsvirtualenv: listet alle virtualenvs auf +;; venv-cdvirtualenv: wechselt default-Verzeichnis zum momentanen virtualenv-Verzeichnis +;; venv-cpvirtualenv: erstellt neue virtualenv aus einem exisiterenden. +;; fragt nach beiden Namen + +(use-package virtualenvwrapper + :ensure t + :init + (venv-initialize-interactive-shells) ;;interactive shell support + (venv-initialize-eshell) ;;eshell support + (setq venv-location "~/Archiv/Programmierprojekte/Python/virtualenv/") + (setq python-environment-directory venv-location) + (add-hook 'venv-postmkvirtualenv-hook + (lambda () (shell-command "pip install epc jedi"))) +;; (add-hook 'venv-postactivate-hook 'jedi:stop-server) ;;server-neustart, wenn neue virtualenv +;; (add-hook 'venv-postdeactivate-hook 'jedi:stop-server) ;;server-neustart, wenn neue virtualenv + ) + +;; sucht und aktiviert die virtualenv nach folgenden Aspekten: +;; .python-version im project-root (ethält absoluten Pfad zur virtualenv +;; .venv oder venv Verzeichnis im project-root +;; eine virtualenv mit dem selben Namen wie project-root +;; - project-root ist definiert als Verzeichnis, dass "auto-virtualenvwapper-project-root-files" enthält, +;; die da wären: .python-version, .dir-locals.el, .projectile, .emacs-project, .manage.py, .git + +;; für mich zuverlässig funktioiert nur absoluter Pfadin .python-version +(use-package auto-virtualenvwrapper + :ensure t + :config + (add-hook 'python-mode-hook #'auto-virtualenvwrapper-activate)) + ;;activate on changing buffers +;; (add-hook 'window-configuration-change-hook #'auto-virtualenvwrapper-activate) + ;;activate on focus in +;; (add-hook 'focus-in-hook #'auto-virtualenvwrapper-activate)) + +(use-package py-autopep8 + :config + (add-hook 'python-mode-hook 'py-autopep8-enable-on-save)) + + +;; benötigt pip install jedi / emerge dev-python/jedi +(use-package company-jedi ;; company-mode completion backend for python jedi +;; :defer t + :ensure t + :config + (defun my/python-mode-hook() + (add-to-list 'company-backends 'company-jedi)) + (add-hook 'python-mode-hook 'my/python-mode-hook) + ) + +(provide 'lang-python) diff --git a/elisp/lang-python.el.bak b/elisp/lang-python.el.bak new file mode 100644 index 0000000..f721fa1 --- /dev/null +++ b/elisp/lang-python.el.bak @@ -0,0 +1,86 @@ +(use-package python + :mode ("\\.py\\'" . python-mode)) +;; ############## +;; damit der EPC-Server funktioniert, +;; muss in /etc/localhost der Eintrag +;; 127.0.0.1 localhost +;; enthalten sein! +;; ############## + +;; virtualenv für python muss installiert sein +;; Benutzung +;; venv-workon: virtualenv aussuchen und setzen +;; venv-deactivate: deaktiviert virtualenv +;; venv-mkvirtualenv: erstellt neue virtualenv in venv-location +;; venv-lsvirtualenv: listet alle virtualenvs auf +;; venv-cdvirtualenv: wechselt default-Verzeichnis zum momentanen virtualenv-Verzeichnis +;; venv-cpvirtualenv: erstellt neue virtualenv aus einem exisiterenden. +;; fragt nach beiden Namen + +;;(use-package pyvenv +;; :ensure t +;; :init +;; (setenv "WORKON_HOME" "~/Archiv/Programmierprojekte/Python/virtualenv/") +;; (pyvenv-mode t) +;; ) + +(use-package virtualenvwrapper + :ensure t + :init + (venv-initialize-interactive-shells) ;;interactive shell support + (venv-initialize-eshell) ;;eshell support + (setq venv-location "~/Archiv/Programmierprojekte/Python/virtualenv/") + (setq python-environment-directory venv-location) + (add-hook 'venv-postmkvirtualenv-hook + (lambda () (shell-command "pip install epc jedi"))) +;; (add-hook 'venv-postactivate-hook 'jedi:stop-server) ;;server-neustart, wenn neue virtualenv +;; (add-hook 'venv-postdeactivate-hook 'jedi:stop-server) ;;server-neustart, wenn neue virtualenv + ) + +;; sucht und aktiviert die virtualenv nach folgenden Aspekten: +;; .python-version im project-root (ethält absoluten Pfad zur virtualenv +;; .venv oder venv Verzeichnis im project-root +;; eine virtualenv mit dem selben Namen wie project-root +;; - project-root ist definiert als Verzeichnis, dass "auto-virtualenvwapper-project-root-files" enthält, +;; die da wären: .python-version, .dir-locals.el, .projectile, .emacs-project, .manage.py, .git + +;; für mich zuverlässig funktioiert nur absoluter Pfadin .python-version +;;(use-package auto-virtualenvwrapper +;; :ensure t +;; :config +;; (add-hook 'python-mode-hook #'auto-virtualenvwrapper-activate)) + ;;activate on changing buffers +;; (add-hook 'window-configuration-change-hook #'auto-virtualenvwrapper-activate) + ;;activate on focus in +;; (add-hook 'focus-in-hook #'auto-virtualenvwrapper-activate)) + +(use-package py-autopep8 + :config + (add-hook 'python-mode-hook 'py-autopep8-enable-on-save)) + + +;; benötigt pip install jedi / emerge dev-python/jedi +(use-package company-jedi ;; company-mode completion backend for python jedi + :defer t + :ensure t + :config + (add-hook 'python-mode-hook 'jedi:setup) + (setq jedi:complete-on-dot t) + (setq jedi:use-shortcuts t) + (setq jedi:get-in-function-call-delay 100) + (setq jedi:tooltip-method '(pos-tip popup)) + (defun config/enable-company-jedi () + (add-to-list 'company-backends 'company-jedi) + (lambda() (setq company-backends '(company-jedi))) + ) + (add-hook 'python-mode-hook 'config/enable-company-jedi)) + +(use-package jedi + :ensure t + :init + (progn + (setq jedi:complete-on-dot t) + (setq jedi:setup-keys t) + (add-hook 'python-mode-hook 'jedi:setup))) + +(provide 'lang-python) diff --git a/elisp/lang-python.el.vor.jedi b/elisp/lang-python.el.vor.jedi new file mode 100644 index 0000000..af4457d --- /dev/null +++ b/elisp/lang-python.el.vor.jedi @@ -0,0 +1,88 @@ +;; company-jedi funktioniert bisher erst nach . + M-x company-jedi + +(use-package python + :mode ("\\.py\\'" . python-mode)) +;; ############## +;; damit der EPC-Server funktioniert, +;; muss in /etc/hosts der Eintrag +;; 127.0.0.1 localhost +;; enthalten sein! +;; ############## + +;; virtualenv für python muss installiert sein +;; Benutzung +;; venv-workon: virtualenv aussuchen und setzen +;; venv-deactivate: deaktiviert virtualenv +;; venv-mkvirtualenv: erstellt neue virtualenv in venv-location +;; venv-lsvirtualenv: listet alle virtualenvs auf +;; venv-cdvirtualenv: wechselt default-Verzeichnis zum momentanen virtualenv-Verzeichnis +;; venv-cpvirtualenv: erstellt neue virtualenv aus einem exisiterenden. +;; fragt nach beiden Namen + +;;(use-package pyvenv +;; :ensure t +;; :init +;; (setenv "WORKON_HOME" "~/Archiv/Programmierprojekte/Python/virtualenv/") +;; (pyvenv-mode t) +;; ) + +(use-package virtualenvwrapper + :ensure t + :init + (venv-initialize-interactive-shells) ;;interactive shell support + (venv-initialize-eshell) ;;eshell support + (setq venv-location "~/Archiv/Programmierprojekte/Python/virtualenv/") + (setq python-environment-directory venv-location) + (add-hook 'venv-postmkvirtualenv-hook + (lambda () (shell-command "pip install epc jedi"))) +;; (add-hook 'venv-postactivate-hook 'jedi:stop-server) ;;server-neustart, wenn neue virtualenv +;; (add-hook 'venv-postdeactivate-hook 'jedi:stop-server) ;;server-neustart, wenn neue virtualenv + ) + +;; sucht und aktiviert die virtualenv nach folgenden Aspekten: +;; .python-version im project-root (ethält absoluten Pfad zur virtualenv +;; .venv oder venv Verzeichnis im project-root +;; eine virtualenv mit dem selben Namen wie project-root +;; - project-root ist definiert als Verzeichnis, dass "auto-virtualenvwapper-project-root-files" enthält, +;; die da wären: .python-version, .dir-locals.el, .projectile, .emacs-project, .manage.py, .git + +;; für mich zuverlässig funktioiert nur absoluter Pfadin .python-version +;;(use-package auto-virtualenvwrapper +;; :ensure t +;; :config +;; (add-hook 'python-mode-hook #'auto-virtualenvwrapper-activate)) + ;;activate on changing buffers +;; (add-hook 'window-configuration-change-hook #'auto-virtualenvwrapper-activate) + ;;activate on focus in +;; (add-hook 'focus-in-hook #'auto-virtualenvwrapper-activate)) + +(use-package py-autopep8 + :config + (add-hook 'python-mode-hook 'py-autopep8-enable-on-save)) + + +;; benötigt pip install jedi / emerge dev-python/jedi +(use-package company-jedi ;; company-mode completion backend for python jedi + :defer t + :ensure t + :config + (add-hook 'python-mode-hook 'jedi:setup) + (setq jedi:complete-on-dot t) + (setq jedi:use-shortcuts t) + (setq jedi:get-in-function-call-delay 100) + (setq jedi:tooltip-method '(pos-tip popup)) + (defun config/enable-company-jedi () + (add-to-list 'company-backends 'company-jedi) + (setq jedi:complete-on-dot t) + ) + (add-hook 'python-mode-hook 'config/enable-company-jedi)) + +;;(use-package jedi-core +;; :ensure t +;; :init +;; (progn +;; (setq jedi:complete-on-dot t) +;; (setq jedi:setup-keys t) +;; (add-hook 'python-mode-hook 'jedi:setup))) + +(provide 'lang-python) diff --git a/elisp/plugin-company-mode.el b/elisp/plugin-company-mode.el new file mode 100644 index 0000000..b8cc615 --- /dev/null +++ b/elisp/plugin-company-mode.el @@ -0,0 +1,36 @@ +;; Paket dauert zu laden, +;; hier wird Laden verzögert bis Emacs idle ist + +(use-package company + :ensure t + :config + (add-to-list 'company-backends 'company-elisp) + (setq company-minimum-prefix-length 2 + company-tooltip-align-annotation t + company-tooltip-flip-when-above t + company-require-match nil + company-dabbrev-code-other-buffers t + company-dabbrev--minimum-length 2 + company-show-numbers t) +;; company-occurrence-weight-function) + (setq company-idle-delay 0.3) + (global-company-mode t)) + +(use-package company-statistics + :ensure t + :config + (company-statistics-mode 1)) + +(use-package company-quickhelp + :ensure t + :config + (company-quickhelp-mode 1)) + +(use-package company-dict + :ensure t + :config + (add-to-list 'company-backends 'company-dict) + (setq company-dict-dir (concat user-emacs-directory "dict/"))) + + +(provide 'plugin-company-mode) diff --git a/elisp/plugin-counsel.el b/elisp/plugin-counsel.el new file mode 100644 index 0000000..6c77a7c --- /dev/null +++ b/elisp/plugin-counsel.el @@ -0,0 +1,39 @@ +;;; plugin-counsel --- Summary +; Beschreibung zur Funktion etc. + +;;; Commentary: + +;;; Code: +(use-package ivy + :ensure t + :diminish + (ify-mode . "") ;; does not display ivy in the modeline + :init + (ivy-mode 1) ;; ivy wird global beim Start aktiviert + :bind + ("C-c C-r" . ivy-resume) + :config + (setq ivy-use-virtual-buffers t) ;;recent files and bookmarks im ivy-switch-buffer + (setq ivy-height 20) ;; Höhe des ivy-Fensters + (setq ivy-count-format "%d/%d ")) ;;current and total number + +(use-package counsel + :ensure t + :bind* ;; load counsel when pressed + (("M-x" . counsel-M-x) + ("C-x C-f" . counsel-find-file) + ("C-c h f" . counsel-describe-function) + ("C-c h v" . counsel-describe-variable) + ("M-i" . counsel-imenu))) + +(use-package swiper + :ensure t + :bind + (("C-s" . swiper) +;; ("C-c C-r" . ivy-resume) + )) +;; :config +;; (ivy-mode 1)) + +(provide 'plugin-counsel) +;;; plugin-counsel ends here diff --git a/elisp/plugin-counsel.el.bak b/elisp/plugin-counsel.el.bak new file mode 100644 index 0000000..4823b9d --- /dev/null +++ b/elisp/plugin-counsel.el.bak @@ -0,0 +1,35 @@ +;;; plugin-counsel --- Summary +; Beschreibung zur Funktion etc. + +;;; Commentary: + +;;; Code: +(use-package ivy + :ensure t + :diminish + (ify-mode . "") ;; does not display ivy in the modeline + :init + (ivy-mode 1) ;; ivy wird global beim Start aktiviert + :bind + ("C-c C-r" . ivy-resume) + :config + (setq ivy-use-virtual-buffers t) ;;recent files and bookmarks im ivy-switch-buffer + (setq ivy-height 20) ;; Höhe des ivy-Fensters + (setq ivy-count-format "%d/%d ")) ;;current and total number + +(use-package counsel + :ensure t + :bind* ;; load counsel when pressed + (("M-x" . counsel-M-x) + ("C-x C-f" . counsel-find-file) + ("C-c h f" . counsel-describe-function) + ("C-c h v" . counsel-describe-variable) + ("M-i" . counsel-imenu))) + +(use-package swiper + :ensure t + :bind + (("C-s" . swiper))) + +(provide 'plugin-counsel) +;;; plugin-counsel ends here diff --git a/elisp/plugin-evil.el b/elisp/plugin-evil.el new file mode 100644 index 0000000..ae6f327 --- /dev/null +++ b/elisp/plugin-evil.el @@ -0,0 +1,5 @@ +(use-package evil + :config + (evil-mode 1)) + +(provide 'plugin-evil) diff --git a/elisp/plugin-flycheck.el b/elisp/plugin-flycheck.el new file mode 100644 index 0000000..fc7f1fb --- /dev/null +++ b/elisp/plugin-flycheck.el @@ -0,0 +1,5 @@ +(use-package flycheck + :ensure t + :init (global-flycheck-mode)) + +(provide 'plugin-flycheck) diff --git a/elisp/plugin-magit.el b/elisp/plugin-magit.el new file mode 100644 index 0000000..e2b512e --- /dev/null +++ b/elisp/plugin-magit.el @@ -0,0 +1,21 @@ +;; Anleitung +;; https://magit.vc/manual/magit/index.html +;; +;; M-x magit-init initiiert repository und zeigt status buffer +;; M-x magit-status +;; +;; im Statusbuffer: +;; s stage files +;; u unstage files +;; U unstage all +;; a apply changed to staging +;; c c commit (Nachricht schreiben, dann C-c C-c zum echten commit) +;; b b switch to another branch +;; P u git push +;; F u git pull + + +(use-package magit + :ensure t) + +(provide 'plugin-magit) diff --git a/elisp/plugin-neotree.el b/elisp/plugin-neotree.el new file mode 100644 index 0000000..e63db84 --- /dev/null +++ b/elisp/plugin-neotree.el @@ -0,0 +1,25 @@ +;; Shortcuts (only in neotree-buffer) +;; n next line +;; p previous line +;; RET opens file / fold,unfold directory +;; g refresh +;; A maximize neotree window +;; H toggle hidden files +;; C-c C-n creates file or directory if name ends with '/' +;; C-c C-d deletes file or directory +;; C-c C-r renames file or directory +;; C-c C-c change root directory +;; C-c C-p copy file or directory + +(use-package neotree + :ensure t + :bind + ("" . neotree-toggle) + :config + (setq neo-theme 'nerd + neo-smart-open t ;; neotree window springt zur Position des offenen Buffers + neo-dont-be-alone t ;; neotree nach öffnen nicht einziges Fenster + ) +) + +(provide 'plugin-neotree) diff --git a/elisp/plugin-org.el b/elisp/plugin-org.el new file mode 100644 index 0000000..873f5e9 --- /dev/null +++ b/elisp/plugin-org.el @@ -0,0 +1,34 @@ +(defvar PATH_ORG_FILES "~/Archiv/Dokumente/Org/") +(defvar PATH_ORG_JOURNAL "~/Archiv/Dokumente/Journal/") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; org + +(use-package org + :ensure t + :bind + (("C-c l" . org-store-link) + ("C-c a" . org-agenda) + ("C-c c" . org-capture)) + :config + (setq org-log-done t) ;; ??? + (setq org-agenda-span 21) ;; Agendaview für 21 Tage + (setq org-agenda-include-diary t) ;; berücksichtigt den Emacs-Kalender + ;; der Jahrestage, wiederkehrende Termine etc. berücksichtigt + (setq org-default-notes-file (concat PATH_ORG_FILES "notes.org")) ;; Standardpfad für Notizen + (setq org-agenda-files (list PATH_ORG_FILES ;; Pfade für org-Files + PATH_ORG_JOURNAL)) + (setq org-agenda-file-regexp "\\.org\\|[0-9]+") ;; sucht alle Dateien mit Endung .*, .org + ;; oder Dateien, die nur aus Zahlen bestehen + (add-to-list 'auto-mode-alist '("\\.org$^[~]'\\|[0-9]+^[~]" . org-mode))) ;; org-mode automatisch aktiviert, wenn .org-File geladen wird + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; org-journal + +(use-package org-journal + :ensure t + :init + (setq org-journal-dir PATH_ORG_JOURNAL)) ;; Speicherpfad für Journaleinträge + + +(provide 'plugin-org) diff --git a/elisp/plugin-projectile.el b/elisp/plugin-projectile.el new file mode 100644 index 0000000..c1ce9ec --- /dev/null +++ b/elisp/plugin-projectile.el @@ -0,0 +1,10 @@ +(use-package projectile + :ensure t + :defer t + :init + (projectile-mode)) + :config + ;;für virtualenvwrapper und python-projekte + (setq projectile-switch-project-action 'venv-projectile-auto-workon) + +(provide 'plugin-projectile) diff --git a/elisp/plugin-smartparens.el b/elisp/plugin-smartparens.el new file mode 100644 index 0000000..7c34c23 --- /dev/null +++ b/elisp/plugin-smartparens.el @@ -0,0 +1,11 @@ +(use-package smartparens + :ensure t + :diminish smartparens-mode + :init + (smartparens-global-mode) + (show-smartparens-global-mode) + :config + (smartparens-global-strict-mode) + (require 'smartparens-config)) + +(provide 'plugin-smartparens) diff --git a/elisp/plugin-which-key.el b/elisp/plugin-which-key.el new file mode 100644 index 0000000..18832a7 --- /dev/null +++ b/elisp/plugin-which-key.el @@ -0,0 +1,10 @@ +(use-package which-key + :ensure t + :diminish which-key-mode + :config + (which-key-mode) + (which-key-setup-side-window-right-bottom) + (which-key-setup-minibuffer) + (setq which-key-idle-delay 0.5)) + +(provide 'plugin-which-key) diff --git a/elisp/plugin-yasnippet.el b/elisp/plugin-yasnippet.el new file mode 100644 index 0000000..430aeff --- /dev/null +++ b/elisp/plugin-yasnippet.el @@ -0,0 +1,8 @@ +(use-package yasnippet + :ensure t + :diminish yas + :config + (yas/global-mode 1) + (add-to-list 'yas-snippet-dirs (concat user-emacs-directory "snippets"))) + +(provide 'plugin-yasnippet) diff --git a/init.el b/init.el new file mode 100644 index 0000000..faa0c6b --- /dev/null +++ b/init.el @@ -0,0 +1,43 @@ + +;; Added by Package.el. This must come before configurations of +;; installed packages. Don't delete this line. If you don't want it, +;; just comment it out by adding a semicolon to the start of the line. +;; You may delete these explanatory comments. +(package-initialize) +(setq shell-file-name "/bin/bash") ;;test für python und jedi +(setq debug-on-error t) ;; Debug-Meldung, wenn Fehler durch init.el auftritt + +(add-to-list 'load-path (concat user-emacs-directory "elisp/")) + +(require 'base) +(require 'base-theme) +(require 'base-backup) +(require 'base-functions) +(require 'base-global-keys) + +;(require 'plugin-evil) ; vi-mode für emacs +(require 'plugin-which-key) +(require 'plugin-counsel) +(require 'plugin-org) +(require 'plugin-company-mode) +(require 'plugin-flycheck) ; Syntaxcheck +(require 'plugin-smartparens) +(require 'plugin-yasnippet) +(require 'plugin-neotree) +(require 'plugin-projectile) +(require 'plugin-magit) +(require 'lang-python) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages + (quote + (company-jedi elpy yasnippet which-key use-package smartparens projectile org-journal neotree material-theme magit flycheck counsel company-statistics company-quickhelp company-dict)))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + )