Commits

Stephan Baumeister committed 0181c65

Added window session management (packages windows and revive), added startup files that are loaded before package initialization.

Comments (0)

Files changed (7)

 *.pyc
 *~
 #*#
+startup/local-before-init.el
+startup/local-after-init.el
 README.html
 auto-save-list
 server
 semanticdb
 url
 places
-custom.el
-local.el
-local-paths.el
-local-init.el
 ede-projects.el
 ac-comphist.dat
 .DS_Store
 ;; (setenv "CYGWIN" "nodosfilewarning")
 (push "~/.emacs.d/vendor/bin" exec-path)
 
-;; Load local-paths.el
-(let ((local-paths-file (concat mycfg-basepath "local-paths.el")))
-  (when (file-exists-p local-paths-file)
-    (load local-paths-file)))
+;; Load local-before-init.el
+(let ((local-before-init-file (concat mycfg-basepath "startup/local-before-init.el")))
+  (when (file-exists-p local-before-init-file)
+    (load local-before-init-file)))
+
+;; Load startup/global-before-init.el
+(let ((global-before-init-file (concat mycfg-basepath "startup/global-before-init.el")))
+  (when (file-exists-p global-before-init-file)
+    (load global-before-init-file)))
 
 ;;---------------------------------------------------------------------------------------------------
 ;; Loading libraries in from the vendor directory
           s
           projectile
           rainbow-mode
+          revive
           switch-window
           virtualenv
           web-mode
           whole-line-or-region
+          windows
           wrap-region
           yaml-mode
           yasnippet
           zencoding-mode))
 ;;---------------------------------------------------------------------------------------------------
 
-;; Load startup/global.el
-(let ((global-startup-file (concat mycfg-basepath "startup/global.el")))
-  (when (file-exists-p global-startup-file)
-    (load global-startup-file)))
+;; Load startup/global-after-init.el
+(let ((global-after-init-file (concat mycfg-basepath "startup/global-after-init.el")))
+  (when (file-exists-p global-after-init-file)
+    (load global-after-init-file)))
 
 ;; Load personal stuff
 (let ((personal-dir (concat mycfg-basepath "personal")))
   (when (file-exists-p personal-dir)
     (mapc 'load (directory-files personal-dir 't "^[^#].*el$"))))
 
-;; Load local-init.el
-(let ((local-init-file (concat mycfg-basepath "local-init.el")))
-  (when (file-exists-p local-init-file)
-    (load local-init-file)))
+;; Load local-after-init.el
+(let ((local-after-init-file (concat mycfg-basepath "startup/local-after-init.el")))
+  (when (file-exists-p local-after-init-file)
+    (load local-after-init-file)))
 
 ;;---------------------------------------------------------------------------------------------------
 

local-paths.el.tpl

