dotfiles-emacs/.emacs.d/config/base.el

85 lines
2 KiB
EmacsLisp
Raw Normal View History

2019-07-10 23:27:54 +02:00
;; use UTF-8 for file name encoding
(setq file-name-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
;; enable some commands disabled by default
(put 'narrow-to-region 'disabled nil)
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
;; no fancy graphic stuff, you don't want to use the mouse anyway, do
;; you?
(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))
(setq use-dialog-box nil)
;; add key sequences
(global-set-key "\C-c\l" 'goto-line)
;; syntax coloring
(global-font-lock-mode t)
2023-05-10 11:31:52 +02:00
;; syntax coloring
(global-display-fill-column-indicator-mode t)
2019-07-10 23:27:54 +02:00
;; paren matching
(show-paren-mode t)
;; display of current function (which-function-mode)
(which-function-mode 1)
;; VC is mostly useless for modern DVCSs
(setq vc-handled-backends nil)
;; configure the browser
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "firefox")
2019-07-10 23:27:54 +02:00
;; use space instead of tabs
(setq-default indent-tabs-mode nil)
;; yank at cursor not mouse pointer
(setq mouse-yank-at-point t)
;; make the screen go down with one line & mouse wheel support
(setq scroll-step 1)
(mouse-wheel-mode t)
2020-08-25 10:53:40 +02:00
;; clipboard yanking is possible with middle mouse button now
(setq x-select-enable-clipboard t
x-select-enable-primary t)
2019-07-10 23:27:54 +02:00
;; enhanced buffer switching with shift + arrows
(windmove-default-keybindings)
;; resize cursor to character
(setq x-stretch-cursor t)
;; set tab width to 4 whitespaces
(setq tab-width 4)
(setq-default cperl-indent-level tab-width)
;; More history
(setq-default history-length 1000)
;; delete trailing whitespaces before saving
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; add newlines at eof
(setq require-final-newline t)
;; enable number-modes
(setq line-number-mode t)
(setq column-number-mode t)
;; show paren mode
(setq show-paren-mode t)
;; no am/pm in timestamps
(setq display-time-24hr-format t)
;; configure theme
(custom-set-variables
'(custom-enabled-themes (quote (tango-dark))))