diff options
Diffstat (limited to 'configs')
-rw-r--r-- | configs/.emacs | 109 | ||||
-rw-r--r-- | configs/.vimrc | 20 |
2 files changed, 51 insertions, 78 deletions
diff --git a/configs/.emacs b/configs/.emacs index e8f98a082d17..e3f89b63a5a2 100644 --- a/configs/.emacs +++ b/configs/.emacs @@ -1,79 +1,32 @@ -(add-to-list 'load-path "~/.emacs.d/el-get/el-get") - -(unless (require 'el-get nil 'noerror) - (with-current-buffer - (url-retrieve-synchronously - "https://raw.githubusercontent.com/dimitri/el-get/master/el-get-install.el") - (goto-char (point-max)) - (eval-print-last-sexp))) - -(add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes") -(el-get 'sync) - -(load-theme 'monokai t) - -;; Exit insert mode by pressing jk in sequence -(setq key-chord-two-keys-delay 0.5) -(key-chord-define evil-insert-state-map "jk" 'evil-normal-state) -(key-chord-mode 1) - - -(setq -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 - ) +;; Added by Package.el. This must come before configurations of +;; installed packages. Don't delete this line. If you don't want it, +;; just comment it out by adding a semicolon to the start of the line. +;; You may delete these explanatory comments. +(package-initialize) + +(require 'package) +(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) +(custom-set-variables + ;; custom-set-variables 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. + '(package-selected-packages + (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. + ) + + +(load-theme 'wombat) + +;; 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) diff --git a/configs/.vimrc b/configs/.vimrc index 63d5d6271a46..6b733d473a7a 100644 --- a/configs/.vimrc +++ b/configs/.vimrc @@ -65,6 +65,12 @@ Plugin 'godlygeek/tabular' " Visually Highlight and comment code. 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. Plugin 'christoomey/vim-tmux-navigator' @@ -108,6 +114,10 @@ highlight Comment cterm=italic let mapleader = " " +" Auto resize window splits +autocmd VimResized * wincmd = + + " Neomake Settings autocmd! BufWritePost * Neomake @@ -182,6 +192,16 @@ set foldlevel=4 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 nnoremap ZZ zR |