Adds a simplified emacs configuration

This commit is contained in:
William Carroll 2016-12-26 00:40:14 -05:00
parent 6537a69574
commit 94113a2dac
2 changed files with 47 additions and 74 deletions

View file

@ -1,79 +1,32 @@
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil 'noerror) ;; Added by Package.el. This must come before configurations of
(with-current-buffer ;; installed packages. Don't delete this line. If you don't want it,
(url-retrieve-synchronously ;; just comment it out by adding a semicolon to the start of the line.
"https://raw.githubusercontent.com/dimitri/el-get/master/el-get-install.el") ;; You may delete these explanatory comments.
(goto-char (point-max)) (package-initialize)
(eval-print-last-sexp)))
(add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes") (require 'package)
(el-get 'sync) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(custom-set-variables
(load-theme 'monokai t) ;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Exit insert mode by pressing jk in sequence ;; Your init file should contain only one such instance.
(setq key-chord-two-keys-delay 0.5) ;; If there is more than one, they won't work right.
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state) '(package-selected-packages
(key-chord-mode 1) (quote
(helm magit dockerfile-mode elixir-mode elm-mode ack))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(setq (load-theme 'wombat)
el-get-sources
'((:name evil
:after (progn
;; my vim bindings
; (define-key evil-normal-state-map "\C-;" 'comment-line)
;; (define-key evil-normal-state-map "vv" 'split-window-vertically)
;; (define-key evil-normal-state-map "vs" 'split-window-vertically)
;; (define-key evil-normal-state-map "ss" 'split-window-horizontally)
;; (define-key evil-normal-state-map "sp" 'split-window-horizontally)
(define-key evil-normal-state-map "\S-h" 'evil-beginning-of-line)
(define-key evil-normal-state-map "\S-l" 'evil-end-of-line)
(define-key evil-visual-state-map "\S-h" 'evil-beginning-of-line)
(define-key evil-visual-state-map "\S-l" 'evil-beginning-of-line)
(define-key evil-insert-state-map "\C-a" 'beginning-of-line)
(define-key evil-insert-state-map "\C-e" 'end-of-line)))
(:name auto-complete
:after (progn
(define-key ac-complete-mode-map "\C-n" 'ac-next)
(define-key ac-complete-mode-map "\C-p" 'ac-previous)))))
(setq
my:el-get-packages
'(el-get
alchemist
auto-complete
evil
monokai-theme
neotree))
(el-get 'sync my:el-get-packages)
;; Generic Settings
;; Line numbering
(line-number-mode 1) ; have line numbers and
(column-number-mode 1) ; column numbers in the mode line
(global-linum-mode 1) ; add line numbers on the left
;; activates evil-mode
(evil-mode 1)
;; evil-leader settings
;; enables evil-leader every time evil-mode is loaded.
(global-evil-leader-mode)
;; change the <leader> key
(evil-leader/set-leader "<SPC>")
;; neotree settings
(evil-leader/set-key
"n" 'neotree-toggle
)
;; Helm Settings
;; Use helm M-x instead of native M-x
(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "C-x C-f") 'helm-find-files)
(global-set-key (kbd "C-x C-b") 'helm-buffers-list)

View file

@ -65,6 +65,12 @@ Plugin 'godlygeek/tabular'
" Visually Highlight and comment code. " Visually Highlight and comment code.
Plugin 'tpope/vim-commentary' Plugin 'tpope/vim-commentary'
" Macros for quotes, parens, etc.
Plugin 'tpope/vim-surround'
" Allows Plugins to be repeated with `.` character
Plugin 'tpope/vim-repeat'
" Seamlessly navigate Vim and Tmux with similar bindings. " Seamlessly navigate Vim and Tmux with similar bindings.
Plugin 'christoomey/vim-tmux-navigator' Plugin 'christoomey/vim-tmux-navigator'
@ -108,6 +114,10 @@ highlight Comment cterm=italic
let mapleader = " " let mapleader = " "
" Auto resize window splits
autocmd VimResized * wincmd =
" Neomake Settings " Neomake Settings
autocmd! BufWritePost * Neomake autocmd! BufWritePost * Neomake
@ -182,6 +192,16 @@ set foldlevel=4
set relativenumber set relativenumber
" emulate ci" and ci' behavior
nnoremap ci( f)ci(
nnoremap ci[ f]ci[
" extend functionality of <C-e> & <C-y> scrolling
nnoremap <C-e> <C-e>j
nnoremap <C-y> <C-y>k
" Opens all folds within the buffer " Opens all folds within the buffer
nnoremap ZZ zR nnoremap ZZ zR