   (save-buffer)
   (kill-buffer nil))
 
-;;; formatting options
-; Highlight trailing white space using whitespace package
-(require 'whitespace)
-(setq show-trailing-whitespace t)
-(setq whitespace-line-column 100)
-
-;; Dealing with tab and space issues
-(setq c-default-style "gnu"
-          c-basic-offset 4)
-; Don't use tabs
-(setq-default indent-tabs-mode nil)
-; Put .h files in c++ mode also
-(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
-(add-to-list 'auto-mode-alist '("\\.hh\\'" . c++-mode))
-; apply clang-format on save
-(add-hook 'c++-mode-hook
-  (lambda () (add-hook 'before-save-hook #'clang-format-buffer nil t)))
-
-;;; Use aspell
-(setq-default ispell-program-name "aspell")
-
-;;;; Use case insensitive file completion
-(setq-default completion-ignore-case t)
-
 ;;;; Keybindings
-(global-set-key "\C-co" 'occur)
 (global-set-key "\C-cd" 'insert-current-date)
 (global-set-key "\C-cs" 'insert-datestamp)
 (global-set-key "\C-ct" 'insert-current-time)
 (global-set-key "\C-c-" 'insert-dashed-line)
-(global-set-key "\C-x\C-b" 'ibuffer)
   ;;; keybindings only for windows
-(define-prefix-command 'log-keymap)
-(global-set-key "\C-cl" 'log-keymap)
-(global-set-key "\C-cm" 'meeting)
 (global-set-key "\C-cc" 'completed)
-
-; turn off word complete in minibuffer completion. Allows spaces
-;(define-key minibuffer-local-completion-map 'space nil)
 
 ;;; emacs compatibility
 (eval-and-compile ;; Protect against declare-function undefined in XEmacs
   (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-(global-set-key "\C-x\C-b" 'ibuffer)
-
-(put 'narrow-to-region 'disabled nil)
-
-;;;; UTF-8
-(define-coding-system-alias 'UTF-8 'utf-8)
-
-(require 'yaml-mode)
-    (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
-
-; Python support
-;;; Yapify and yapf
-(add-to-list 'load-path "~/.emacs.d/yapfify")
-(require 'yapfify)
-(add-hook 'python-mode-hook 'yapf-mode)
-
-;;; sphinx doc mode for python documentation
-(add-hook 'python-mode-hook (lambda ()
-                                  (require 'sphinx-doc)
-                                  (sphinx-doc-mode t)))
-
-(add-hook 'after-init-hook #'global-flycheck-mode)
-(require 'flycheck-yamllint)
-(eval-after-load 'flycheck
-  '(add-hook 'flycheck-mode-hook 'flycheck-yamllint-setup))
-;; disable jshint since we prefer eslint checking
-(setq-default flycheck-disabled-checkers
-  (append flycheck-disabled-checkers
-          '(javascript-jshint)
-          '(python-flake8)))
-;; use eslint with web-mode for jsx files
-(flycheck-add-mode 'javascript-eslint 'web-mode)
-(add-hook 'c++-mode-hook
-          (lambda () (setq flycheck-gcc-include-path
-                           (list (expand-file-name "/usr/local/include/bsoncxx/v_noabi")))))
-;; (eval-after-load 'flycheck
-;;   '(progn
-;;      (require 'flycheck-google-cpplint)
-;;      ;; Add Google C++ Style checker.
-;;      ;; In default, syntax checked by Clang and Cppcheck.
-;;     (flycheck-add-next-checker 'c/c++-cppcheck
-;;                                 '(warning . c/c++-googlelint))))
-(require 'flycheck-color-mode-line)
-(eval-after-load "flycheck"
-  '(add-hook 'flycheck-mode-hook 'flycheck-color-mode-line-mode))
+
 
 ;;; .emacs ends here
 (custom-set-variables

  (package-refresh-contents)
  (package-install 'use-package))

;;; Package list to install on new machine
(defun install-my-packages ()
  "Install all my usual packages.  For use on new machine."
  (interactive)
  (package-refresh-contents)
  (package-install 'clang-format)
  (package-install 'company)
  (package-install 'company-lsp)
  (package-install 'cquery)
  (package-install 'elpy)
  (package-install 'exec-path-from-shell)
  (package-install 'fill-column-indicator)
  (package-install 'git-gutter)
  (package-install 'go)
  (package-install 'golint)
  (package-install 'flycheck)
  (package-install 'flycheck-color-mode-line)
  (package-install 'flycheck-pycheckers)
  (package-install 'flycheck-yamllint)
  (package-install 'json-mode)
  (package-install 'lsp-mode)
  (package-install 'magit)
  (package-install 'markdown-mode+)
  (package-install 'projectile)
  (package-install 'quelpa)
  (package-install 'sphinx-mode)
  (package-install 'which-key)
  (package-install 'yaml-mode)
  (package-install 'yapfify)
  (quelpa '(evergreen :repo "chasinglogic/evergreen.el" :fetcher github))
  )

(use-package diminish
  :ensure t
  :commands 'diminish)

  (interactive)
  (setq truncate-lines nil)
)

;; thanks to jonas for this function - allows you to add a number to
;; all matching strings in the rest of the document