-;; -*- mode: emacs-lisp -*-
-
-;;--------------------------------------------------------------------------------------------------
-;; Environment variables
-;;--------------------------------------------------------------------------------------------------
-;; Don't display warning when using Windows style paths
-(setenv "CYGWIN" "nodosfilewarning")
-(setenv "PATH" (concat "D:\\Apps\\Git\\cmd;D:\\Apps\\MiKTeX\\miktex\\bin;" (getenv "PATH")))
-;; (setenv "COMSPEC" "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe")
-
-;;--------------------------------------------------------------------------------------------------
-;; Emacs paths containing executables
-;;--------------------------------------------------------------------------------------------------
-;; (push "D:/Apps/GnuWin/bin" exec-path)
-(push "D:/Apps/Git/cmd" exec-path)
-
-;;--------------------------------------------------------------------------------------------------
-;; Org mode
-;;--------------------------------------------------------------------------------------------------
-(setq org-directory "D:\\Dropbox\\Org")
-
-;;--------------------------------------------------------------------------------------------------
-;; Remote transfer settings: FTP, SSH ...
-;;--------------------------------------------------------------------------------------------------
-(setq ange-ftp-ftp-program-name "D:\\Cygwin\\bin\\ftp.exe")
-;; (setq ange-ftp-ftp-program-name (concat (getenv "HOME") "\\.emacs.d\\vendor\\bin\\ftp.exe"))
-(setq tls-program '("D:\\Cygwin\\bin\\openssl.exe s_client -connect %h:%p -no_ssl2 -ign_eof"))
-
-;;--------------------------------------------------------------------------------------------------
-;; Diff settings
-;;--------------------------------------------------------------------------------------------------
-(setq ediff-diff-program "D:\\Cygwin\\bin\\diff.exe")
-(setq ediff-diff3-program "D:\\Cygwin\\bin\\diff3.exe")
-
-;;--------------------------------------------------------------------------------------------------
-;; AUCTeX
-;;--------------------------------------------------------------------------------------------------
-(setq TeX-view-program-list
-             (quote (("Sumatra PDF" "D:\\Apps\\SumatraPDF\\SumatraPDF.exe -reuse-instance %o"))))
-
-

startup/global-after-init.el

+;; Deactivate GUI elements
+;;(menu-bar-mode -1)
+(tool-bar-mode -1)
+(toggle-scroll-bar -1)
+(show-paren-mode 1)
+
+;; Theme and font
+;; (load-theme 'sanityinc-tomorrow-night t)
+;; (setq-default cursor-type 'bar)
+(load-theme 'dichromacy t)
+(set-face-attribute 'default nil :font "Consolas-10")
+
+;; Default coding system
+(set-keyboard-coding-system 'windows-1252-dos)
+(prefer-coding-system 'windows-1252-dos)
+;; (set-default-coding-systems 'windows-1252)
+
+;; Backup & temporary file settings
+(setq default-directory "~")
+(setq backup-directory-alist `((".*" . ,temporary-file-directory)))
+(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
+(setq delete-old-versions t)
+
+;; Deactivate startup screen and ring bell sound
+(setq inhibit-startup-message t)
+(setq inhibit-startup-echo-area-message t)
+;;'(warning-minimum-level :error)
+(setq ring-bell-function 'ignore)
+
+;; Fast, smoother scrolling
+(setq redisplay-dont-pause t)
+(setq-default bidi-display-reordering nil)
+(setq auto-window-vscroll nil)
+;; (setq scroll-margin 1)
+(setq scroll-step 0)
+(setq scroll-conservatively most-positive-fixnum)
+(setq scroll-preserve-screen-position t)
+(setq mouse-wheel-scroll-amount '(5 ((shift) . 1)))
+(setq mouse-wheel-progressive-speed nil)
+(setq mouse-wheel-follow-mouse t)
+(global-set-key (kbd "M-n") (lambda () (interactive) (scroll-up-command 1)))
+(global-set-key (kbd "M-p") (lambda () (interactive) (scroll-down-command 1)))
+
+;; Indendation settings
+(setq-default indent-tabs-mode nil)
+(setq-default tab-width 4)
+(setq-default c-basic-offset 4)
+(setq-default c-basic-indent 4)
+(setq c-default-style "java")
+(setq tab-stop-list (mapcar (lambda (x) (* 4 x))
+                            (number-sequence 1 (/ 120 4))))
+(setq-default sgml-basic-offset 4)
+
+(column-number-mode t)
+;;(global-linum-mode t)
+;;(global-hl-line-mode t)
+
+(setq cua-enable-cua-keys nil) ;; only for rectangles
+(setq-default truncate-lines t)
+
+;; Highlight lines longer than 100 characters in whitespace-mode
+(setq whitespace-line-column 100)
+
+;; Zoom in and out (increase/decrease font size) with mouse scroller
+(global-set-key [C-wheel-up] 'text-scale-increase)
+(global-set-key [C-wheel-down] 'text-scale-decrease)
+
+;; move selected text via Alt-Shift-Up/Down
+(move-text-default-bindings)
+
+;; auto-completion in minibuffer
+(icomplete-mode +1)
+
+(autopair-global-mode)
+(wrap-region-global-mode t)
+(whole-line-or-region-mode)
+
+;; Enable narrow-to-region command
+(put 'narrow-to-region 'disabled nil)
+
+;; Expand region by syntactic unit (word, paragraph, inner tag...)
+(global-set-key (kbd "C-c e") 'er/expand-region)
+
+;; Use findstr as grep alternative on Windows
+(if mycfg-mswindows-p
+    (progn
+      (setq grep-command "findstr /nsp ")))
+
+;; Autohotkey
+(add-to-list 'auto-mode-alist '("\\.ahk\\'" . xahk-mode))
+
+(setq projectile-enable-caching t)
+
+;; Full screen toggle
+(defun toggle-full-screen () (interactive) (shell-command "emacs_fullscreen.exe"))
+(global-set-key [f12] 'toggle-full-screen)
+
+;; exec-powershell-command 
+(defun exec-powershell-command ()
+  (interactive)
+  (let ((shell-file-name "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"))
+    (call-interactively 'shell-command)))
+(global-set-key (kbd "M-#") 'exec-powershell-command)
+
+;; Key binding to activate ace jump mode
+(define-key global-map (kbd "C-c a") 'ace-jump-mode)
+
+;; (add-hook 'server-visit-hook
+;;           '(lambda ()
+;;              ;; (if (eq (frame-visible-p (selected-frame)) 'icon) (iconify-or-deiconify-frame))
+;;              ;; (iconify-or-deiconify-frame)
+;;              ;; (iconify-or-deiconify-frame)
+;;              ;; (sleep-for 0.5)
+;;              (select-frame-set-input-focus (selected-frame)))) 
+
+;;--------------------------------------------------------------------------------------------------
+;; Control-Lock
+;;--------------------------------------------------------------------------------------------------
+;; (require 'control-lock)
+;; (global-set-key (kbd "C-,") 'control-lock-enable)
+
+;;--------------------------------------------------------------------------------------------------
+;; Windows mode (session management)
+;;--------------------------------------------------------------------------------------------------
+(win:startup-with-window)
+
+;;--------------------------------------------------------------------------------------------------
+;; Aspell
+;;--------------------------------------------------------------------------------------------------
+(require 'ispell)
+(setq ispell-program-name "aspell")
+(setq ispell-process-directory "~/.emacs.d/personal/aspell")
+;; (setq ispell-extra-args '("--personal" (concat (getenv "HOME") "\\.emacs.d\\personal\\aspell.dict")))
+(setq ispell-dictionary "german8")
+;; (setq ispell-personal-dictionary (concat (getenv "HOME") "\\.emacs.d\\personal\\aspell.dict")) ;; "~/.emacs.d/personal/aspell-german.dict
+
+;;--------------------------------------------------------------------------------------------------
+;; Color palette
+;;--------------------------------------------------------------------------------------------------
+(setq palette-font "Consolas-5")
+(setq palette-update-cursor-color-flag nil)
+
+;;--------------------------------------------------------------------------------------------------
+;; Dired
+;;--------------------------------------------------------------------------------------------------
+(setq ls-lisp-verbosity nil)
+
+;;--------------------------------------------------------------------------------------------------
+;; AUCTeX
+;;--------------------------------------------------------------------------------------------------
+(require 'tex-mik)
+(setq-default TeX-master "Ausarbeitung")
+(setq reftex-plug-into-AUCTeX t)
+(setq TeX-source-correlate-method (quote synctex))
+(setq TeX-source-correlate-mode t)
+(setq TeX-source-correlate-start-server t)
+(setq TeX-PDF-mode t)
+(setq TeX-view-program-selection '((output-pdf "Sumatra PDF")))
+(add-hook 'LaTeX-mode-hook
+          (lambda ()
+            (turn-on-reftex)
+            (add-to-list 'TeX-command-list
+                         '("Texify" "texify --batch --pdf --tex-option=\"--synctex=1 --interaction=nonstopmode --aux-directory=tmp\" %t" TeX-run-command t (latex-mode)
+                           :help "Texify document to pdf (resolves all cross-references, etc.)") t)
+            (setq TeX-command-default "Texify")))
+
+;;--------------------------------------------------------------------------------------------------
+;; multi-web-mode
+;;--------------------------------------------------------------------------------------------------
+(require 'multi-web-mode)
+(setq mweb-default-major-mode 'html-mode)
+(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
+                  (js-mode "<script +\\(type=\"text/javascript\"\\|language=\"javascript\"\\)[^>]*>" "</script>")
+                  (css-mode "<style +type=\"text/css\"[^>]*>" "</style>")))
+(setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5"))
+(multi-web-global-mode 1)
+
+;;--------------------------------------------------------------------------------------------------
+;; Ange-FTP
+;;--------------------------------------------------------------------------------------------------
+(setq ange-ftp-try-passive-mode t)
+(setq ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v" "-p"))
+
+;;--------------------------------------------------------------------------------------------------
+;; uniquify - show part of the path in buffer name to quickly find the right one
+;;--------------------------------------------------------------------------------------------------
+(require 'uniquify)
+(setq uniquify-buffer-name-style 'forward)
+
+;;--------------------------------------------------------------------------------------------------
+;; SGML/HTML mode
+;;--------------------------------------------------------------------------------------------------
+;; Auto-close HTML tags
+(add-hook 'html-mode-hook
+          (lambda ()
+            (push ?<
+                  (getf autopair-dont-pair :never))
+            ;; (evil-define-key 'insert html-mode-map (kbd "C-<") 'sgml-close-tag)
+            ))
+(setq nxml-slash-auto-complete-flag t)
+(add-hook 'sgml-mode-hook 'hl-tags-mode)
+(add-hook 'sgml-mode-hook 'zencoding-mode)
+(add-hook 'nxml-mode-hook 'hl-tags-mode)
+
+;;--------------------------------------------------------------------------------------------------
+;; windmove
+;;--------------------------------------------------------------------------------------------------
+;; use shift + arrow keys to switch between visible buffers
+(require 'windmove)
+(windmove-default-keybindings 'meta)
+(windmove-default-keybindings)
+
+;;--------------------------------------------------------------------------------------------------
+;; org-mode
+;;--------------------------------------------------------------------------------------------------
+(setq org-default-notes-file (concat org-directory "\\Ablage.org"))
+(global-set-key "\C-cc" 'org-capture)
+(setq org-fontify-done-headline t)
+(setq org-startup-indented t)
+(setq org-velocity-bucket (expand-file-name "Ablage.org" org-directory))
+(setq org-archive-location (concat org-directory "\\Archiv.org::* Aus Datei %s"))
+
+;;--------------------------------------------------------------------------------------------------
+;; recentf stuff
+;;--------------------------------------------------------------------------------------------------
+(require 'recentf)
+(recentf-mode 1)
+(setq recentf-max-menu-items 50)
+(global-set-key "\C-x\ \C-r" 'recentf-open-files)
+
+;;--------------------------------------------------------------------------------------------------
+;; ido-mode
+;;--------------------------------------------------------------------------------------------------
+(ido-mode t)
+(setq ido-enable-prefix nil
+      ido-enable-flex-matching t
+      ido-create-new-buffer 'always
+      ido-use-filename-at-point 'guess
+      ido-max-prospects 10
+      ido-default-file-method 'selected-window)
+
+;;--------------------------------------------------------------------------------------------------
+;; hippie expand
+;;--------------------------------------------------------------------------------------------------
+(setq hippie-expand-try-functions-list '(try-expand-dabbrev
+                                         try-expand-dabbrev-all-buffers
+                                         try-expand-dabbrev-from-kill
+                                         try-complete-file-name-partially
+                                         try-complete-file-name
+                                         try-expand-all-abbrevs
+                                         try-expand-list
+                                         try-expand-line
+                                         try-complete-lisp-symbol-partially
+                                         try-complete-lisp-symbol))
+
+;;--------------------------------------------------------------------------------------------------
+;; ack-and-a-half
+;;--------------------------------------------------------------------------------------------------
+(defalias 'ack 'ack-and-a-half)
+(defalias 'ack-same 'ack-and-a-half-same)
+(defalias 'ack-find-file 'ack-and-a-half-find-file)
+(defalias 'ack-find-file-same 'ack-and-a-half-find-file-same)
+;; (setq ack-and-a-half-use-environment nil)
+
+;;--------------------------------------------------------------------------------------------------
+;; evil-surround
+;;--------------------------------------------------------------------------------------------------
+;; (global-surround-mode 1)
+
+;;--------------------------------------------------------------------------------------------------
+;; helm
+;;--------------------------------------------------------------------------------------------------
+(setq helm-idle-delay 0.5)
+
+;;--------------------------------------------------------------------------------------------------
+;; fill-column-indicator
+;;--------------------------------------------------------------------------------------------------
+(setq fci-rule-column 100)
+;; (define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1)))
+;; (global-fci-mode 1)
+
+;;--------------------------------------------------------------------------------------------------
+;; dos-mode
+;;--------------------------------------------------------------------------------------------------
+(add-to-list 'auto-mode-alist '("\\.bat\\'" . dos-mode))
+(add-to-list 'auto-mode-alist '("\\.cmd\\'" . dos-mode))
+
+;;--------------------------------------------------------------------------------------------------
+;; powershell-mode
+;;--------------------------------------------------------------------------------------------------
+;; Load powershell-mode for files with *.ps1 and *.psm1 extension
+(add-to-list 'auto-mode-alist '("\\.ps1\\'" . powershell-mode))
+(add-to-list 'auto-mode-alist '("\\.psm1\\'" . powershell-mode))
+
+;;--------------------------------------------------------------------------------------------------
+;; hideshowvis
+;;--------------------------------------------------------------------------------------------------
+(define-fringe-bitmap 'hs-marker [0 24 24 126 126 24 24 0])
+
+(defcustom hs-fringe-face 'hs-fringe-face
+  "*Specify face used to highlight the fringe on hidden regions."
+  :type 'face
+  :group 'hideshow)
+
+(defface hs-fringe-face
+  '((t (:foreground "#888" :box (:line-width 2 :color "grey75" :style released-button))))
+  "Face used to highlight the fringe on folded regions"
+  :group 'hideshow)
+
+(defcustom hs-face 'hs-face
+  "*Specify the face to to use for the hidden region indicator"
+  :type 'face
+  :group 'hideshow)
+
+(defface hs-face
+  '((t (:background "#ff8" :box t)))
+  "Face to hightlight the ... area of hidden regions"
+  :group 'hideshow)
+
+(defun display-code-line-counts (ov)
+  (when (eq 'code (overlay-get ov 'hs))
+    (let* ((marker-string "*fringe-dummy*")
+           (marker-length (length marker-string))
+           (display-string (format "(%d)..." (count-lines (overlay-start ov) (overlay-end ov))))
+           )
+      (overlay-put ov 'help-echo "Hiddent text. C-c,= to show")
+      (put-text-property 0 marker-length 'display (list 'left-fringe 'hs-marker 'hs-fringe-face) marker-string)
+      (overlay-put ov 'before-string marker-string)
+      (put-text-property 0 (length display-string) 'face 'hs-face display-string)
+      (overlay-put ov 'display display-string)
+      )))
+
+(setq hs-set-up-overlay 'display-code-line-counts)

startup/global-before-init.el

+(setq win:switch-prefix "\C-cw")

startup/global.el

-;; Deactivate GUI elements
-;;(menu-bar-mode -1)
-(tool-bar-mode -1)
-(toggle-scroll-bar -1)
-(show-paren-mode 1)
-
-;; Theme and font
-;; (load-theme 'sanityinc-tomorrow-night t)
-;; (setq-default cursor-type 'bar)
-(load-theme 'dichromacy t)
-(set-face-attribute 'default nil :font "Consolas-10")
-
-;; Default coding system
-(set-keyboard-coding-system 'windows-1252-dos)
-(prefer-coding-system 'windows-1252-dos)
-;; (set-default-coding-systems 'windows-1252)
-
-;; Backup & temporary file settings
-(setq default-directory "~")
-(setq backup-directory-alist `((".*" . ,temporary-file-directory)))
-(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
-(setq delete-old-versions t)
-
-;; Deactivate startup screen and ring bell sound
-(setq inhibit-startup-message t)
-(setq inhibit-startup-echo-area-message t)
-;;'(warning-minimum-level :error)
-(setq ring-bell-function 'ignore)
-
-;; Fast, smoother scrolling
-(setq redisplay-dont-pause t)
-(setq-default bidi-display-reordering nil)
-(setq auto-window-vscroll nil)
-;; (setq scroll-margin 1)
-(setq scroll-step 0)
-(setq scroll-conservatively most-positive-fixnum)
-(setq scroll-preserve-screen-position t)
-(setq mouse-wheel-scroll-amount '(5 ((shift) . 1)))
-(setq mouse-wheel-progressive-speed nil)
-(setq mouse-wheel-follow-mouse t)
-(global-set-key (kbd "M-n") (lambda () (interactive) (scroll-up-command 1)))
-(global-set-key (kbd "M-p") (lambda () (interactive) (scroll-down-command 1)))
-
-;; Indendation settings
-(setq-default indent-tabs-mode nil)
-(setq-default tab-width 4)
-(setq-default c-basic-offset 4)
-(setq-default c-basic-indent 4)
-(setq c-default-style "java")
-(setq tab-stop-list (mapcar (lambda (x) (* 4 x))
-                            (number-sequence 1 (/ 120 4))))
-(setq-default sgml-basic-offset 4)
-
-(column-number-mode t)
-;;(global-linum-mode t)
-;;(global-hl-line-mode t)
-
-(setq cua-enable-cua-keys nil) ;; only for rectangles
-(setq-default truncate-lines t)
-
-;; Highlight lines longer than 100 characters in whitespace-mode
-(setq whitespace-line-column 100)
-
-;; Zoom in and out (increase/decrease font size) with mouse scroller
-(global-set-key [C-wheel-up] 'text-scale-increase)
-(global-set-key [C-wheel-down] 'text-scale-decrease)
-
-;; move selected text via Alt-Shift-Up/Down
-(move-text-default-bindings)
-
-;; auto-completion in minibuffer
-(icomplete-mode +1)
-
-(autopair-global-mode)
-(wrap-region-global-mode t)
-(whole-line-or-region-mode)
-
-;; Enable narrow-to-region command
-(put 'narrow-to-region 'disabled nil)
-
-;; Expand region by syntactic unit (word, paragraph, inner tag...)
-(global-set-key (kbd "C-c e") 'er/expand-region)
-
-;; Use findstr as grep alternative on Windows
-(if mycfg-mswindows-p
-    (progn
-      (setq grep-command "findstr /nsp ")))
-
-;; Autohotkey
-(add-to-list 'auto-mode-alist '("\\.ahk\\'" . xahk-mode))
-
-(setq projectile-enable-caching t)
-
-;; Full screen toggle
-(defun toggle-full-screen () (interactive) (shell-command "emacs_fullscreen.exe"))
-(global-set-key [f12] 'toggle-full-screen)
-
-;; exec-powershell-command 
-(defun exec-powershell-command ()
-  (interactive)
-  (let ((shell-file-name "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"))
-    (call-interactively 'shell-command)))
-(global-set-key (kbd "M-#") 'exec-powershell-command)
-
-;; Key binding to activate ace jump mode
-(define-key global-map (kbd "C-c a") 'ace-jump-mode)
-
-;; (add-hook 'server-visit-hook
-;;           '(lambda ()
-;;              ;; (if (eq (frame-visible-p (selected-frame)) 'icon) (iconify-or-deiconify-frame))
-;;              ;; (iconify-or-deiconify-frame)
-;;              ;; (iconify-or-deiconify-frame)
-;;              ;; (sleep-for 0.5)
-;;              (select-frame-set-input-focus (selected-frame)))) 
-
-;;--------------------------------------------------------------------------------------------------
-;; Control-Lock
-;;--------------------------------------------------------------------------------------------------
-;; (require 'control-lock)
-;; (global-set-key (kbd "C-,") 'control-lock-enable)
-
-;;--------------------------------------------------------------------------------------------------
-;; Aspell
-;;--------------------------------------------------------------------------------------------------
-(require 'ispell)
-(setq ispell-program-name "aspell")
-(setq ispell-process-directory "~/.emacs.d/personal/aspell")
-;; (setq ispell-extra-args '("--personal" (concat (getenv "HOME") "\\.emacs.d\\personal\\aspell.dict")))
-(setq ispell-dictionary "german8")
-;; (setq ispell-personal-dictionary (concat (getenv "HOME") "\\.emacs.d\\personal\\aspell.dict")) ;; "~/.emacs.d/personal/aspell-german.dict
-
-;;--------------------------------------------------------------------------------------------------
-;; Color palette
-;;--------------------------------------------------------------------------------------------------
-(setq palette-font "Consolas-5")
-(setq palette-update-cursor-color-flag nil)
-
-;;--------------------------------------------------------------------------------------------------
-;; Dired
-;;--------------------------------------------------------------------------------------------------
-(setq ls-lisp-verbosity nil)
-
-;;--------------------------------------------------------------------------------------------------
-;; AUCTeX
-;;--------------------------------------------------------------------------------------------------
-(require 'tex-mik)
-(setq-default TeX-master "Ausarbeitung")
-(setq reftex-plug-into-AUCTeX t)
-(setq TeX-source-correlate-method (quote synctex))
-(setq TeX-source-correlate-mode t)
-(setq TeX-source-correlate-start-server t)
-(setq TeX-PDF-mode t)
-(setq TeX-view-program-selection '((output-pdf "Sumatra PDF")))
-(add-hook 'LaTeX-mode-hook
-          (lambda ()
-            (turn-on-reftex)
-            (add-to-list 'TeX-command-list
-                         '("Texify" "texify --batch --pdf --tex-option=\"--synctex=1 --interaction=nonstopmode --aux-directory=tmp\" %t" TeX-run-command t (latex-mode)
-                           :help "Texify document to pdf (resolves all cross-references, etc.)") t)
-            (setq TeX-command-default "Texify")))
-
-;;--------------------------------------------------------------------------------------------------
-;; multi-web-mode
-;;--------------------------------------------------------------------------------------------------
-(require 'multi-web-mode)
-(setq mweb-default-major-mode 'html-mode)
-(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
-                  (js-mode "<script +\\(type=\"text/javascript\"\\|language=\"javascript\"\\)[^>]*>" "</script>")
-                  (css-mode "<style +type=\"text/css\"[^>]*>" "</style>")))
-(setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5"))
-(multi-web-global-mode 1)
-
-;;--------------------------------------------------------------------------------------------------
-;; Ange-FTP
-;;--------------------------------------------------------------------------------------------------
-(setq ange-ftp-try-passive-mode t)
-(setq ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v" "-p"))
-
-;;--------------------------------------------------------------------------------------------------
-;; uniquify - show part of the path in buffer name to quickly find the right one
-;;--------------------------------------------------------------------------------------------------
-(require 'uniquify)
-(setq uniquify-buffer-name-style 'forward)
-
-;;--------------------------------------------------------------------------------------------------
-;; SGML/HTML mode
-;;--------------------------------------------------------------------------------------------------
-;; Auto-close HTML tags
-(add-hook 'html-mode-hook
-          (lambda ()
-            (push ?<
-                  (getf autopair-dont-pair :never))
-            ;; (evil-define-key 'insert html-mode-map (kbd "C-<") 'sgml-close-tag)
-            ))
-(setq nxml-slash-auto-complete-flag t)
-(add-hook 'sgml-mode-hook 'hl-tags-mode)
-(add-hook 'sgml-mode-hook 'zencoding-mode)
-(add-hook 'nxml-mode-hook 'hl-tags-mode)
-
-;;--------------------------------------------------------------------------------------------------
-;; windmove
-;;--------------------------------------------------------------------------------------------------
-;; use shift + arrow keys to switch between visible buffers
-(require 'windmove)
-(windmove-default-keybindings 'meta)
-(windmove-default-keybindings)
-
-;;--------------------------------------------------------------------------------------------------
-;; org-mode
-;;--------------------------------------------------------------------------------------------------
-(setq org-default-notes-file (concat org-directory "\\Ablage.org"))
-(global-set-key "\C-cc" 'org-capture)
-(setq org-fontify-done-headline t)
-(setq org-startup-indented t)
-(setq org-velocity-bucket (expand-file-name "Ablage.org" org-directory))
-(setq org-archive-location (concat org-directory "\\Archiv.org::* Aus Datei %s"))
-
-;;--------------------------------------------------------------------------------------------------
-;; recentf stuff
-;;--------------------------------------------------------------------------------------------------
-(require 'recentf)
-(recentf-mode 1)
-(setq recentf-max-menu-items 50)
-(global-set-key "\C-x\ \C-r" 'recentf-open-files)
-
-;;--------------------------------------------------------------------------------------------------
-;; ido-mode
-;;--------------------------------------------------------------------------------------------------
-(ido-mode t)
-(setq ido-enable-prefix nil
-      ido-enable-flex-matching t
-      ido-create-new-buffer 'always
-      ido-use-filename-at-point 'guess
-      ido-max-prospects 10
-      ido-default-file-method 'selected-window)
-
-;;--------------------------------------------------------------------------------------------------
-;; hippie expand
-;;--------------------------------------------------------------------------------------------------
-(setq hippie-expand-try-functions-list '(try-expand-dabbrev
-                                         try-expand-dabbrev-all-buffers
-                                         try-expand-dabbrev-from-kill
-                                         try-complete-file-name-partially
-                                         try-complete-file-name
-                                         try-expand-all-abbrevs
-                                         try-expand-list
-                                         try-expand-line
-                                         try-complete-lisp-symbol-partially
-                                         try-complete-lisp-symbol))
-
-;;--------------------------------------------------------------------------------------------------
-;; ack-and-a-half
-;;--------------------------------------------------------------------------------------------------
-(defalias 'ack 'ack-and-a-half)
-(defalias 'ack-same 'ack-and-a-half-same)
-(defalias 'ack-find-file 'ack-and-a-half-find-file)
-(defalias 'ack-find-file-same 'ack-and-a-half-find-file-same)
-;; (setq ack-and-a-half-use-environment nil)
-
-;;--------------------------------------------------------------------------------------------------
-;; evil-surround
-;;--------------------------------------------------------------------------------------------------
-;; (global-surround-mode 1)
-
-;;--------------------------------------------------------------------------------------------------
-;; helm
-;;--------------------------------------------------------------------------------------------------
-(setq helm-idle-delay 0.5)
-
-;;--------------------------------------------------------------------------------------------------
-;; fill-column-indicator
-;;--------------------------------------------------------------------------------------------------
-(setq fci-rule-column 100)
-;; (define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1)))
-;; (global-fci-mode 1)
-
-;;--------------------------------------------------------------------------------------------------
-;; dos-mode
-;;--------------------------------------------------------------------------------------------------
-(add-to-list 'auto-mode-alist '("\\.bat\\'" . dos-mode))
-(add-to-list 'auto-mode-alist '("\\.cmd\\'" . dos-mode))
-
-;;--------------------------------------------------------------------------------------------------
-;; powershell-mode
-;;--------------------------------------------------------------------------------------------------
-;; Load powershell-mode for files with *.ps1 and *.psm1 extension
-(add-to-list 'auto-mode-alist '("\\.ps1\\'" . powershell-mode))
-(add-to-list 'auto-mode-alist '("\\.psm1\\'" . powershell-mode))
-
-;;--------------------------------------------------------------------------------------------------
-;; hideshowvis
-;;--------------------------------------------------------------------------------------------------
-(define-fringe-bitmap 'hs-marker [0 24 24 126 126 24 24 0])
-
-(defcustom hs-fringe-face 'hs-fringe-face
-  "*Specify face used to highlight the fringe on hidden regions."
-  :type 'face
-  :group 'hideshow)
-
-(defface hs-fringe-face
-  '((t (:foreground "#888" :box (:line-width 2 :color "grey75" :style released-button))))
-  "Face used to highlight the fringe on folded regions"
-  :group 'hideshow)
-
-(defcustom hs-face 'hs-face
-  "*Specify the face to to use for the hidden region indicator"
-  :type 'face
-  :group 'hideshow)
-
-(defface hs-face
-  '((t (:background "#ff8" :box t)))
-  "Face to hightlight the ... area of hidden regions"
-  :group 'hideshow)
-
-(defun display-code-line-counts (ov)
-  (when (eq 'code (overlay-get ov 'hs))
-    (let* ((marker-string "*fringe-dummy*")
-           (marker-length (length marker-string))
-           (display-string (format "(%d)..." (count-lines (overlay-start ov) (overlay-end ov))))
-           )
-      (overlay-put ov 'help-echo "Hiddent text. C-c,= to show")
-      (put-text-property 0 marker-length 'display (list 'left-fringe 'hs-marker 'hs-fringe-face) marker-string)
-      (overlay-put ov 'before-string marker-string)
-      (put-text-property 0 (length display-string) 'face 'hs-face display-string)
-      (overlay-put ov 'display display-string)
-      )))
-
-(setq hs-set-up-overlay 'display-code-line-counts)

startup/local-before-init.el.tpl

+;; -*- mode: emacs-lisp -*-
+
+;;--------------------------------------------------------------------------------------------------
+;; Environment variables
+;;--------------------------------------------------------------------------------------------------
+;; Don't display warning when using Windows style paths
+(setenv "CYGWIN" "nodosfilewarning")
+(setenv "PATH" (concat "D:\\Apps\\Git\\cmd;D:\\Apps\\MiKTeX\\miktex\\bin;" (getenv "PATH")))
+;; (setenv "COMSPEC" "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe")
+
+;;--------------------------------------------------------------------------------------------------
+;; Emacs paths containing executables
+;;--------------------------------------------------------------------------------------------------
+;; (push "D:/Apps/GnuWin/bin" exec-path)
+(push "D:/Apps/Git/cmd" exec-path)
+
+;;--------------------------------------------------------------------------------------------------
+;; Org mode
+;;--------------------------------------------------------------------------------------------------
+(setq org-directory "D:\\Dropbox\\Org")
+
+;;--------------------------------------------------------------------------------------------------
+;; Remote transfer settings: FTP, SSH ...
+;;--------------------------------------------------------------------------------------------------
+(setq ange-ftp-ftp-program-name "D:\\Cygwin\\bin\\ftp.exe")
+;; (setq ange-ftp-ftp-program-name (concat (getenv "HOME") "\\.emacs.d\\vendor\\bin\\ftp.exe"))
+(setq tls-program '("D:\\Cygwin\\bin\\openssl.exe s_client -connect %h:%p -no_ssl2 -ign_eof"))
+
+;;--------------------------------------------------------------------------------------------------
+;; Diff settings
+;;--------------------------------------------------------------------------------------------------
+(setq ediff-diff-program "D:\\Cygwin\\bin\\diff.exe")
+(setq ediff-diff3-program "D:\\Cygwin\\bin\\diff3.exe")
+
+;;--------------------------------------------------------------------------------------------------
+;; AUCTeX
+;;--------------------------------------------------------------------------------------------------
+(setq TeX-view-program-list
+             (quote (("Sumatra PDF" "D:\\Apps\\SumatraPDF\\SumatraPDF.exe -reuse-instance %o"))))
+
+