Commits

William B committed b24d502

random config tweaks to make a mess of my init file with

Comments (0)

Files changed (1)

 (if (window-system)  (set-frame-size (selected-frame) 124 50))
 
 ;; highlight keywords
-;; TODO: a bit repetitive - resolve that
-(add-hook 'c-mode-common-hook
-    (lambda ()
+;; highlight keywords
+(add-hook 'prog-mode-hook (lambda ()
         (font-lock-add-keywords nil
-            '(("\\<\\(FIXME\\|TODO\\|BUG\\|XXX\\|todo\\|xxx\\):" 1 font-lock-warning-face t)))))
-(add-hook 'python-mode-hook
-    (lambda ()
-        (font-lock-add-keywords nil
-            '(("\\<\\(FIXME\\|TODO\\|BUG\\|XXX\\|todo\\|xxx\\):" 1 font-lock-warning-face t)))))
+            '(("\\<\\(FIXME\\|TODO\\|BUG\\|XXX\\|todo\\|xxx\\):" 1 font-lock-warning-face t)))
+    )
+)
+
+;; Sentences to end with single space
+(set-default 'sentence-end-double-space nil)
+
+;; Keep quiet
+(setq ring-bell-function 'ignore)
+
+;; Move files to trash when deleting
+(setq delete-by-moving-to-trash t)
+
+;; Auto refresh buffers when edits occur outside emacs
+(global-auto-revert-mode 1)
+
+;; Also auto refresh dired, but be quiet about it
+(setq global-auto-revert-non-file-buffers t)
+(setq auto-revert-verbose nil)
+
+;; Answering just 'y' or 'n' will do
+(defalias 'yes-or-no-p 'y-or-n-p)
+
+;; Back-up version controlled files
+(setq vc-make-backup-files t)
+
+;; UTF-8
+(setq locale-coding-system 'utf-8)
+(set-terminal-coding-system 'utf-8)
+(set-keyboard-coding-system 'utf-8)
+(set-selection-coding-system 'utf-8)
+(prefer-coding-system 'utf-8)
+
 
 ;;
 ;; Windows
 
 
 ;;
+;; Key bindings
+;;
+
+;; TODO: TIDY UP! Making a big of a mess of things so created key-bindings
+;; section even though normally some of these would go in other sections like 
+;; buffer related settings
+
+(global-set-key (kbd "C-x C-b") 'ibuffer)
+
+;; Flip search mode types
+(global-set-key (kbd "C-s") 'isearch-forward-regexp)
+(global-set-key (kbd "C-r") 'isearch-backward-regexp)
+(global-set-key (kbd "C-M-s") 'isearch-forward)
+(global-set-key (kbd "C-M-r") 'isearch-backward)
+
+;; Joins with line above
+(global-set-key (kbd "C-j") '(lambda () (interactive) (delete-indentation)))
+;; Join with the line below
+(global-set-key (kbd "M-j") '(lambda () (interactive) (delete-indentation -1)))
+
+;;previous paragraph
+(global-set-key (kbd "M-[") 'backward-paragraph)
+;;forward paragraph
+(global-set-key (kbd "M-]") 'forward-paragraph)
+
+
+;;
 ;; Buffers
 ;;