Browse Source

Fixed loading Evil with its keybindings

master
Julio Biason 5 years ago
parent
commit
4a0ec8bc16
  1. 5
      .gitignore
  2. 130
      emacs.d/init.el

5
.gitignore vendored

@ -2,3 +2,8 @@
*.sw?
vim/.netrwhist
vim/view
emacs.d/.last-package-update-day
emacs.d/elpa/
emacs.d/network-security.data
emacs.d/recentf

130
emacs.d/init.el

@ -1,10 +1,10 @@
;;;; init.el -*- lexical-binding: t; -*-
;;; init.el -*- lexical-binding: t; -*-
(require 'package)
(add-to-list
'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/")
'("melpa" . "https://melpa.milkbox.net/packages/")
t)
(add-to-list
'package-archives
@ -20,23 +20,61 @@
(require 'use-package)
(setq use-package-always-ensure t)
; install evil
(use-package evil
:ensure t
:config (evil-mode 1)
:bind ((:map evil-normal-state-map ("C-w <down>" . evil-window-down))
(:map evil-normal-state-map ("C-w <up>" . evil-window-up))
(:map evil-normal-state-map ("C-w <right>" . evil-window-right))
(:map evil-normal-state-map ("C-W <left>" . evil-window-left))
(:map evil-normal-state-map ("-" . find-file))))
; Org-mode
; update packages
(use-package auto-package-update
:config (setq auto-package-update-delete-old-versions t)
(setq auto-package-update-hide-results t)
(auto-package-update-maybe))
; rust mode
(use-package rust-mode
:ensure t)
; Notes
(use-package org
:ensure t
:bind (("\C-cl" . org-store-link)
("\C-ca" . org-agenda)
("\C-cb" . org-iswtichb)))
; Helm, for easy access to commands
(use-package helm
:ensure t
:init (progn (require 'helm-config)
(setq helm-mode-fuzzy-match t)
(helm-mode))
)
; Evil
(use-package evil
:ensure t
:after (helm)
:config (progn
(evil-mode 1)
(define-key evil-normal-state-map (kbd "C-w <up>") 'evil-window-up)
(define-key evil-normal-state-map (kbd "C-w <down>") 'evil-window-down)
(define-key evil-normal-state-map (kbd "C-w <left>") 'evil-window-left)
(define-key evil-normal-state-map (kbd "C-w <right>") 'evil-window-right)
(define-key evil-normal-state-map (kbd "-") 'helm-find-files)
)
; Evil-leader so we can use the leader key
(use-package evil-leader
:ensure t
:config (progn (global-evil-leader-mode)
(evil-leader/set-leader "<SPC>")
(evil-leader/set-key
"q" 'kill-buffer-and-window
"w" 'save-buffer
"o" 'helm-find-files
"a" 'org-agenda)))
; Commentary to comment out code
(use-package evil-commentary
:ensure t
:bind (:map evil-normal-state-map ("gc" . evil-commentary))
)
)
; Markdown mode
(use-package markdown-mode
:ensure t)
@ -54,14 +92,13 @@
:ensure t
:config (powerline-center-evil-theme))
; rust mode
(use-package rust-mode
:ensure t)
; colorscheme
(use-package monokai-pro-theme
:ensure t)
(load-theme 'monokai-pro)
; colorschemes
(use-package doom-themes
:ensure t
:config (setq doom-themes-enable-bold t
doom-themes-enable-italic t)
(load-theme 'doom-molokai t)
)
(custom-set-variables
;; custom-set-variables was added by Custom.
@ -75,12 +112,42 @@
'(custom-enabled-themes (quote (monokai-pro)))
'(custom-safe-themes
(quote
("f10e50d86ec09152a03fcc3b251ba698610b2e5baa73699297a8bb37a419f3c8" "11e57648ab04915568e558b77541d0e94e69d09c9c54c06075938b6abc0189d8" "7f6d4aebcc44c264a64e714c3d9d1e903284305fd7e319e7cb73345a9994f5ef" "bd7b7c5df1174796deefce5debc2d976b264585d51852c962362be83932873d9" "039eb505cec29b4521ce5ecf5abf523492005f0c65d0640f62e53e2d3068b393" "6c0a087a4f49c04d4002393ffd149672f70e4ab38d69bbe8b39059b61682b61c" default)))
("be9645aaa8c11f76a10bcf36aaf83f54f4587ced1b9b679b55639c87404e2499" "f10e50d86ec09152a03fcc3b251ba698610b2e5baa73699297a8bb37a419f3c8" "11e57648ab04915568e558b77541d0e94e69d09c9c54c06075938b6abc0189d8" "7f6d4aebcc44c264a64e714c3d9d1e903284305fd7e319e7cb73345a9994f5ef" "bd7b7c5df1174796deefce5debc2d976b264585d51852c962362be83932873d9" "039eb505cec29b4521ce5ecf5abf523492005f0c65d0640f62e53e2d3068b393" "6c0a087a4f49c04d4002393ffd149672f70e4ab38d69bbe8b39059b61682b61c" default)))
'(fci-rule-color "#555556")
'(inhibit-startup-screen t)
'(jdee-db-active-breakpoint-face-colors (cons "#1B2229" "#fd971f"))
'(jdee-db-requested-breakpoint-face-colors (cons "#1B2229" "#b6e63e"))
'(jdee-db-spec-breakpoint-face-colors (cons "#1B2229" "#525254"))
'(objed-cursor-color "#e74c3c")
'(org-agenda-files (quote ("~/Documents/index.org")))
'(package-selected-packages
(quote
(monokai-pro-theme markdown-mode org-evil org-link-minor-mode rust-mode evil-quickscope evil-tabs ## evil-leader editorconfig diff-hl neotree helm-ag helm-projectile projectile helm hlinum fill-column-indicator evil monokai-theme cider))))
(monokai-pro-theme markdown-mode org-evil org-link-minor-mode rust-mode evil-quickscope evil-tabs ## evil-leader editorconfig diff-hl neotree helm-ag helm-projectile projectile helm hlinum fill-column-indicator evil monokai-theme cider)))
'(pdf-view-midnight-colors (cons "#d6d6d4" "#1c1e1f"))
'(rustic-ansi-faces
["#1c1e1f" "#e74c3c" "#b6e63e" "#e2c770" "#268bd2" "#fb2874" "#66d9ef" "#d6d6d4"])
'(vc-annotate-background "#1c1e1f")
'(vc-annotate-color-map
(list
(cons 20 "#b6e63e")
(cons 40 "#c4db4e")
(cons 60 "#d3d15f")
(cons 80 "#e2c770")
(cons 100 "#ebb755")
(cons 120 "#f3a73a")
(cons 140 "#fd971f")
(cons 160 "#fc723b")
(cons 180 "#fb4d57")
(cons 200 "#fb2874")
(cons 220 "#f43461")
(cons 240 "#ed404e")
(cons 260 "#e74c3c")
(cons 280 "#c14d41")
(cons 300 "#9c4f48")
(cons 320 "#77504e")
(cons 340 "#555556")
(cons 360 "#555556")))
'(vc-annotate-very-old-color nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@ -129,8 +196,7 @@
; git gutters
(use-package diff-hl
:ensure t
:init
(setq diff-hl-side 'right))
:init (setq diff-hl-side 'right))
(global-diff-hl-mode 1)
(diff-hl-margin-mode 1)
(diff-hl-flydiff-mode 1)
@ -140,19 +206,5 @@
:ensure t
:config (editorconfig-mode 1))
; install evil-leader and set it as space
(use-package evil-leader
:ensure t
:config (global-evil-leader-mode))
(evil-leader/set-leader "<SPC>")
(evil-leader/set-key
"q" 'kill-buffer-and-window
"w" 'save-buffer
"t" 'neotree-toggle
"o" 'org-capture
"O" 'org-agenda
)
; answer questions with 'y' instead of full 'yes'
(defalias 'yes-or-no-p 'y-or-n-p)

Loading…
Cancel
Save