-; Emacs Config
-; ~/.emacs.d/init.el
+;;;; Emacs Configuration
+;;;; `~/.emacs.d/init.el'
 
-;;; TODO improve line numbers (and set relative)
-;;; TODO highlight "TODO" and other parts of comments
-;;; TODO install Org-mode, Magit and others
-;;; TODO sort out package archives
-;;; TODO move this file to an org-mode file
 
-; Other config (organise and check)
-;; Disable UI elements in GUI Emacs
+;;; Disable UI elements in GUI Emacs
 (menu-bar-mode -1)
 (tool-bar-mode -1)
 (scroll-bar-mode -1)
-;; Line Numbers at right of buffer
+;; Enable line numbers
 (global-linum-mode 1)
-;;; Auto-indent
-;(define-key global-map (kbd "RET") 'newline-and-indent)
-;
-; TODO what is this?
-;(put 'scroll-left 'disabled nil)
+(setq display-line-numbers 'relative)
 
 
+;;; Packages Config
 (require 'package)
 
-;;(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
-;;(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
-;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
+;;;(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
+;;;(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
+;;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
 
-;; Needed to work on Windows (no ssl support)
 (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
-                    (not (gnutls-available-p))))
+		    (not (gnutls-available-p))))
        (proto (if no-ssl "http" "https")))
   ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
   (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
-  ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
-  ;;(add-to-list 'package-archives (cons "org" (concat proto "://orgmode.org/elpa/")) t)
+  (add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
+  (add-to-list 'package-archives (cons "org" (concat proto "://orgmode.org/elpa/")) t)
   (when (< emacs-major-version 24)
     ;; For important compatibility libraries like cl-lib
     (add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))

  :defer t
  :init (load-theme 'spacemacs-dark t))

;; Set `ESC' to `C-g' (no more `ESC-ESC-ESC')
;;;(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(define-key key-translation-map (kbd "ESC") (kbd "C-g"))


    :init (setq evil-escape-key-sequence "jk")
    :config (evil-escape-mode)))

(use-package org
  :ensure t)

(use-package magit
  :defer t)

(use-package rainbow-delimiters
