emacs.d/bundle/bundle--defaults.el

116 lines
3.7 KiB
EmacsLisp
Raw Normal View History

;; General userinterface and appearance
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(horizontal-scroll-bar-mode -1)
(global-hl-line-mode 1)
(define-key menu-bar-tools-menu [games] nil)
2020-11-26 21:06:58 +01:00
(setq-default display-time-format "%V %F %R %a")
2020-11-26 17:49:32 +01:00
(setq-default display-time-24hr-format t)
2020-11-26 17:57:36 +01:00
(display-time-mode 1)
2020-11-19 19:48:22 +01:00
(global-prettify-symbols-mode 1)
2021-04-29 22:37:03 +02:00
(set-fringe-mode 10)
;; Cursor and mouse
2020-12-01 17:32:43 +01:00
(column-number-mode 1)
(mouse-wheel-mode 1)
(blink-cursor-mode -1)
;; Customization for locale, environment and computer
2020-11-21 14:37:26 +01:00
(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)
2020-11-25 08:45:20 +01:00
(setq-default calendar-intermonth-text
'(propertize
(format "%2d"
(car
(calendar-iso-from-absolute
(calendar-absolute-from-gregorian
2020-11-26 21:06:58 +01:00
(list month day year )))))
2020-11-25 08:45:20 +01:00
'font-lock-face 'font-lock-function-name-face))
(setq-default ispell-program-name "aspell")
(setq-default grep-command "grep -i -nH -e ")
2020-11-26 21:06:58 +01:00
(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)
2020-11-21 14:37:26 +01:00
(setq require-final-newline t)
;; Miscellaneous
(require 'cl-lib)
2020-11-21 14:37:26 +01:00
(setq default-major-mode 'text-mode)
(setq-default inhibit-startup-buffer-menu t
inhibit-startup-screen t)
2020-11-21 14:37:26 +01:00
(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)
(setq dracula-enlarge-headings nil)
2020-11-21 14:37:26 +01:00
;; Windows, Frames
(setq default-frame-alist
'((font . "Fira Code-11")
2021-01-10 10:14:51 +01:00
(width . 94)
(height . 70)))
2020-11-26 20:54:37 +01:00
(setq initial-frame-alist
'((fullscreen . maximized)))
2020-11-26 20:54:37 +01:00
;; Mode line
(setq-default mode-line-format
2020-12-02 17:43:34 +01:00
'((""
mode-line-modified
2020-12-02 17:48:32 +01:00
mode-line-frame-control "%b %z%n "
2020-12-01 17:32:43 +01:00
mode-name
vc-mode
2020-12-02 08:14:03 +01:00
" "
2020-12-01 17:32:43 +01:00
mode-line-position
mode-line-misc-info
2020-12-02 17:43:34 +01:00
minor-mode-alist
mode-line-end-spaces "%-"
2020-12-01 17:32:43 +01:00
)))
2021-04-30 07:50:32 +02:00
;; 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))))
;; display Info files produced by Sphinx using the value hide for Info-hide-note-references
(defadvice info-insert-file-contents (after
sphinx-info-insert-file-contents
activate)
"Hack to make `Info-hide-note-references' buffer-local and
automatically set to `hide' iff it can be determined that this file
was created from a Texinfo file generated by Docutils or Sphinx."
(set (make-local-variable 'Info-hide-note-references)
(default-value 'Info-hide-note-references))
(save-excursion
(save-restriction
(widen) (goto-char (point-min))
(when (re-search-forward
"^Generated by \\(Sphinx\\|Docutils\\)"
(save-excursion (search-forward "\x1f" nil t)) t)
(set (make-local-variable 'Info-hide-note-references)
'hide)))))
2021-11-04 08:29:13 +01:00
(add-hook 'after-save-hook
'executable-make-buffer-file-executable-if-script-p)