From 44b17acafe209c255c39599d99c16bbe96c09558 Mon Sep 17 00:00:00 2001 From: finga Date: Tue, 5 Jan 2016 14:47:39 +0100 Subject: [PATCH 01/14] deactivated shell in emacs files: .emacs.d/init.el --- .emacs.d/init.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 3d6aeee..b0374fd 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -42,8 +42,8 @@ (setq european-calender-style t) ;; Run a shell with zsh -(shell) -(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) +;;(shell) +;;(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) ;; Display of current function (which function mode) (which-function-mode 1) From 243ef5e3c000d4c4abf318ab79d47f3027b46ae3 Mon Sep 17 00:00:00 2001 From: finga Date: Tue, 12 Jan 2016 14:25:44 +0100 Subject: [PATCH 02/14] add easyPG support for handling GPG --- .emacs.d/init.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b0374fd..fe8486e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -94,6 +94,10 @@ (add-to-list 'load-path "~/.emacs.d/lisp") (setq-default x-stretch-cursor t) +;; easy pg +(require 'epa-file) +(epa-file-enable) + ;; Include other configs ;; calendar-mode (if (file-exists-p "~/.emacs.d/calendar.el") From 853ff9e523e01c44bf947854f8b9d5155c8adfc3 Mon Sep 17 00:00:00 2001 From: finga Date: Tue, 12 Jan 2016 15:43:16 +0100 Subject: [PATCH 03/14] remove easyPG config (works without) --- .emacs.d/init.el | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index fe8486e..b0374fd 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -94,10 +94,6 @@ (add-to-list 'load-path "~/.emacs.d/lisp") (setq-default x-stretch-cursor t) -;; easy pg -(require 'epa-file) -(epa-file-enable) - ;; Include other configs ;; calendar-mode (if (file-exists-p "~/.emacs.d/calendar.el") From 602fd1226eae181e31c0946ce72d2c8f1c33f75d Mon Sep 17 00:00:00 2001 From: finga Date: Tue, 12 Jan 2016 15:43:27 +0100 Subject: [PATCH 04/14] add puppet-mode and puppet-flymake --- .emacs.d/init.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b0374fd..41ce6fb 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -110,3 +110,15 @@ ;; rust-mode (if (file-exists-p "~/.emacs.d/rust-mode.el") (load-file "~/.emacs.d/rust-mode.el")) + +;; puppet-mode +(if (file-exists-p "~/.emacs.d/puppet-syntax-emacs/puppet-mode-init.el") + (load-file "~/.emacs.d/puppet-syntax-emacs/puppet-mode-init.el")) +(if (file-exists-p "~/.emacs.d/puppet-syntax-emacs/puppet-mode.el") + (load-file "~/.emacs.d/puppet-syntax-emacs/puppet-mode.el")) + +;; puppet flymake via puppet-lint +(if (file-exists-p "~/.emacs.d/puppet-flymake/flymake-puppet.el") + (load-file "~/.emacs.d/puppet-flymake/flymake-puppet.el")) +(require 'flymake-puppet) +(add-hook 'puppet-mode-hook (lambda () (flymake-puppet-load))) From 47e415591d091acece8cba4e7c48e65e9ca400ed Mon Sep 17 00:00:00 2001 From: finga Date: Mon, 20 Jun 2016 14:05:19 +0200 Subject: [PATCH 05/14] tramp settings --- .emacs.d/init.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 41ce6fb..7398c3f 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -122,3 +122,8 @@ (load-file "~/.emacs.d/puppet-flymake/flymake-puppet.el")) (require 'flymake-puppet) (add-hook 'puppet-mode-hook (lambda () (flymake-puppet-load))) + +;; tramp mode ssh (faster) +(setq tramp-default-method "ssh") + + From 3db4e0cc0613a935974d4c86f152a24ecb36309e Mon Sep 17 00:00:00 2001 From: finga Date: Wed, 13 Jul 2016 15:49:40 +0200 Subject: [PATCH 06/14] add idle zone-mode --- .emacs.d/init.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 7398c3f..63e766e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -86,6 +86,11 @@ (cons "." "~/.emacs.d/backups/")) (setq tramp-backup-directory-alist backup-directory-alist) +;; set screen saver +(require 'zone) +(zone-when-idle 60) +;;(setq zone-timer (run-with-idle-timer 60 t 'zone)) + ;; arduino mode ''(add-to-list 'load-path "~/.emacs.d/vendor/arduino-mode") (setq auto-mode-alist (cons '("\\.\\(pde\\|ino\\)$" . arduino-mode) auto-mode-alist)) From 2b510df7175db381ffad3c6717498078bc6ece4e Mon Sep 17 00:00:00 2001 From: finga Date: Mon, 18 Jul 2016 13:07:08 +0200 Subject: [PATCH 07/14] desable zone mode --- .emacs.d/init.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 63e766e..6eedfa0 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -87,8 +87,8 @@ (setq tramp-backup-directory-alist backup-directory-alist) ;; set screen saver -(require 'zone) -(zone-when-idle 60) +;;(require 'zone) +;;(zone-when-idle 60) ;;(setq zone-timer (run-with-idle-timer 60 t 'zone)) ;; arduino mode From 65d3e7265859aebed641e082e1272fcfbe18e93b Mon Sep 17 00:00:00 2001 From: finga Date: Thu, 17 Aug 2017 09:55:41 +0200 Subject: [PATCH 08/14] clean up --- .emacs.d/init.el | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 6eedfa0..283d5eb 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -41,10 +41,6 @@ ;; Calender no Su at beginning (setq european-calender-style t) -;; Run a shell with zsh -;;(shell) -;;(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) - ;; Display of current function (which function mode) (which-function-mode 1) @@ -58,7 +54,7 @@ (global-set-key [(shift delete)] 'clipboard-kill-region) (global-set-key [(control insert)] 'clipboard-kill-ring-save) (global-set-key [(shift insert)] 'primary-yank) ;; like an an X terminal - (setq select-active-regions t) +(setq select-active-regions t) (global-set-key [mouse-2] 'mouse-yank-primary) ;; No, please, no tabs in my programs! @@ -86,17 +82,7 @@ (cons "." "~/.emacs.d/backups/")) (setq tramp-backup-directory-alist backup-directory-alist) -;; set screen saver -;;(require 'zone) -;;(zone-when-idle 60) -;;(setq zone-timer (run-with-idle-timer 60 t 'zone)) - -;; arduino mode -''(add-to-list 'load-path "~/.emacs.d/vendor/arduino-mode") -(setq auto-mode-alist (cons '("\\.\\(pde\\|ino\\)$" . arduino-mode) auto-mode-alist)) -(autoload 'arduino-mode "arduino-mode" "Arduino editing mode." t) - -(add-to-list 'load-path "~/.emacs.d/lisp") +;; stretch cursor to correct width (setq-default x-stretch-cursor t) ;; Include other configs @@ -116,19 +102,20 @@ (if (file-exists-p "~/.emacs.d/rust-mode.el") (load-file "~/.emacs.d/rust-mode.el")) -;; puppet-mode -(if (file-exists-p "~/.emacs.d/puppet-syntax-emacs/puppet-mode-init.el") - (load-file "~/.emacs.d/puppet-syntax-emacs/puppet-mode-init.el")) -(if (file-exists-p "~/.emacs.d/puppet-syntax-emacs/puppet-mode.el") - (load-file "~/.emacs.d/puppet-syntax-emacs/puppet-mode.el")) +;; ;; puppet-mode +;; (if (file-exists-p "~/.emacs.d/puppet-syntax-emacs/puppet-mode-init.el") +;; (load-file "~/.emacs.d/puppet-syntax-emacs/puppet-mode-init.el")) +;; (if (file-exists-p "~/.emacs.d/puppet-syntax-emacs/puppet-mode.el") +;; (load-file "~/.emacs.d/puppet-syntax-emacs/puppet-mode.el")) -;; puppet flymake via puppet-lint -(if (file-exists-p "~/.emacs.d/puppet-flymake/flymake-puppet.el") - (load-file "~/.emacs.d/puppet-flymake/flymake-puppet.el")) -(require 'flymake-puppet) -(add-hook 'puppet-mode-hook (lambda () (flymake-puppet-load))) +;; ;; puppet flymake via puppet-lint +;; (if (file-exists-p "~/.emacs.d/puppet-flymake/flymake-puppet.el") +;; (load-file "~/.emacs.d/puppet-flymake/flymake-puppet.el")) +;; (require 'flymake-puppet) +;; (add-hook 'puppet-mode-hook (lambda () (flymake-puppet-load))) ;; tramp mode ssh (faster) (setq tramp-default-method "ssh") - +;; gpg gui fix +(setenv “GPG_AGENT_INFO” nil) From a5bf7e5a2dc673110a77d8176b9881bda35aead7 Mon Sep 17 00:00:00 2001 From: finga Date: Tue, 8 May 2018 15:50:25 +0200 Subject: [PATCH 09/14] update config --- .emacs.d/init.el | 128 +++++++++++++++-------------------------------- 1 file changed, 40 insertions(+), 88 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 283d5eb..2c5e61f 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -2,65 +2,49 @@ ;;;;;; -*- Mode: Emacs-Lisp -*- ;;;; +;; melpa and elpa +(require 'package) +(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) + (not (gnutls-available-p)))) + (proto (if no-ssl "http" "https"))) + (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t) + (add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) + (when (< emacs-major-version 24) + ;; for important compatibility libraries like cl-lib + (add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/"))))) +(package-initialize) + +;; use space instead of tabs +(setq-default indent-tabs-mode nil) + ;; theme (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. '(column-number-mode t) '(custom-enabled-themes (quote (tango-dark))) - '(org-agenda-files (file-expand-wildcards "~/org-mode/*.org")) - '(scroll-bar-mode nil) '(show-paren-mode t) - '(tool-bar-mode nil)) + '(scroll-bar-mode nil) + '(tool-bar-mode nil) + '(menu-bar-mode nil)) -;; Use UTF-8 for file name encoding -(setq file-name-coding-system 'utf-8) -(prefer-coding-system 'utf-8) - -;; No fancy graphic stuff -(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) -(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) -(if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) - -;; Make the screen go down with one line & Mouse wheel support +;; make the screen go down with one line & mouse wheel support (setq scroll-step 1) (mouse-wheel-mode t) -;; Enable line, linum and column numbering +;; use UTF-8 for file name encoding +(setq file-name-coding-system 'utf-8) +(prefer-coding-system 'utf-8) + +;; enable line, linum and column numbering (line-number-mode 1) (column-number-mode 1) -;; Enhanced buffer switching +;; enhanced buffer switching (windmove-default-keybindings) -;; Paren matching -(show-paren-mode t) - -;; Calender no Su at beginning -(setq european-calender-style t) - -;; Display of current function (which function mode) +;; display of current function (which-function-mode) (which-function-mode 1) -;; dont backup -(setq make-backup-files nil) - -;; woman -(setq woman-use-own-frame nil) - -;; X11 clipboard interaction (http://www.emacswiki.org/emacs/CopyAndPaste) -(global-set-key [(shift delete)] 'clipboard-kill-region) -(global-set-key [(control insert)] 'clipboard-kill-ring-save) -(global-set-key [(shift insert)] 'primary-yank) ;; like an an X terminal -(setq select-active-regions t) -(global-set-key [mouse-2] 'mouse-yank-primary) - -;; No, please, no tabs in my programs! -(setq indent-tabs-mode nil) - -;; No am/pm here +;; no am/pm in timestamps (setq display-time-24hr-format t) ;; enable some commands disabled by default @@ -68,54 +52,22 @@ (put 'upcase-region 'disabled nil) (put 'downcase-region 'disabled nil) -;; disable backups when using su or sudo -(setq backup-enable-predicate - (lambda (name) - (and (normal-backup-enable-predicate name) - (not - (let ((method (file-remote-p name 'method))) - (when (stringp method) - (member method '("su" "sudo")))))))) - -;; save autobackups to ~/.emacs.d/backups -(add-to-list 'backup-directory-alist - (cons "." "~/.emacs.d/backups/")) -(setq tramp-backup-directory-alist backup-directory-alist) - -;; stretch cursor to correct width -(setq-default x-stretch-cursor t) - -;; Include other configs -;; calendar-mode -(if (file-exists-p "~/.emacs.d/calendar.el") - (load-file "~/.emacs.d/calendar.el")) - -;; custom -(if (file-exists-p "~/.emacs.d/custom.el") - (load-file "~/.emacs.d/custom.el")) - -;; org-mode -(if (file-exists-p "~/.emacs.d/org-mode.el") - (load-file "~/.emacs.d/org-mode.el")) - -;; rust-mode -(if (file-exists-p "~/.emacs.d/rust-mode.el") - (load-file "~/.emacs.d/rust-mode.el")) - -;; ;; puppet-mode -;; (if (file-exists-p "~/.emacs.d/puppet-syntax-emacs/puppet-mode-init.el") -;; (load-file "~/.emacs.d/puppet-syntax-emacs/puppet-mode-init.el")) -;; (if (file-exists-p "~/.emacs.d/puppet-syntax-emacs/puppet-mode.el") -;; (load-file "~/.emacs.d/puppet-syntax-emacs/puppet-mode.el")) - -;; ;; puppet flymake via puppet-lint -;; (if (file-exists-p "~/.emacs.d/puppet-flymake/flymake-puppet.el") -;; (load-file "~/.emacs.d/puppet-flymake/flymake-puppet.el")) -;; (require 'flymake-puppet) -;; (add-hook 'puppet-mode-hook (lambda () (flymake-puppet-load))) +;; handle backups +(setq backup-directory-alist '(("." . "~/.emacs.d/backups/")) + backup-by-copying t + delete-old-versions t + kept-new-versions 6 + kept-old-versions 2 + version-control t + tramp-backup-directory-alist backup-directory-alist) ;; tramp mode ssh (faster) (setq tramp-default-method "ssh") ;; gpg gui fix (setenv “GPG_AGENT_INFO” nil) + +;; include other configs +;; calendar-mode +(if (file-exists-p "~/.emacs.d/calendar.el") + (load-file "~/.emacs.d/calendar.el")) From 782c792a7ffa3c1334b5ec2ee5d8c541429c6b38 Mon Sep 17 00:00:00 2001 From: finga Date: Mon, 14 May 2018 16:43:47 +0200 Subject: [PATCH 10/14] update gpg/clipboard config --- .emacs.d/init.el | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 2c5e61f..1bdfa98 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -21,10 +21,14 @@ (custom-set-variables '(column-number-mode t) '(custom-enabled-themes (quote (tango-dark))) - '(show-paren-mode t) + '(menu-bar-mode nil) + '(package-selected-packages (quote (pass pinentry))) '(scroll-bar-mode nil) - '(tool-bar-mode nil) - '(menu-bar-mode nil)) + '(show-paren-mode t) + '(tool-bar-mode nil)) + +;; yank at cursor not mouse pointer +(setq mouse-yank-at-point t) ;; make the screen go down with one line & mouse wheel support (setq scroll-step 1) @@ -47,6 +51,10 @@ ;; no am/pm in timestamps (setq display-time-24hr-format t) +;; clipboard yanking is possible with middle mouse button now +(setq x-select-enable-clipboard t + x-select-enable-primary t) + ;; enable some commands disabled by default (put 'narrow-to-region 'disabled nil) (put 'upcase-region 'disabled nil) @@ -64,9 +72,6 @@ ;; tramp mode ssh (faster) (setq tramp-default-method "ssh") -;; gpg gui fix -(setenv “GPG_AGENT_INFO” nil) - ;; include other configs ;; calendar-mode (if (file-exists-p "~/.emacs.d/calendar.el") From 72d4c9b53aa37f4affa480ec907a1548b5299698 Mon Sep 17 00:00:00 2001 From: finga Date: Tue, 22 May 2018 09:40:19 +0200 Subject: [PATCH 11/14] automatically remove trailing whitespaces, add last newline at eof and add magit to installed packages --- .emacs.d/init.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 1bdfa98..2c0d6ec 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -17,12 +17,23 @@ ;; use space instead of tabs (setq-default indent-tabs-mode nil) +;; delete trailing whitespaces before saving +(add-hook 'before-save-hook 'delete-trailing-whitespace) + +;; add newlines at eof +(setq require-final-newline t) +;; (setq mode-require-final-newline t) + ;; theme (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. '(column-number-mode t) '(custom-enabled-themes (quote (tango-dark))) '(menu-bar-mode nil) - '(package-selected-packages (quote (pass pinentry))) + '(package-selected-packages (quote (magit pass pinentry))) '(scroll-bar-mode nil) '(show-paren-mode t) '(tool-bar-mode nil)) From d622b47918d66a7f6896d791f6124d27df009a30 Mon Sep 17 00:00:00 2001 From: finga Date: Wed, 23 May 2018 11:27:06 +0200 Subject: [PATCH 12/14] increase the default password lenght from 8 to 32 --- .emacs.d/init.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 2c0d6ec..635237e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -83,6 +83,9 @@ ;; tramp mode ssh (faster) (setq tramp-default-method "ssh") +;; set pass default password length +(setq password-store-password-length 32) + ;; include other configs ;; calendar-mode (if (file-exists-p "~/.emacs.d/calendar.el") From e5bdca809feb87ba2790f23c57864f4428ecc81f Mon Sep 17 00:00:00 2001 From: finga Date: Mon, 28 May 2018 15:18:52 +0200 Subject: [PATCH 13/14] add packages --- .emacs.d/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 635237e..2321d0d 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -33,7 +33,7 @@ '(column-number-mode t) '(custom-enabled-themes (quote (tango-dark))) '(menu-bar-mode nil) - '(package-selected-packages (quote (magit pass pinentry))) + '(package-selected-packages (quote (flycheck-yamllint yaml-mode magit pass pinentry))) '(scroll-bar-mode nil) '(show-paren-mode t) '(tool-bar-mode nil)) From 4ac6e7dbdcc18557185e95b3e5ed00a04233d782 Mon Sep 17 00:00:00 2001 From: finga Date: Wed, 30 May 2018 15:18:46 +0200 Subject: [PATCH 14/14] add gitignore --- .gitignore.d/emacs | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitignore.d/emacs diff --git a/.gitignore.d/emacs b/.gitignore.d/emacs new file mode 100644 index 0000000..dea08b0 --- /dev/null +++ b/.gitignore.d/emacs @@ -0,0 +1,4 @@ +* +!/.emacs.d +!/.emacs.d/calendar.el +!/.emacs.d/init.el