2015-09-19 23:52:34 +02:00
|
|
|
;;;;
|
|
|
|
;;;;;; -*- Mode: Emacs-Lisp -*-
|
|
|
|
;;;;
|
|
|
|
|
2018-05-08 15:50:25 +02:00
|
|
|
;; 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)
|
|
|
|
|
2018-05-22 09:40:19 +02:00
|
|
|
;; 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)
|
|
|
|
|
2015-09-19 23:52:34 +02:00
|
|
|
;; theme
|
|
|
|
(custom-set-variables
|
2018-05-22 09:40:19 +02:00
|
|
|
;; 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.
|
2015-09-19 23:52:34 +02:00
|
|
|
'(column-number-mode t)
|
|
|
|
'(custom-enabled-themes (quote (tango-dark)))
|
2018-05-14 16:43:47 +02:00
|
|
|
'(menu-bar-mode nil)
|
2018-05-28 15:18:52 +02:00
|
|
|
'(package-selected-packages (quote (flycheck-yamllint yaml-mode magit pass pinentry)))
|
2018-05-08 15:50:25 +02:00
|
|
|
'(scroll-bar-mode nil)
|
2018-05-14 16:43:47 +02:00
|
|
|
'(show-paren-mode t)
|
|
|
|
'(tool-bar-mode nil))
|
|
|
|
|
|
|
|
;; yank at cursor not mouse pointer
|
|
|
|
(setq mouse-yank-at-point t)
|
2015-09-19 23:52:34 +02:00
|
|
|
|
2018-05-08 15:50:25 +02:00
|
|
|
;; make the screen go down with one line & mouse wheel support
|
2015-09-19 23:52:34 +02:00
|
|
|
(setq scroll-step 1)
|
|
|
|
(mouse-wheel-mode t)
|
|
|
|
|
2018-05-08 15:50:25 +02:00
|
|
|
;; 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
|
2015-09-19 23:52:34 +02:00
|
|
|
(line-number-mode 1)
|
|
|
|
(column-number-mode 1)
|
|
|
|
|
2018-05-08 15:50:25 +02:00
|
|
|
;; enhanced buffer switching
|
2015-09-19 23:52:34 +02:00
|
|
|
(windmove-default-keybindings)
|
|
|
|
|
2018-05-08 15:50:25 +02:00
|
|
|
;; display of current function (which-function-mode)
|
2015-09-19 23:52:34 +02:00
|
|
|
(which-function-mode 1)
|
|
|
|
|
2018-05-08 15:50:25 +02:00
|
|
|
;; no am/pm in timestamps
|
2015-09-19 23:52:34 +02:00
|
|
|
(setq display-time-24hr-format t)
|
|
|
|
|
2018-05-14 16:43:47 +02:00
|
|
|
;; clipboard yanking is possible with middle mouse button now
|
|
|
|
(setq x-select-enable-clipboard t
|
|
|
|
x-select-enable-primary 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)
|
|
|
|
|
2018-05-08 15:50:25 +02:00
|
|
|
;; 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)
|
2016-06-20 14:05:19 +02:00
|
|
|
|
|
|
|
;; tramp mode ssh (faster)
|
|
|
|
(setq tramp-default-method "ssh")
|
|
|
|
|
2018-05-23 11:27:06 +02:00
|
|
|
;; set pass default password length
|
|
|
|
(setq password-store-password-length 32)
|
|
|
|
|
2018-05-08 15:50:25 +02:00
|
|
|
;; include other configs
|
|
|
|
;; calendar-mode
|
|
|
|
(if (file-exists-p "~/.emacs.d/calendar.el")
|
|
|
|
(load-file "~/.emacs.d/calendar.el"))
|