2015-09-19 23:52:34 +02:00
|
|
|
;;;;
|
|
|
|
;;;;;; -*- Mode: Emacs-Lisp -*-
|
|
|
|
;;;;
|
|
|
|
|
|
|
|
;; 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"))
|
2015-11-26 17:33:06 +01:00
|
|
|
'(scroll-bar-mode nil)
|
2015-09-19 23:52:34 +02:00
|
|
|
'(show-paren-mode t)
|
|
|
|
'(tool-bar-mode nil))
|
|
|
|
|
2015-09-20 00:08:37 +02:00
|
|
|
;; Use UTF-8 for file name encoding
|
|
|
|
(setq file-name-coding-system 'utf-8)
|
|
|
|
(prefer-coding-system 'utf-8)
|
|
|
|
|
2015-09-19 23:52:34 +02:00
|
|
|
;; 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
|
|
|
|
(setq scroll-step 1)
|
|
|
|
(mouse-wheel-mode t)
|
|
|
|
|
|
|
|
;; Enable line, linum and column numbering
|
|
|
|
(line-number-mode 1)
|
|
|
|
(column-number-mode 1)
|
|
|
|
|
|
|
|
;; Enhanced buffer switching
|
|
|
|
(windmove-default-keybindings)
|
|
|
|
|
|
|
|
;; Paren matching
|
|
|
|
(show-paren-mode t)
|
|
|
|
|
|
|
|
;; Calender no Su at beginning
|
|
|
|
(setq european-calender-style t)
|
|
|
|
|
|
|
|
;; Run a shell with zsh
|
2016-01-05 14:47:39 +01:00
|
|
|
;;(shell)
|
|
|
|
;;(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
|
2015-09-19 23:52:34 +02:00
|
|
|
|
|
|
|
;; 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
|
|
|
|
(setq display-time-24hr-format t)
|
|
|
|
|
2015-09-20 00:08:37 +02:00
|
|
|
;; enable some commands disabled by default
|
|
|
|
(put 'narrow-to-region 'disabled nil)
|
|
|
|
(put 'upcase-region 'disabled nil)
|
2015-09-19 23:52:34 +02:00
|
|
|
(put 'downcase-region 'disabled nil)
|
|
|
|
|
2015-09-20 00:08:37 +02:00
|
|
|
;; 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)
|
|
|
|
|
|
|
|
;; arduino mode
|
2015-09-19 23:52:34 +02:00
|
|
|
''(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)
|
2015-09-20 00:08:37 +02:00
|
|
|
|
2015-09-19 23:52:34 +02:00
|
|
|
(add-to-list 'load-path "~/.emacs.d/lisp")
|
|
|
|
(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"))
|
2015-11-05 22:23:45 +01:00
|
|
|
|
|
|
|
;; rust-mode
|
|
|
|
(if (file-exists-p "~/.emacs.d/rust-mode.el")
|
|
|
|
(load-file "~/.emacs.d/rust-mode.el"))
|
2016-01-12 15:43:27 +01:00
|
|
|
|
|
|
|
;; 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)))
|