Browse Source

Coding system, whitespace customizations

* Make utf-8 the preferred coding system. I only noticed issues once
  switching to Windows 10
* Attempted to make whitespace settings for only seeing bad
whitespace, but I failed. I'll have to try again another time
* Occur no longer has matching string faces in the results, which I
thought were making the results hard to read
master
Macoy Madson 2 years ago
parent
commit
3b1fe15965
  1. 6
      Emacs/core-settings.el
  2. 2
      Emacs/search.el
  3. 3
      Emacs/tags-and-autocompletion.el
  4. 37
      Emacs/visual-early.el
  5. 2
      Emacs/visual-late.el

6
Emacs/core-settings.el

@ -1,3 +1,6 @@
;; After having troubles with Windows 10 writing CRLF, I'm going to try this
;; Always prefer UTF-8
(prefer-coding-system 'utf-8)
;; Some settings from http://ergoemacs.org/emacs/emacs_make_modern.html
@ -34,6 +37,8 @@
(add-hook 'minibuffer-setup-hook #'my-minibuffer-setup-hook)
(add-hook 'minibuffer-exit-hook #'my-minibuffer-exit-hook)
;; Don't warn on large files (I have very big TAGS)
(setq large-file-warning-threshold 90000000)
;; stop creating those backup~ files
(setq make-backup-files nil)
@ -146,6 +151,7 @@
(setq projectile-globally-ignored-directories
(append '("AutoGen"
"3rdparty"
"obj140"
".build"
".cquery_cached_index")
projectile-globally-ignored-files))

2
Emacs/search.el

@ -70,7 +70,7 @@ If there's a string at point, offer that as a default."
'macoy-codesearch-search-src)))
;; Codesearch data
(define-key map (kbd "d") (lambda () (interactive) (macoy-select-do-search
'macoy-codesearch-search-with-filter-directory "C:/Magic/data")))
'macoy-codesearch-search-with-filter-directory "D:/Magic/data")))
;; Swiper all
(define-key map (kbd "s") (lambda () (interactive) (macoy-select-do-search
'swiper-all)))

3
Emacs/tags-and-autocompletion.el

@ -92,7 +92,8 @@
;; tags-completion-table() early-outs if the table has already been created
;; This is problematic if TAGS has changed
;; Clearing it here ensures the table won't get out of sync
(setq tags-completion-table nil)
(when tags-completion-table
(setq tags-completion-table nil))
(tags-completion-table)
(message "Refreshing ido tags list")

37
Emacs/visual-early.el

@ -108,18 +108,39 @@
;; Not enabled globally because it looks a bit too ugly for my tastes; I can toggle it when needed
;;(global-whitespace-mode 0)
(setq whitespace-style '(tab-mark space-mark))
;; whitespace-trailing
;; whitespace-indentation
(set-face-foreground 'whitespace-indentation (face-background 'match))
(set-face-background 'whitespace-indentation (face-foreground 'match))
;; (setq whitespace-style '(face indentation::tab trailing))
(setq whitespace-line-column 100)
(setq whitespace-newline nil)
)
(defun macoy-toggle-whitespace-mode ()
(interactive)
(if (bound-and-true-p whitespace-mode)
(whitespace-mode 0)
(whitespace-mode)
)
;; Attempt at a global mode which only shows bad setups. Almost works, but Elisp isn't good
;; (setq macoy-whitespace-style-minimal '(face indentation trailing))
;; (setq macoy-whitespace-style-verbose '(tab-mark space-mark))
;; (global-whitespace-mode 1)
;; (setq whitespace-style macoy-whitespace-style-minimal)
;; (setq macoy-whitespace-verbose nil)
;; (defun macoy-toggle-whitespace-mode ()
;; (interactive)
;; ;; Toggle off and on to redraw buffer (could probably just call the function which does this...)
;; (whitespace-mode 0)
;; (setq macoy-whitespace-verbose (not macoy-whitespace-verbose))
;; (if macoy-whitespace-verbose
;; (setq whitespace-style macoy-whitespace-style-verbose)
;; (setq whitespace-style macoy-whitespace-style-minimal))
;; (whitespace-mode 1))
(defun macoy-toggle-whitespace-mode ()
(interactive)
(if (bound-and-true-p whitespace-mode)
(whitespace-mode 0)
(whitespace-mode)))
(global-set-key (kbd "S-<f9>") 'macoy-toggle-whitespace-mode)
)
(global-set-key (kbd "S-<f9>") 'macoy-toggle-whitespace-mode)
;;
;; Auto Theming

2
Emacs/visual-late.el

@ -183,3 +183,5 @@
;; TODO: This needs to be in a hook somewhere for org mode. It doesn't work currently
(diminish 'org-indent-mode)
)
(setq list-matching-lines-face nil)

Loading…
Cancel
Save