Marc Pohling
7 years ago
commit
ceff231ebc
21 changed files with 639 additions and 0 deletions
Unified View
Diff Options
-
34elisp/base-backup.el
-
6elisp/base-functions.el
-
5elisp/base-global-keys.el
-
7elisp/base-theme.el
-
66elisp/base.el
-
65elisp/lang-python.el
-
86elisp/lang-python.el.bak
-
88elisp/lang-python.el.vor.jedi
-
36elisp/plugin-company-mode.el
-
39elisp/plugin-counsel.el
-
35elisp/plugin-counsel.el.bak
-
5elisp/plugin-evil.el
-
5elisp/plugin-flycheck.el
-
21elisp/plugin-magit.el
-
25elisp/plugin-neotree.el
-
34elisp/plugin-org.el
-
10elisp/plugin-projectile.el
-
11elisp/plugin-smartparens.el
-
10elisp/plugin-which-key.el
-
8elisp/plugin-yasnippet.el
-
43init.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) |
@ -0,0 +1,6 @@ |
|||||
|
;; Eigene Funktionen hier einfügen |
||||
|
|
||||
|
;;(defun something |
||||
|
;; (do-somehing)) |
||||
|
|
||||
|
(provide 'base-functions) |
@ -0,0 +1,5 @@ |
|||||
|
;; Hier eigene keys hinzufügen im Format |
||||
|
|
||||
|
;(global-key-set (kbd "[SHORTCUT]") '[FUNCTION]) |
||||
|
|
||||
|
(provide 'base-global-keys) |
@ -0,0 +1,7 @@ |
|||||
|
(use-package material-theme |
||||
|
:defer t |
||||
|
:ensure t |
||||
|
:init |
||||
|
(load-theme 'material t)) |
||||
|
|
||||
|
(provide 'base-theme) |
@ -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) |
@ -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) |
@ -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) |
@ -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) |
@ -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) |
@ -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 |
@ -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 |
@ -0,0 +1,5 @@ |
|||||
|
(use-package evil |
||||
|
:config |
||||
|
(evil-mode 1)) |
||||
|
|
||||
|
(provide 'plugin-evil) |
@ -0,0 +1,5 @@ |
|||||
|
(use-package flycheck |
||||
|
:ensure t |
||||
|
:init (global-flycheck-mode)) |
||||
|
|
||||
|
(provide 'plugin-flycheck) |
@ -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) |
@ -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 |
||||
|
("<f8>" . 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) |
@ -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) |
@ -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) |
@ -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) |
@ -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) |
@ -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) |
@ -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. |
||||
|
) |