104 lines
2.9 KiB
EmacsLisp
104 lines
2.9 KiB
EmacsLisp
;;;;
|
|
;;;;;; -*- 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"))
|
|
'(scroll-bar-mode nil)
|
|
'(show-paren-mode t)
|
|
'(tool-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
|
|
(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
|
|
(shell)
|
|
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
|
|
|
|
;; 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)
|
|
|
|
;; enable some commands disabled by default
|
|
(put 'narrow-to-region 'disabled nil)
|
|
(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)
|
|
|
|
;; 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"))
|