Extends configs and colorschemes

This commit is contained in:
William Carroll 2017-01-05 20:39:32 -05:00
parent f2663c5b37
commit 328d4b246b
5 changed files with 201 additions and 42 deletions

View file

@ -7,34 +7,52 @@
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; 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) '(mouse-wheel-mode nil)
'(neo-window-fixed-size nil) '(neo-window-fixed-size nil)
'(neo-window-width 35) '(neo-window-width 35)
'(package-selected-packages '(package-selected-packages
(quote (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
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(hl-line ((t (:background "gray7"))))) '(hl-line ((t (:inherit nil)))))
;; Colorscheme ;; 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 ;; Automatically follow symlinks
(setq vc-follow-symlinks t) (setq vc-follow-symlinks t)
;; NyanCat progress bar
;; (nyan-mode)
;; Enable autocompletion ;; Enable autocompletion
(add-hook 'after-init-hook 'global-company-mode) (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 ;; Helm Settings
(require 'helm) (require 'helm)
(require 'helm-config) (require 'helm-config)
@ -46,6 +64,7 @@
(global-set-key (kbd "C-x C-f") 'helm-projectile) (global-set-key (kbd "C-x C-f") 'helm-projectile)
(global-set-key (kbd "M-y") 'helm-show-kill-ring) (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 b") 'helm-mini)
(global-set-key (kbd "C-x C-b") 'helm-buffers-list)
(global-set-key (kbd "C-c h o") 'helm-swoop) (global-set-key (kbd "C-c h o") 'helm-swoop)
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) (define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action)
@ -63,21 +82,54 @@
(helm-mode 1) (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 Settings
(projectile-mode) (projectile-mode t)
(setq projectile-completion-system 'helm) (setq projectile-completion-system 'helm)
(helm-projectile-on) (helm-projectile-on)
(setq projectile-switch-project-action 'helm-projectile) (setq projectile-switch-project-action 'helm-projectile)
;; Alchemist Settings ;; 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 ;; Evil Settings
(require 'evil) (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 ;; NeoTree Settings
(require 'neotree) (require 'neotree)
@ -100,11 +152,6 @@
(add-hook 'neotree-mode-hook (lambda () (bootstrap-evil-mode) (hl-line-mode)) ) (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 ;; Window movement
(global-set-key (kbd "C-c w f") 'windmove-right) (global-set-key (kbd "C-c w f") 'windmove-right)
(global-set-key (kbd "C-c w b") 'windmove-left) (global-set-key (kbd "C-c w b") 'windmove-left)
@ -116,9 +163,6 @@
;; Hide the menu-bar ;; Hide the menu-bar
(setq ns-auto-hide-menu-bar t) (setq ns-auto-hide-menu-bar t)
;; Use non-native fullscreen
(setq ns-use-native-fullscreen nil)
;; Native App Settings ;; Native App Settings
(tool-bar-mode -1) (tool-bar-mode -1)
@ -129,7 +173,8 @@
(setq-default indent-tabs-mode nil) (setq-default indent-tabs-mode nil)
;; Change font settings ;; 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 ;; Personalized Evil-mode settings
@ -138,19 +183,23 @@
`global-map` when inside Vim's `normal` mode. It disables Vim key-bindings `global-map` when inside Vim's `normal` mode. It disables Vim key-bindings
when in Vim's `insert` mode, favoring native Emacs bindings instead." when in Vim's `insert` mode, favoring native Emacs bindings instead."
(interactive) (interactive)
(evil-local-mode) (evil-local-mode t)
;; Toggle off Emacs bindings when in Vim `normal` mode except: ;; Toggle off Emacs bindings when in Vim `normal` mode except:
;; * `M-x` ;; * `M-x`
;; (setcdr global-map nil) ;; (setcdr global-map nil)
;; (define-key global-map (kbd "M-x") 'helm-M-x) ;; (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 ;; 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 "RET") nil)
(define-key evil-motion-state-map (kbd "SPC") 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 ;; 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-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-h") 'evil-window-left)
(define-key evil-normal-state-map (kbd "C-l") 'evil-window-right) (define-key evil-normal-state-map (kbd "C-l") 'evil-window-right)
@ -162,6 +211,9 @@ when in Vim's `insert` mode, favoring native Emacs bindings instead."
(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-j") (lambda () (interactive) (evil-window-split) (evil-window-down 1) ))
(define-key evil-normal-state-map (kbd "M-k") (lambda () (interactive) (evil-window-split) )) (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: ;; Toggle off Vim bindings when in Vim `insert` mode except:
;; * `<escape>` <ESC> ;; * `<escape>` <ESC>
;; * `j k` <ESC> ;; * `j k` <ESC>
@ -182,6 +234,3 @@ when in Vim's `insert` mode, favoring native Emacs bindings instead."
;; Add transparency ;; Add transparency
(set-frame-parameter (selected-frame) 'alpha '(90 . 50)) (set-frame-parameter (selected-frame) 'alpha '(90 . 50))
(add-to-list 'default-frame-alist '(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)

View file

@ -1,7 +1,7 @@
# change tmux leader # change tmux leader
unbind C-b # unbind C-b
set -g prefix C-a # set -g prefix C-a
bind C-a send-prefix # bind C-a send-prefix
# COLORS! # COLORS!
@ -40,6 +40,97 @@ set -s escape-time 0
set -g base-index 1 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 # window naming nonsense
set-window-option -g automatic-rename on set-window-option -g automatic-rename on
set-window-option -g allow-rename off set-window-option -g allow-rename off

View file

@ -88,6 +88,9 @@ Plugin 'yegappan/mru'
Plugin 'zanglg/nova.vim' Plugin 'zanglg/nova.vim'
" Emulates Emacs's Helm Swoop search
Plugin 'pelodelfuego/vim-swoop'
call vundle#end() " required call vundle#end() " required
filetype plugin indent on " required filetype plugin indent on " required
" Put your non-Plugin stuff after this line " Put your non-Plugin stuff after this line
@ -95,6 +98,11 @@ filetype plugin indent on " required
" Basic settings " Basic settings
" Thin cursor on INSERT mode
if has('nvim')
let $NVIM_TUI_ENABLE_CURSOR_SHAPE = 1
endif
set number set number
set wrap! set wrap!
set tabstop=2 set tabstop=2
@ -103,7 +111,7 @@ set shiftwidth=2
set background=dark set background=dark
syntax enable syntax enable
colorscheme nova colorscheme onedark
set termguicolors set termguicolors
@ -162,6 +170,11 @@ let g:airline_powerline_fonts = 1
let g:airline_theme = 'hybrid' let g:airline_theme = 'hybrid'
" Vim-Swoop Settings
" Edits colorscheme
let g:swoopHighlight = ["hi! link SwoopBufferLineHi Warning", "hi! link SwoopPatternHi Error"]
" Jump to buffers. " Jump to buffers.
nmap <F1> :1b<CR> nmap <F1> :1b<CR>
nmap <F2> :2b<CR> nmap <F2> :2b<CR>
@ -187,14 +200,10 @@ set showcmd
" Code folding " Code folding
set foldmethod=indent " set foldmethod=indent
set foldnestmax=10 " set foldnestmax=10
set nofoldenable " set nofoldenable
set foldlevel=4 " set foldlevel=4
" Use relative line numbers
set relativenumber
" emulate ci" and ci' behavior " emulate ci" and ci' behavior
@ -210,26 +219,26 @@ vnoremap <C-y> <C-y>k
" Opens all folds within the buffer " Opens all folds within the buffer
nnoremap ZZ zR " nnoremap ZZ zR
" Closes all folds within the buffer " Closes all folds within the buffer
nnoremap zz zM " nnoremap zz zM
" Opens all folds beneath the cursor " Opens all folds beneath the cursor
" NOTE: j is the character to go down " NOTE: j is the character to go down
nnoremap zJ zO " nnoremap zJ zO
" Opens single fold beneath the cursor " Opens single fold beneath the cursor
" NOTE: j is the character to go down " NOTE: j is the character to go down
nnoremap zj zo " nnoremap zj zo
" Opens single fold beneath the cursor " Opens single fold beneath the cursor
" NOTE: k is the character to go down " NOTE: k is the character to go down
nnoremap zK zC " nnoremap zK zC
" Opens single fold beneath the cursor " Opens single fold beneath the cursor
" NOTE: k is the character to go down " NOTE: k is the character to go down
nnoremap zk zc " nnoremap zk zc
" Lookup Dash word under cursor in Dash " Lookup Dash word under cursor in Dash

View file

@ -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 # make vim the default editor for commit messages etc
export EDITOR=$(which vim) export EDITOR=$(which vim)

View file

@ -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 # output the stash ticket number to STDOUT
function wgtix { function wgtix {
wgbranch | perl -p -e 's/(?:feature|bugfix|refactor)\/(\w+-\d+).+$/\1/' wgbranch | perl -p -e 's/(?:feature|bugfix|refactor)\/(\w+-\d+).+$/\1/'