 ;; F9
 ;; F12
 
-;; Allow C-q to be used as a prefix key.
-(define-key global-map (kbd "C-q") nil)
-
-(define-key global-map (kbd "C-q q") 'linum-relative-toggle)
+(define-key global-map (leader+ "q") 'linum-relative-toggle)
 
 ;; Scroll by 5
 (dolist (k '("C-S-e" "<C-down>"))

(setq mouse-wheel-scroll-amount '(3 ((shift) . 1) ((control) . nil)))
(setq mouse-wheel-progressive-speed nil)
(setq smooth-scroll-margin 5)

;; Put backup files and autosave files in temp dir.
(setq backup-directory-alist `((".*" . ,temporary-file-directory)))

  (define-key global-map (kbd k) 'zoom-in/out))

;; Open main work location in dired.
(define-key global-map (leader+ "a")
  (cmd (cond
        ((work-windows?)
         (find-file "C:/Users/IBM_ADMIN/VirtualBox Share/gitrepos"))
        ((work-linux?)
         (find-file "/media/sf_VirtualBox_Share/gitrepos"))
        ((home-linux?)
         (find-file "/ssh:chris@192.168.1.50:/home/chris/stuff")))))

(define-key global-map (leader+ "C-t") (cmd (term "/bin/bash")))
(define-key global-map (kbd "C-;") 'buffer-menu)
(define-key global-map (kbd "C-'") 'find-file)
(define-key global-map (kbd "C-,") 'async-shell-command)
(define-key global-map (leader+ "C-h") 'evil-window-left)
(define-key global-map (leader+ "C-l") 'evil-window-right)
(define-key global-map (leader+ "C-k") 'evil-window-up)
(define-key global-map (leader+ "C-j") 'evil-window-down)

;; Bindings for highlight-symbol
(define-key global-map (leader+ "C-w") 'highlight-symbol)
(define-key global-map (leader+ "w") 'highlight-symbol-remove-all)
(define-key global-map (kbd "C->") 'highlight-symbol-next)
(define-key global-map (kbd "C-<") 'highlight-symbol-prev)

;; Dired / Dired+
(define-key dired-mode-map (kbd "<backspace>") 'diredp-kill-this-tree)

;; python-mode insert breakpoint
(define-key python-mode-map (leader+ "C-d")
  (cmd (let ((indent (current-indent)))
         (beginning-of-line)
         (insert (concat (str* " " indent)
                         "import ipdb; ipdb.set_trace()\n"))
         (forward-line -1)
         (goto-char (+ (point) indent)))))


;;;; Useful Functions
