about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2017-01-06T01·39-0500
committerWilliam Carroll <wpcarro@gmail.com>2017-01-06T01·39-0500
commit328d4b246bb16f89cadbb9eb4836a41a655fc0e4 (patch)
treefa5a88b760a85eadd324e87f55afd338d3f13abb
parentf2663c5b371c6832ddef23cd985d4930d1867a5c (diff)
Extends configs and colorschemes
-rw-r--r--configs/.emacs95
-rw-r--r--configs/.tmux.conf97
-rw-r--r--configs/.vimrc39
-rw-r--r--configs/.zsh_profile2
-rw-r--r--functions/git_functions.sh10
5 files changed, 201 insertions, 42 deletions
diff --git a/configs/.emacs b/configs/.emacs
index 858239067938..2bbcbb22a0f1 100644
--- a/configs/.emacs
+++ b/configs/.emacs
@@ -7,34 +7,52 @@
  ;; 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.
+ '(custom-safe-themes
+   (quote
+    ("6254372d3ffe543979f21c4a4179cd819b808e5dd0f1787e2a2a647f5759c1d1" "8ec2e01474ad56ee33bc0534bdbe7842eea74dccfb576e09f99ef89a705f5501" "5b24babd20e58465e070a8d7850ec573fe30aca66c8383a62a5e7a3588db830b" "eb0a314ac9f75a2bf6ed53563b5d28b563eeba938f8433f6d1db781a47da1366" "3d47d88c86c30150c9a993cc14c808c769dad2d4e9d0388a24fee1fbf61f0971" default)))
+ '(evil-shift-width 2)
  '(mouse-wheel-mode nil)
  '(neo-window-fixed-size nil)
  '(neo-window-width 35)
  '(package-selected-packages
    (quote
-    (neotree evil helm-swoop iedit vimrc-mode helm-ispell transpose-frame helm-projectile helm-ack nyan-mode alchemist helm magit dockerfile-mode elixir-mode elm-mode ack))))
+    (atom-one-dark-theme exec-path-from-shell clues-theme gotham-theme dracula-theme zenburn-theme fill-column-indicator neotree evil helm-swoop iedit vimrc-mode helm-ispell transpose-frame helm-projectile helm-ack nyan-mode alchemist helm magit dockerfile-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.
- '(hl-line ((t (:background "gray7")))))
+ '(hl-line ((t (:inherit nil)))))
+
 
 ;; Colorscheme
-(load-theme 'wombat)
+(load-theme 'atom-one-dark)
+
+
+;; Properly configure GUI Emacs to use $PATH values
+(when (memq window-system '(mac ns))
+  (exec-path-from-shell-initialize))
+
+
+;; Emacs backup / autosave files
+;; (setq-default make-backup-files nil)
+(setq backup-inhibited t)
+(setq auto-save-default nil)
 
-;; Emacs backup files
-(setq-default make-backup-files nil)
 
 ;; Automatically follow symlinks
 (setq vc-follow-symlinks t)
 
-;; NyanCat progress bar
-;; (nyan-mode)
 
 ;; Enable autocompletion
 (add-hook 'after-init-hook 'global-company-mode)
 
+
+;; Fullscreen settings
+(setq ns-use-native-fullscreen nil)
+(global-set-key (kbd "<s-return>") 'toggle-frame-fullscreen)
+
+
 ;; Helm Settings
 (require 'helm)
 (require 'helm-config)
@@ -46,6 +64,7 @@
 (global-set-key (kbd "C-x C-f") 'helm-projectile)
 (global-set-key (kbd "M-y") 'helm-show-kill-ring)
 (global-set-key (kbd "C-x b") 'helm-mini)
+(global-set-key (kbd "C-x C-b") 'helm-buffers-list)
 (global-set-key (kbd "C-c h o") 'helm-swoop)
 
 (define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action)
@@ -63,21 +82,54 @@
 (helm-mode 1)
 
 
+;; Add 80 column marker
+(require 'whitespace)
+(setq whitespace-line-column 80) ;; limit line length
+(setq whitespace-style '(face lines-tail))
+(add-hook 'prog-mode-hook 'whitespace-mode)
+
+
 ;; Projectile Settings
-(projectile-mode)
+(projectile-mode t)
 (setq projectile-completion-system 'helm)
 (helm-projectile-on)
-
 (setq projectile-switch-project-action 'helm-projectile)
 
 
 ;; Alchemist Settings
-(add-hook 'elixir-mode-hook 'alchemist-mode)
+(require 'alchemist)
+(setq alchemist-mix-env "prod")
+
+(setq alchemist-goto-erlang-source-dir "/usr/local/bin/source/")
+(setq alchemist-goto-elixir-source-dir "/usr/local/bin/erl")
+
+;; Borrow keybinding from list-mode eval
+(define-key global-map (kbd "C-j") nil)
+(define-key alchemist-mode-keymap (kbd "C-j") 'alchemist-eval-current-line)
+
+;; Allow Elixir -> Erlang -> Elixir definition jumping
+(defun custom-erlang-mode-hook ()
+  (define-key erlang-mode-map (kbd "M-,") 'alchemist-goto-jump-back))
+
+(add-hook 'erlang-mode-hook 'custom-erlang-mode-hook)
+
+;; Run tests on file writes
+;; (setq alchemist-hooks-test-on-save t)
 
 
 ;; Evil Settings
 (require 'evil)
 
+(defun register-evil-keybindings-for-neotree ()
+  "Registers keybindings for Evil mode for NeoTree plugin."
+  (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter)
+  (evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-enter)
+  (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide)
+  (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter))
+
+
+;; Display column number alongside row number
+(column-number-mode t)
 
 ;; NeoTree Settings
 (require 'neotree)
@@ -100,11 +152,6 @@
 (add-hook 'neotree-mode-hook (lambda () (bootstrap-evil-mode) (hl-line-mode)) )
 
 
-;; Buffer scrolling functions
-(global-set-key (kbd "M-n") (lambda () (interactive) (scroll-up 1) (next-line 1)))
-(global-set-key (kbd "M-p") (lambda () (interactive) (scroll-down 1) (previous-line 1)))
-
-
 ;; Window movement
 (global-set-key (kbd "C-c w f") 'windmove-right)
 (global-set-key (kbd "C-c w b") 'windmove-left)
@@ -116,9 +163,6 @@
 ;; Hide the menu-bar
 (setq ns-auto-hide-menu-bar t)
 
-;; Use non-native fullscreen
-(setq ns-use-native-fullscreen nil)
-
 ;; Native App Settings
 (tool-bar-mode -1)
 
@@ -129,7 +173,8 @@
 (setq-default indent-tabs-mode nil)
 
 ;; Change font settings
-(add-to-list 'default-frame-alist '(font . "Hasklig"))
+(set-face-attribute 'default nil :height 100)
+(add-to-list 'default-frame-alist '(font . "Operator Mono"))
 
 
 ;; Personalized Evil-mode settings
@@ -138,19 +183,23 @@
 `global-map` when inside Vim's `normal` mode. It disables Vim key-bindings
 when in Vim's `insert` mode, favoring native Emacs bindings instead."
   (interactive)
-  (evil-local-mode)
+  (evil-local-mode t)
 
   ;; Toggle off Emacs bindings when in Vim `normal` mode except:
   ;;   * `M-x`
   ;; (setcdr global-map nil)
   ;; (define-key global-map (kbd "M-x") 'helm-M-x)
 
+  (define-key evil-normal-state-map (kbd "") nil)
+
   ;; unbind <SPC> and <CR> in normal mode since they're hardly used
   (define-key evil-motion-state-map (kbd "RET") nil)
   (define-key evil-motion-state-map (kbd "SPC") nil)
+  (define-key evil-normal-state-map (kbd "M-.") nil)
 
   ;; use 'helm-swoop for interactive search
   (define-key evil-motion-state-map (kbd "/") 'helm-swoop)
+  (define-key evil-motion-state-map (kbd "?") 'helm-swoop)
 
   (define-key evil-normal-state-map (kbd "C-h") 'evil-window-left)
   (define-key evil-normal-state-map (kbd "C-l") 'evil-window-right)
@@ -161,6 +210,9 @@ when in Vim's `insert` mode, favoring native Emacs bindings instead."
   (define-key evil-normal-state-map (kbd "M-h") (lambda () (interactive) (evil-window-vsplit) ))
   (define-key evil-normal-state-map (kbd "M-j") (lambda () (interactive) (evil-window-split) (evil-window-down 1) ))
   (define-key evil-normal-state-map (kbd "M-k") (lambda () (interactive) (evil-window-split) ))
+
+  ;; Plugin-specific keybindings
+  (register-evil-keybindings-for-neotree)
   
   ;; Toggle off Vim bindings when in Vim `insert` mode except:
   ;;   * `<escape>` <ESC>
@@ -182,6 +234,3 @@ when in Vim's `insert` mode, favoring native Emacs bindings instead."
 ;; Add transparency
 (set-frame-parameter (selected-frame) 'alpha '(90 . 50))
 (add-to-list 'default-frame-alist '(alpha . (90 . 50)))
-
-;; Full-screen as Command <CR>
-(global-set-key (kbd "<s-return>") 'toggle-frame-fullscreen)
diff --git a/configs/.tmux.conf b/configs/.tmux.conf
index fd9bd3593ca3..fcc477774562 100644
--- a/configs/.tmux.conf
+++ b/configs/.tmux.conf
@@ -1,7 +1,7 @@
 # change tmux leader
-unbind C-b
-set -g prefix C-a
-bind C-a send-prefix
+# unbind C-b
+# set -g prefix C-a
+# bind C-a send-prefix
 
 
 # COLORS!
@@ -40,6 +40,97 @@ set -s escape-time 0
 set -g base-index 1
 
 
+######################
+### DESIGN CHANGES ###
+######################
+
+# panes
+set -g pane-border-fg black
+set -g pane-active-border-fg brightred
+
+## Status bar design
+# status line
+set -g status-utf8 on
+set -g status-justify left
+set -g status-bg default
+set -g status-fg colour12
+set -g status-interval 2
+
+# messaging
+set -g message-fg black
+set -g message-bg yellow
+set -g message-command-fg blue
+set -g message-command-bg black
+
+#window mode
+setw -g mode-bg colour6
+setw -g mode-fg colour0
+
+# window status
+setw -g window-status-format " #F#I:#W#F "
+setw -g window-status-current-format " #F#I:#W#F "
+setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
+setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
+setw -g window-status-current-bg colour0
+setw -g window-status-current-fg colour11
+setw -g window-status-current-attr dim
+setw -g window-status-bg green
+setw -g window-status-fg black
+setw -g window-status-attr reverse
+
+# Info on left (I don't have a session display for now)
+set -g status-left ''
+
+# The modes {
+setw -g clock-mode-colour colour135
+setw -g mode-attr bold
+setw -g mode-fg colour196
+setw -g mode-bg colour238
+
+# }
+# The panes {
+
+set -g pane-border-bg colour235
+set -g pane-border-fg colour238
+set -g pane-active-border-bg colour236
+set -g pane-active-border-fg colour51
+
+# }
+# The statusbar {
+
+set -g status-position bottom
+set -g status-bg colour234
+set -g status-fg colour137
+set -g status-attr dim
+set -g status-left ''
+set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
+set -g status-right-length 50
+set -g status-left-length 20
+
+setw -g window-status-current-fg colour81
+setw -g window-status-current-bg colour238
+setw -g window-status-current-attr bold
+setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
+
+setw -g window-status-fg colour138
+setw -g window-status-bg colour235
+setw -g window-status-attr none
+setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
+
+setw -g window-status-bell-attr bold
+setw -g window-status-bell-fg colour255
+setw -g window-status-bell-bg colour1
+
+# }
+# The messages {
+
+set -g message-attr bold
+set -g message-fg colour232
+set -g message-bg colour166
+
+# }
+
+
 # window naming nonsense
 set-window-option -g automatic-rename on
 set-window-option -g allow-rename off
diff --git a/configs/.vimrc b/configs/.vimrc
index 62880d34d8a6..5c997fb78fa2 100644
--- a/configs/.vimrc
+++ b/configs/.vimrc
@@ -88,6 +88,9 @@ Plugin 'yegappan/mru'
 
 Plugin 'zanglg/nova.vim'
 
+" Emulates Emacs's Helm Swoop search
+Plugin 'pelodelfuego/vim-swoop'
+
 call vundle#end()            " required
 filetype plugin indent on    " required
 " Put your non-Plugin stuff after this line
@@ -95,6 +98,11 @@ filetype plugin indent on    " required
 
 
 " Basic settings
+" Thin cursor on INSERT mode
+if has('nvim')
+  let $NVIM_TUI_ENABLE_CURSOR_SHAPE = 1
+endif
+
 set number
 set wrap!
 set tabstop=2
@@ -103,7 +111,7 @@ set shiftwidth=2
 set background=dark
 
 syntax enable
-colorscheme nova
+colorscheme onedark
 
 set termguicolors
 
@@ -162,6 +170,11 @@ let g:airline_powerline_fonts = 1
 let g:airline_theme = 'hybrid'
 
 
+" Vim-Swoop Settings
+" Edits colorscheme
+let g:swoopHighlight = ["hi! link SwoopBufferLineHi Warning", "hi! link SwoopPatternHi Error"]
+
+
 " Jump to buffers.
 nmap <F1> :1b<CR>
 nmap <F2> :2b<CR>
@@ -187,14 +200,10 @@ set showcmd
 
 
 " Code folding
-set foldmethod=indent
-set foldnestmax=10
-set nofoldenable
-set foldlevel=4
-
-
-" Use relative line numbers
-set relativenumber
+" set foldmethod=indent
+" set foldnestmax=10
+" set nofoldenable
+" set foldlevel=4
 
 
 " emulate ci" and ci' behavior
@@ -210,26 +219,26 @@ vnoremap <C-y> <C-y>k
 
 
 " Opens all folds within the buffer
-nnoremap ZZ zR
+" nnoremap ZZ zR
 
 " Closes all folds within the buffer
-nnoremap zz zM
+" nnoremap zz zM
 
 " Opens all folds beneath the cursor
 " NOTE: j is the character to go down
-nnoremap zJ zO
+" nnoremap zJ zO
 
 " Opens single fold beneath the cursor
 " NOTE: j is the character to go down
-nnoremap zj zo
+" nnoremap zj zo
 
 " Opens single fold beneath the cursor
 " NOTE: k is the character to go down
-nnoremap zK zC
+" nnoremap zK zC
 
 " Opens single fold beneath the cursor
 " NOTE: k is the character to go down
-nnoremap zk zc
+" nnoremap zk zc
 
 
 " Lookup Dash word under cursor in Dash
diff --git a/configs/.zsh_profile b/configs/.zsh_profile
index 042fd2f6f062..c6d3f53bbddc 100644
--- a/configs/.zsh_profile
+++ b/configs/.zsh_profile
@@ -1,4 +1,4 @@
-export PATH=$HOME/bin:/opt/local/bin:/opt/local/sbin:/usr/local/go/bin:/usr/local/sbin:$PATH
+export PATH=/Users/wpcarro/bin:/opt/local/bin:/opt/local/sbin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/fzf/bin:/Users/wpcarro/n/bin
 
 # make vim the default editor for commit messages etc
 export EDITOR=$(which vim)
diff --git a/functions/git_functions.sh b/functions/git_functions.sh
index 02be2ff5fbae..e387e1ea3ede 100644
--- a/functions/git_functions.sh
+++ b/functions/git_functions.sh
@@ -4,6 +4,16 @@ function wgbranch {
 }
 
 
+# compare file with another branch
+function wgcompare_file {
+  file_path="$1"
+  compare_branch_a="master"
+  compare_branch_b="$(wgbranch)"
+
+  git diff "${compare_branch_a}:${file_path}" "${compare_branch_b}:${file_path}"
+}
+
+
 # output the stash ticket number to STDOUT
 function wgtix {
   wgbranch | perl -p -e 's/(?:feature|bugfix|refactor)\/(\w+-\d+).+$/\1/'