General settings
1 Appearance
Disabling bent arrows (↩)
(setq-default visual-line-fringe-indicators nil) (setq-default fringe-indicator-alist '( (truncation left-arrow right-arrow) (continuation nil nil) ;; left-curly-arrow (overlay-arrow . right-triangle) (up . up-arrow) (down . down-arrow) (top top-left-angle top-right-angle) (bottom bottom-left-angle bottom-right-angle top-right-angle top-left-angle) (top-bottom left-bracket right-bracket top-right-angle top-left-angle) (empty-line . empty-line) (unknown . question-mark)))
2 Backup and other file settings
Store all backup and autosave files in the /tmp
directory
(setq backup-directory-alist `((".*" . ,temporary-file-directory))) (setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
Backup by copying instead of renaming. See https://www.gnu.org/software/emacs/manual/html_node/emacs/Backup-Copying.html
(setq backup-by-copying t)
Automatic deletion of backups. See https://www.gnu.org/software/emacs/manual/html_node/emacs/Backup-Deletion.html
(setq delete-old-versions t kept-new-versions 6 kept-old-versions 2 version-control t)
Do not create "lock" files.
(setq create-lockfiles nil)
Save files when emacs goes out of focus
(defun save-all () (interactive) (save-some-buffers t)) (add-hook 'focus-out-hook 'save-all)
Load any changes from disk automatically
(setq global-auto-revert-mode t)
3 Miscellaneous
Answer with y/n instead of having to write the full words
(fset 'yes-or-no-p 'y-or-n-p)
Default browser to use
(setq browse-url-browser-function 'browse-url-generic browse-url-generic-program "google-chrome-stable")
(with-eval-after-load 'helm (setq helm-display-function 'helm-default-display-buffer)) ;; temp work around
4 Org config
Spacemacs requires the org-mode settings to be defined after the org-mode is activated.
(with-eval-after-load 'org (require 'org-config) )
Default file to open
(find-file "~/Dropbox/org/main.org")
5 Disabled
;; (require 'epa-file) ;; (epa-file-enable) ;; (setq epa-file-cache-passphrase-for-symmetric-encryption t) ;; (require 'python) ; if not done elsewhere ;; (require 'eval-in-repl-python) ;; (add-hook 'python-mode-hook ;; '(lambda () ;; (local-set-key (kbd "<C-return>") 'eir-eval-in-python))) ;; consider *.org.txt files as org files ;; (add-to-list 'auto-mode-alist '("\\.org.txt\\'" . org-mode)) ;; (require 'helm-bookmark)
6 Final
Let the Spacemacs use this configuration.
(provide 'general-config)