   "cv" 'evilnc-toggle-invert-comment-line-by-line
   ;"\\" 'evilnc-comment-operator ; if you prefer backslash key
 )
-
-(require 'evil)
-(evil-mode t)
-
-(evil-leader/set-key
-  "e" 'find-file
-  "b" 'switch-to-buffer
-  "k" 'kill-buffer)
 
 (require 'ido)
 (ido-mode t)

(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/"))

(setq package-enable-at-startup nil)

(defun ensure-package-installed(&rest packages)
  (mapcar
   (lambda (package)
     (if (package-installed-p package)
     nil
       (if (y-or-n-p (format "Package %s is missing. Install it?" package))
       (package-install package)
     package)))
   packages))

(or (file-exists-p package-user-dir)
    (package-refresh-contents))

(package-initialize)

(ensure-package-installed
 'evil
 'evil-leader
 'helm
 'helm-ag

 'markdown-mode+
 'latex-preview-pane

 'smart-mode-line

 'nyan-mode
 'xkcd

 'flx-ido

 'jedi
 'js2-mode
 'haskell-mode
 'go-mode

 'rainbow-mode
 'visual-regexp-steroids

 'magit

 'evil-nerd-commenter
 'smartparens

 'auto-complete

 'flycheck

 'linum-relative

 'ace-jump-mode
 'ace-window
 'ace-link

 'key-chord

; 'icicles
 'dired+

 'projectile

 'solarized-theme
 'monokai-theme

 )

(global-evil-leader-mode)

;; Emacs key bindings
(global-set-key (kbd "M-;") 'evilnc-comment-or-uncomment-lines)
(global-set-key (kbd "C-c l") 'evilnc-quick-comment-or-uncomment-to-the-line)
(global-set-key (kbd "C-c c") 'evilnc-copy-and-comment-lines)
(global-set-key (kbd "C-c p") 'evilnc-comment-or-uncomment-paragraphs)

;; Vim key bindings
(require 'evil-leader)
(global-evil-leader-mode)
(evil-leader/set-key
  "ci" 'evilnc-comment-or-uncomment-lines
  "cl" 'evilnc-quick-comment-or-uncomment-to-the-line


(when (eq "1" (getenv "RUNCOM_USE_PROXY"))
  (setq url-proxy-services
    '(("no_proxy" . "^\\(localhost\\|10.*\\)")
     ("http" . "localhost:3128")
     ("https" . "localhost:3128")))
)

(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)

(require 'package)

