Move core Emacs settings to emacs-config
This commit is contained in:
parent
6af0e36649
commit
9a86ed1239
2 changed files with 0 additions and 83 deletions
|
@ -43,22 +43,6 @@
|
||||||
|
|
||||||
;;;; Settings
|
;;;; Settings
|
||||||
|
|
||||||
;;; Put backup and auto save files in their own directories so they
|
|
||||||
;;; don't clutter the rest of the filesystem.
|
|
||||||
(setq backup-directory-alist
|
|
||||||
`((".*" . ,(concat user-emacs-directory "data/backup-files"))))
|
|
||||||
|
|
||||||
(add-to-list
|
|
||||||
'auto-save-file-name-transforms
|
|
||||||
`(".*" ,(concat user-emacs-directory "data/auto-save-files/") t)
|
|
||||||
:append)
|
|
||||||
|
|
||||||
(setq auto-save-list-file-prefix
|
|
||||||
(concat user-emacs-directory "data/" "auto-save-list/.saves-"))
|
|
||||||
|
|
||||||
(setq abbrev-file-name
|
|
||||||
(concat user-emacs-directory "data/abbrev_defs"))
|
|
||||||
|
|
||||||
(with-eval-after-load 'forge
|
(with-eval-after-load 'forge
|
||||||
(setq forge-database-file
|
(setq forge-database-file
|
||||||
(concat user-emacs-directory "data/forge-database.sqlite")))
|
(concat user-emacs-directory "data/forge-database.sqlite")))
|
||||||
|
@ -67,70 +51,16 @@
|
||||||
(setq tramp-persistency-file-name
|
(setq tramp-persistency-file-name
|
||||||
(concat user-emacs-directory "data/tramp")))
|
(concat user-emacs-directory "data/tramp")))
|
||||||
|
|
||||||
(setq delete-old-versions t)
|
|
||||||
(setq kept-new-versions 20)
|
|
||||||
(setq kept-old-versions 20)
|
|
||||||
(setq vc-make-backup-files t)
|
|
||||||
(setq version-control t)
|
|
||||||
|
|
||||||
(global-set-key (kbd "C-M-SPC") 'er/expand-region)
|
|
||||||
(global-set-key (kbd "M-+") 'mc/mark-next-like-this)
|
|
||||||
(global-set-key (kbd "C-c (") 'embrace-commander)
|
|
||||||
(global-set-key (kbd "C-x f") 'ffap)
|
|
||||||
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
|
||||||
|
|
||||||
(setq require-final-newline t)
|
|
||||||
|
|
||||||
(setq-default indent-tabs-mode nil)
|
|
||||||
|
|
||||||
(setq-default tab-width 4)
|
|
||||||
|
|
||||||
(setq sentence-end-double-space nil)
|
|
||||||
|
|
||||||
(setq inhibit-startup-screen t)
|
|
||||||
|
|
||||||
(setq-default truncate-lines t)
|
|
||||||
|
|
||||||
(setq-default fill-column 80)
|
|
||||||
|
|
||||||
(global-unset-key (kbd "C-z"))
|
(global-unset-key (kbd "C-z"))
|
||||||
|
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
|
||||||
|
|
||||||
(setq user-full-name "Tom Willemse"
|
|
||||||
user-mail-address "tom@ryuslash.org")
|
|
||||||
|
|
||||||
(eval-when-compile (require 'browse-url))
|
(eval-when-compile (require 'browse-url))
|
||||||
|
|
||||||
(with-eval-after-load 'browse-url
|
(with-eval-after-load 'browse-url
|
||||||
(setq browse-url-browser-function 'browse-url-firefox))
|
(setq browse-url-browser-function 'browse-url-firefox))
|
||||||
|
|
||||||
(defun init--destroy-trailing-whitespace ()
|
|
||||||
"Delete trailing whitespace everywhere, except in Markdown buffers."
|
|
||||||
(if (not (eq major-mode 'markdown-mode))
|
|
||||||
(delete-trailing-whitespace)))
|
|
||||||
|
|
||||||
(add-hook 'before-save-hook #'init--destroy-trailing-whitespace)
|
|
||||||
(add-hook 'minibuffer-setup-hook 'electric-pair-local-mode)
|
|
||||||
|
|
||||||
(with-eval-after-load 'paredit
|
(with-eval-after-load 'paredit
|
||||||
(diminish 'paredit-mode))
|
(diminish 'paredit-mode))
|
||||||
|
|
||||||
(electric-indent-mode -1)
|
|
||||||
|
|
||||||
(defun oni:switch-newline-keys ()
|
|
||||||
"Switch the C-j and RET keys in the local buffer."
|
|
||||||
(if electric-indent-mode
|
|
||||||
(progn
|
|
||||||
(local-set-key (kbd "C-j") 'newline)
|
|
||||||
(local-set-key (kbd "RET") 'electric-newline-and-maybe-indent))
|
|
||||||
(local-unset-key (kbd "C-j"))
|
|
||||||
(local-unset-key (kbd "RET"))))
|
|
||||||
|
|
||||||
(add-hook 'electric-indent-local-mode-hook #'oni:switch-newline-keys)
|
|
||||||
|
|
||||||
(setq electric-pair-skip-whitespace 'chomp)
|
|
||||||
|
|
||||||
;; (with-eval-after-load 'server
|
;; (with-eval-after-load 'server
|
||||||
;; (diminish 'server-buffer-clients
|
;; (diminish 'server-buffer-clients
|
||||||
;; (propertize (concat " " (char-to-string #xf233))
|
;; (propertize (concat " " (char-to-string #xf233))
|
||||||
|
@ -148,8 +78,6 @@
|
||||||
|
|
||||||
(add-to-list 'grep-files-aliases '("msbuild" . "*.targets *.proj"))
|
(add-to-list 'grep-files-aliases '("msbuild" . "*.targets *.proj"))
|
||||||
|
|
||||||
(add-hook 'before-save-hook 'time-stamp)
|
|
||||||
|
|
||||||
(if (eq system-type 'windows-nt)
|
(if (eq system-type 'windows-nt)
|
||||||
(require 'oni-windows-nt))
|
(require 'oni-windows-nt))
|
||||||
|
|
||||||
|
|
|
@ -34,19 +34,8 @@
|
||||||
(require 'fill-column-indicator)
|
(require 'fill-column-indicator)
|
||||||
(require 'sort))
|
(require 'sort))
|
||||||
|
|
||||||
(add-to-list 'load-path (locate-user-emacs-file "vendor/p4-vc"))
|
|
||||||
(add-to-list 'exec-path "c:/Program Files/Git/bin")
|
|
||||||
(add-to-list 'exec-path "C:/Program Files/Git/usr/bin")
|
|
||||||
(add-to-list 'exec-path "c:/cygwin64/bin")
|
|
||||||
|
|
||||||
(setq find-program (shell-quote-argument "c:/cygwin64/bin/find.exe"))
|
|
||||||
(setq grep-program (shell-quote-argument "c:/cygwin64/bin/grep.exe"))
|
|
||||||
(setq grep-use-null-device nil)
|
|
||||||
(setq delete-by-moving-to-trash t)
|
|
||||||
(setq sort-fold-case t)
|
(setq sort-fold-case t)
|
||||||
|
|
||||||
(setq-default buffer-file-coding-system 'utf-8-unix)
|
|
||||||
|
|
||||||
(let ((exe (shell-quote-argument "c:/cygwin64/bin/ls.exe")))
|
(let ((exe (shell-quote-argument "c:/cygwin64/bin/ls.exe")))
|
||||||
(setq find-ls-option
|
(setq find-ls-option
|
||||||
(cons (concat "-exec " exe " -ld {} \";\"") "-ld")))
|
(cons (concat "-exec " exe " -ld {} \";\"") "-ld")))
|
||||||
|
|
Loading…
Reference in a new issue