Skip to content

Instantly share code, notes, and snippets.

@bryangarza
Created June 1, 2015 21:51
Show Gist options
  • Select an option

  • Save bryangarza/a4f35d4958dc4f18e929 to your computer and use it in GitHub Desktop.

Select an option

Save bryangarza/a4f35d4958dc4f18e929 to your computer and use it in GitHub Desktop.

Revisions

  1. bryangarza revised this gist Jun 1, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions barebones-lmao.el
    Original file line number Diff line number Diff line change
    @@ -8,8 +8,8 @@
    (package-refresh-contents))

    (defvar my-packages '(evil
    rainbow-delimiters
    magit))
    rainbow-delimiters
    magit))

    (dolist (p my-packages)
    (when (not (package-installed-p p))
  2. bryangarza created this gist Jun 1, 2015.
    45 changes: 45 additions & 0 deletions barebones-lmao.el
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    (require 'cl)
    (require 'package)
    (add-to-list 'package-archives
    '("melpa" . "http://melpa.org/packages/") t)
    (package-initialize)

    (when (not package-archive-contents)
    (package-refresh-contents))

    (defvar my-packages '(evil
    rainbow-delimiters
    magit))

    (dolist (p my-packages)
    (when (not (package-installed-p p))
    (package-install p)))

    (global-rainbow-delimiters-mode t)
    (setq electric-indent-mode t)
    (menu-bar-mode -1)
    (global-linum-mode 1) ; display line numbers
    (column-number-mode 1) ; display column and row of cursor in mode-line
    (add-hook 'text-mode-hook 'turn-on-auto-fill) ; when opening a text file, hard wrap it

    (require 'evil)
    (evil-mode 1)

    ;; change mode-line color by evil state
    (lexical-let ((default-color (cons (face-background 'mode-line)
    (face-foreground 'mode-line))))
    (add-hook 'post-command-hook
    (lambda ()
    (let ((color (cond ((minibufferp) default-color)
    ((evil-insert-state-p) '("#e80000" . "#ffffff"))
    ((evil-emacs-state-p) '("#444488" . "#ffffff"))
    ((buffer-modified-p) '("#006fa0" . "#ffffff"))
    (t default-color))))
    (set-face-background 'mode-line (car color))
    (set-face-foreground 'mode-line (cdr color))))))

    ;; for when you install themes, look at how I do it
    ;;(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
    ;;(load-theme 'noctilux t)

    (fset 'yes-or-no-p 'y-or-n-p) ;; replace yes or no with y or n