107 lines
3.4 KiB
EmacsLisp
107 lines
3.4 KiB
EmacsLisp
;; General user interface and appearance
|
|
(tool-bar-mode -1)
|
|
(menu-bar-mode -1)
|
|
(scroll-bar-mode -1)
|
|
(horizontal-scroll-bar-mode -1)
|
|
(global-hl-line-mode 1)
|
|
(display-time-mode 1)
|
|
(global-prettify-symbols-mode 1)
|
|
(set-fringe-mode 10)
|
|
(setq-default display-time-format "%V %F %R %a")
|
|
(setq-default display-time-24hr-format t)
|
|
|
|
;; Cursor and mouse
|
|
(column-number-mode 1)
|
|
(mouse-wheel-mode 1)
|
|
(blink-cursor-mode -1)
|
|
|
|
;; Customization for locale, environment and computer
|
|
(setq-default european-calendar-style t)
|
|
(setq-default calendar-christian-all-holidays-flag t)
|
|
(setq-default calendar-date-style (quote iso))
|
|
(setq-default calendar-view-diary-initially-flag t)
|
|
(setq-default calendar-week-start-day 1)
|
|
(setq-default calendar-intermonth-text
|
|
'(propertize
|
|
(format "%2d"
|
|
(car
|
|
(calendar-iso-from-absolute
|
|
(calendar-absolute-from-gregorian
|
|
(list month day year )))))
|
|
'font-lock-face 'font-lock-function-name-face))
|
|
(setq-default ispell-program-name "aspell")
|
|
(setq-default grep-command "grep -i -nH -e ")
|
|
|
|
(when (eq system-type 'gnu/linux)
|
|
(setq-default shell-file-name "/bin/bash")
|
|
(setq-default tex-shell-file-name "/bin/bash"))
|
|
|
|
;; Files and sessions
|
|
(setq-default auto-save-timeout 60)
|
|
|
|
;; Tabs, spaces, lines and parenthesis
|
|
(show-paren-mode 1)
|
|
(setq-default indent-tabs-mode nil)
|
|
(setq-default line-spacing nil)
|
|
(setq-default make-backup-files nil)
|
|
|
|
(setq tab-width 4)
|
|
(setq sentence-end-double-space nil)
|
|
(setq next-line-add-newlines t)
|
|
(setq require-final-newline t)
|
|
|
|
;; Miscellaneous
|
|
(require 'cl-lib)
|
|
(setq default-major-mode 'text-mode)
|
|
(setq-default inhibit-startup-buffer-menu t
|
|
inhibit-startup-screen t)
|
|
(setq-default tramp-default-method "ssh")
|
|
(put 'narrow-to-region 'disabled nil)
|
|
(put 'narrow-to-page 'disabled nil)
|
|
(add-hook 'text-mode-hook 'turn-on-auto-fill)
|
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
|
|
|
;; Mode line
|
|
(setq-default mode-line-format
|
|
'((""
|
|
mode-line-modified
|
|
mode-line-frame-control "%b %z%n "
|
|
mode-name
|
|
vc-mode
|
|
" "
|
|
mode-line-position
|
|
mode-line-misc-info
|
|
minor-mode-alist
|
|
mode-line-end-spaces "%-"
|
|
)))
|
|
|
|
;; Disable line numbers in modes
|
|
(dolist (mode '(org-mode-hook
|
|
term-mode-hook
|
|
shell-mode-hook
|
|
eshell-mode-hook))
|
|
(add-hook mode (lambda () (display-line-numbers-mode 0))))
|
|
|
|
(add-hook 'after-save-hook
|
|
'executable-make-buffer-file-executable-if-script-p)
|
|
|
|
(global-set-key (kbd "M-i") 'imenu)
|
|
;;(global-set-key (kbd "M-[") 'tab-bar-history-back)
|
|
;;(global-set-key (kbd "M-]") 'tab-bar-history-forward)
|
|
|
|
(add-hook 'diary-display-hook 'fancy-diary-display)
|
|
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
|
|
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
|
|
(add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
|
|
(add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files)
|
|
(setq compilation-ask-about-save nil)
|
|
(setq vc-handled-backends '(Git Hg)) ;; Only use Git and Hg for VC
|
|
|
|
(setq default-frame-alist
|
|
'((font . "MonoLisa-12")
|
|
(width . 92)
|
|
(height . 62)
|
|
(alpha . 100)
|
|
(fullscreen . maximized)
|
|
(horizontal-scroll-bars)
|
|
(vertical-scroll-bars)))
|