 
 ;; remove a significant contributor to line scan slowness
 (setq bidi-display-reordering nil)
+
+;; auto-fill comments in programming modes
+;; if you want to have automatic auto-fill:
+;; (defun comment-auto-fill ()
+;;       (setq-local comment-auto-fill-only-comments t)
+;;       (auto-fill-mode 1))
+;; (add-hook 'c-mode-common-hook (lambda () (comment-auto-fill)))
+;; if you want to manually auto-fill (M-q), but for that to only apply to comments
+(add-hook 'c-mode-common-hook (lambda () (setq-local comment-auto-fill-only-comments t)))
+
+;; Set custom variables:
+;;   - make man page appear in current window
+;;   - set ECB left sidebar width
+;;   - wrap lines in the ECB History and Methods buffers
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(Man-notify-method (quote pushy))
+ '(ecb-layout-window-sizes
+   (quote
+    (("left11"
+      (ecb-methods-buffer-name 0.17901234567901234 . 0.7)
+      (ecb-history-buffer-name 0.17901234567901234 . 0.275)))))
+ '(ecb-options-version "2.50")
+ '(ecb-tree-truncate-lines
+   (quote
+    (ecb-directories-buffer-name ecb-sources-buffer-name ecb-analyse-buffer-name))))
+
+;; set some ECB faces
+;; see http://ecb.sourceforge.net/docs/ecb_002dfaces.html for descriptions
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(ecb-default-highlight-face ((((class color) (background dark)) (:background "yellow" :foreground "black"))))
+ '(ecb-tag-header-face ((((class color) (background dark)) (:background "yellow" :foreground "black")))))

  (require 'semantic)
  (semantic-mode 1)
  (global-semanticdb-minor-mode 1)
  (global-semantic-idle-scheduler-mode 1))

;;;;;;;;;;;;;;;;; MELPA PACKAGES

(use-package zenburn-theme
  ;; theme
  :ensure t
  :config
  (load-theme 'zenburn t)
  ;; stylize the mode line
  (set-face-attribute 'mode-line nil :box nil)
  (set-face-attribute 'mode-line-inactive nil :box nil))

(use-package dired+
  ;; advanced Dired functionality

(use-package projectile
  ;; project interaction library offering tools to operate on a project level
  ;; Useful commands:
  ;;  C-c p p   : the first thing to run when starting to work in a project
  ;;  C-c p f   : find file in current project
  ;;  C-c p g   : find file based on context (can place cursor on header file, executing command will take you to header file)
  ;;  C-c p d   : find directory in current project
  ;;  C-c p a   : switch between files with same name but different extensions (e.g. .cpp and .h)
  ;;  C-c p i   : rebuild cache (otherwise if new files made, old cache causes them to not be seen)
  ;;  C-c p f, C-SPC, C-f: create a virtual Dired buffer from files selected with C-SPC with C-c p f
  ;;  C-c p b   : switch to open buffer of file/directory that belongs to current project
  ;;  C-c p s g : find a word/string in project files  (using grep), autofill with symbol at point
  :ensure t
  :config
