Bo Jeanes 2019-07-22 16:21:32 +10:00
parent b1d33965e3
commit 49ba55207f
26 changed files with 399 additions and 148 deletions

View File

@ -1,11 +1,16 @@
brew 'mas'
mas 'Annotate - Capture and Share', id: 918207447
mas 'Slack', id: 803453959
mas 'MindNode 5', id: 1289197285
cask 'google-chrome'
cask 'firefox'
cask 'virtualbox'
cask 'keepingyouawake'
cask 'yakyak'
cask 'iterm2'
cask 'sonos'
cask 'insomnia'
# dev
mas 'Kaleidoscope', id: 587512244
@ -18,10 +23,9 @@ brew 'chruby'
brew 'ruby-install'
brew 'phantomjs'
brew 'chromedriver'
brew 'yarn'
brew 'node'
brew 'npm'
brew 'multirust'
brew 'yarn'
#brew 'multirust'
brew 'rust'
brew 'crystal-lang'
brew 'elixir'
@ -39,6 +43,8 @@ brew 'wget'
brew 'tree'
brew 'coreutils'
brew 'pv'
brew 'tmux'
brew 'htop'
# shells
brew 'zsh'

View File

@ -1,11 +1,15 @@
" RSpec
if expand('%') =~# '_spec\.rb$'
syn keyword rubyRspec describe context it specify it_should_behave_like before after setup subject let shared_context shared_examples_for shared_examples
endif
" Syntax highlighting
if expand('%') =~# '_spec\.rb$'
syn keyword rubyRspec describe context it specify it_should_behave_like before after setup subject let shared_context shared_examples_for
endif
hi def link rubyRspec Function
hi def link rubyRspec Function
nmap <silent> <Leader>rf mr:set foldmethod=syntax<CR>zMzv?\v^\s*(it\|example)<CR>zz:noh<CR>`r:delmarks r<CR>
let s:bcs = b:current_syntax
unlet b:current_syntax
syntax include @SQL syntax/sql.vim
let b:current_syntax = s:bcs
syntax region hereDocDashSQL matchgroup=Statement start=+<<[-~.]\?\z(SQL\%(DOC\)\?\)+ end=+^\s*\z1+ contains=@SQL
" Focus folding on spec"
nmap <silent> <Leader>rf mr:set foldmethod=syntax<CR>zMzv?\v^\s*(it\|example)<CR>zz:noh<CR>`r:delmarks r<CR>

View File

@ -36,6 +36,8 @@ Plug 'kana/vim-textobj-user' " Create new text objects
Plug 'michaeljsmith/vim-indent-object'
Plug 'argtextobj.vim'
Plug 'neoclide/coc.nvim', {'tag': '*', 'do': { -> coc#util#install()}}
"let g:crystal_auto_format = 1
Plug 'rhysd/vim-crystal' " polyglot doesn't include plugin dir, where much of plugin is set
@ -52,14 +54,21 @@ Plug 'tpope/vim-rake'
Plug 'thisivan/vim-ruby-matchit'
Plug 'nelstrom/vim-textobj-rubyblock', { 'for': 'ruby' }
Plug 'ap/vim-css-color'
" Plug 'Chiel92/vim-autoformat'
Plug 'janko-m/vim-test'
let test#strategy = "neovim" " Run test using vim-dispatch
Plug 'scrooloose/syntastic'
let g:syntastic_enable_signs = 1
let g:syntastic_auto_loc_list = 0
Plug 'w0rp/ale'
let g:ale_fix_on_save = 1
let g:ale_completion_enabled = 1
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'javascript': ['eslint'],
\ 'ruby': ['rubocop'],
\}
Plug 'vim-airline/vim-airline'
let g:airline_powerline_fonts = 1

View File

@ -0,0 +1,82 @@
" if hidden not set, TextEdit might fail.
set hidden
" Better display for messages
set cmdheight=2
" Smaller updatetime for CursorHold & CursorHoldI
set updatetime=300
" always show signcolumns
set signcolumn=yes
" Use tab for trigger completion with characters ahead and navigate.
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> for trigger completion.
inoremap <silent><expr> <c-space> coc#refresh()
" Use <cr> for confirm completion, `<C-g>u` means break undo chain at current position.
" Coc only does snippet and additional edit on confirm.
"inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
" NOTE: above mapping disabled due to https://github.com/tpope/vim-endwise/issues/22#issuecomment-446042476
" Use `[c` and `]c` for navigate diagnostics
nmap <silent> [c <Plug>(coc-diagnostic-prev)
nmap <silent> ]c <Plug>(coc-diagnostic-next)
" Remap keys for gotos
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K for show documentation in preview window
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if &filetype == 'vim'
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction
" Highlight symbol under cursor on CursorHold
autocmd CursorHold * silent call CocActionAsync('highlight')
" Remap for rename current word
nmap <leader>rn <Plug>(coc-rename)
" Remap for format selected region
vmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
" Setup formatexpr specified filetype(s).
augroup mygroup
autocmd!
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
augroup end
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
vmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap for do codeAction of current line
nmap <leader>ac <Plug>(coc-codeaction)

View File

@ -104,7 +104,9 @@ if exists('$TMUX')
let &t_SI = "\<Esc>[3 q"
let &t_EI = "\<Esc>[0 q"
set term=screen-256color
if !has('nvim')
set term=screen-256color
endif
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"

View File

@ -3,6 +3,7 @@ set nocompatible
let mapleader = "\<Space>"
source ~/.vim/bundles.vim
source ~/.vim/coc.vim
source ~/.vim/ui.vim
source ~/.vim/autocommands.vim
source ~/.vim/ruby.vim
@ -12,6 +13,7 @@ set backupskip=/tmp/*,/private/tmp/*" " don't use backups for tmp files
set directory=~/.vim/dirs/swaps " store swap files here
set undofile " persistent undos
set undodir=~/.vim/dirs/undos " where to store undo histories
set autoread
" For when you forget to sudo.. Really Write the file.
cmap w!! w !sudo tee % >/dev/null
@ -20,8 +22,8 @@ cmap w!! w !sudo tee % >/dev/null
map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
set tags=tmp/tags;/,./tmp/tags;/,tags;/,./tags;/
set pastetoggle=<Leader>p
map <leader>p :set invpaste paste?<CR>
"set pastetoggle=<Leader>pp
nmap <leader>pp :set invpaste paste?<CR>
" Quick editing of common dot-files
map <Leader>vv :edit $MYVIMRC<CR>
@ -35,5 +37,8 @@ endif
map <Leader><Leader> :GFiles<CR>
map <Leader>t :Files<CR>
" For working on highlight/syntax rules
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
hi Normal ctermbg=none

33
freshrc
View File

@ -27,17 +27,42 @@ fresh-options
[ -f ~/.gitconfig.local ] || cp ~/.dotfiles/vcs/git/gitconfig.local ~/.gitconfig.local
mkdir -p ~/.config
ln -sfh ~/.dotfiles/editors/vim ~/.vim
ln -sfh ~/.dotfiles/editors/vim ~/.config/nvim
ln -sfh ~/.vim/vimrc ~/.vimrc
ln -sfh ~/.vim/gvimrc ~/.gvimrc
rm -rf ~/.vim ~/.config/nvim
ln -sfn ~/.dotfiles/editors/vim ~/.vim
ln -sfn ~/.dotfiles/editors/vim ~/.config/nvim
ln -sfn ~/.vim/vimrc ~/.vimrc
ln -sfn ~/.vim/gvimrc ~/.gvimrc
fresh-options --file=~/.zshrc --marker
fresh shells/path.sh
fresh freshshell/fresh contrib/source-build.sh
fresh zsh-users/zsh-history-substring-search zsh-history-substring-search.zsh
fresh mathiasbynens/dotfiles .functions
fresh twe4ked/dotfiles shell/zsh/completion.zsh
fresh junegunn/fzf shell/completion.zsh
fresh junegunn/fzf shell/key-bindings.zsh
fresh shells/common/\*.sh
fresh shells/zsh/\*.zsh
fresh shells/zsh/lib/\*.zsh
fresh-options
fresh zsh-users/zsh-completions src --file=completion/
fresh freshshell/fresh contrib/completion/fresh-completion.zsh --file=completion/_fresh
fresh zsh-users/zsh-syntax-highlighting . --file=vendor/zsh-syntax-highlighting/
fresh garybernhardt/dotfiles bin/run-command-on-git-revisions --bin
fresh junegunn/fzf . --file=~/.fzf/
~/.fresh/source/junegunn/fzf/install --bin
fresh junegunn/fzf bin/fzf --bin
fresh junegunn/fzf bin/fzf-tmux --bin
fresh_after_build() {
# vim +PlugUpdate +PlugClean +qall
true
}

View File

@ -1,7 +1,7 @@
require 'irb/ext/save-history'
require 'irb/completion'
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
ARGV.concat %w[--readline --prompt-mode simple]
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
@ -14,3 +14,33 @@ class Object
(obj.methods - obj.class.superclass.instance_methods).sort
end
end
require 'rubygems'
begin
require 'pry'
Pry.start
exit
rescue LoadError
if defined?(::Bundler)
pry_specs = ENV['GEM_PATH'].split(':').
flat_map { |path| Dir.glob("#{path}/specifications/pry-*.gemspec") }.
flat_map { |path| Gem::Specification.load(path) }
pry_specs = pry_specs.
reverse_sort_by(&:version).
uniq_by(&:name)
pry_specs.each do |spec|
$LOAD_PATH << spec.lib_dirs_glob
end
begin
require 'pry'
Pry.start
exit
rescue LoadError => e
puts e
end
end
end

View File

@ -0,0 +1,41 @@
if defined?(::Bundler)
pry_specs = ENV['GEM_PATH'].split(':').
flat_map { |path| Dir.glob("#{path}/specifications/{method_source,pry,coderay}-*.gemspec") }.
flat_map { |path| Gem::Specification.load(path) }
pry_specs = pry_specs.
sort_by(&:version).
reverse.
uniq(&:name)
pry_specs.each do |spec|
$LOAD_PATH << spec.lib_dirs_glob
end
end
begin
require('pry-inline')
rescue LoadError
end
begin
require('pry-state')
rescue LoadError
end
begin
#require('pry-syntax-hacks')
rescue LoadError
end
if defined?(PryByebug)
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 'f', 'finish'
Pry.commands.alias_command 'u', 'up'
end
if defined?(Rails) && Rails.env
include Rails::ConsoleMethods
end

View File

@ -0,0 +1,17 @@
# try_require = ->(code) do
# begin
# require(code)
# rescue LoadError
# puts "#{code} not installed"
# end
# end
# try_require.('pry')
# try_require.('pry-doc')
# try_require.('pry-byebug')
puts "hi"
require 'bundler/inline'
gemfile(true) do
gem 'pry'
gem 'pry-doc'
gem 'pry-byebug'
end

View File

@ -15,3 +15,4 @@
-- Autocomplete keywords (like SELECT) in upper-case, even if you started
-- typing them in lower case.
\set COMP_KEYWORD_CASE upper
\timing

View File

@ -9,6 +9,8 @@
setw -g mode-keys vi
set -g default-terminal "screen-256color"
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind R source-file ~/.tmux.conf
bind \ confirm-before kill-server

View File

@ -429,7 +429,7 @@ function is_mac {
}
function install_homebrew {
which -s brew && return
command -v brew && return
is_mac || return
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

View File

@ -1 +1,6 @@
source ~/.bashrc
source ~/.bashrc
# added by oblique-fortunes
if command fortune >/dev/null; then fortune oblique; fi
export PATH="$HOME/.cargo/bin:$PATH"

View File

@ -1,11 +1,10 @@
which vim &>/dev/null && editor="$(which vim)"
which nvim &>/dev/null && editor="$(which nvim)"
export EDITOR="$editor -f"
export VISUAL="$editor"
export TERM=xterm-256color
export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;32'
export CLICOLOR=1
export HISTSIZE=1000000

View File

@ -79,12 +79,12 @@ function extract() {
# Custom "command not found" handling (ala method_missing):
# Zsh
function command_not_found_handler() {
function __disabled__command_not_found_handler() {
/usr/bin/env ruby $DOT_FILES/misc/method_missing.rb $*
}
# Bash (call Zsh version)
function command_not_found_handle() {
function __disabled__command_not_found_handle() {
command_not_found_handler $*
return $?
}

View File

@ -1,8 +0,0 @@
alias gi='git init'
alias gst='git status -s'
alias gl='git pull --rebase'
alias gp='git push'
alias ga='git add'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gd='git diff'

View File

@ -1,109 +1,109 @@
osx || return # Only for OS X
if osx; then
alias serial="ioreg -l | grep IOPlatformSerialNumber | cut -f 10 -d' ' | cut -d'\"' -f 2 | pbcopy && echo 'Copied to clipboard'"
alias serial="ioreg -l | grep IOPlatformSerialNumber | cut -f 10 -d' ' | cut -d'\"' -f 2 | pbcopy && echo 'Copied to clipboard'"
function __setup_tmux_wrappers() {
local wrap="reattach-to-user-namespace"
local editors="VISUAL $(env | grep EDITOR | cut -d= -f1)"
function __setup_tmux_wrappers() {
local wrap="reattach-to-user-namespace"
local editors="VISUAL $(env | grep EDITOR | cut -d= -f1)"
alias vim="$wrap vim"
alias mvim="$wrap mvim"
alias vim="$wrap vim"
alias mvim="$wrap mvim"
for editor in $editors; do
eval "$editor='$wrap $(eval "echo \$$editor")'"
done
}
for editor in $editors; do
eval "$editor='$wrap $(eval "echo \$$editor")'"
done
}
if which reattach-to-user-namespace >/dev/null 2>&1; then
# and http://writeheavy.com/2011/10/23/reintroducing-tmux-to-the-osx-clipboard.html
[ -n "$TMUX" ] && __setup_tmux_wrappers
else
if [ -n "$TMUX" ]; then
echo "Installing pbpaste/pbcopy wrappers to get them working in Tmux..."
formula="--HEAD --wrap-pbcopy-and-pbpaste --wrap-launchctl reattach-to-user-namespace"
brew install $formula >/dev/null 2>&1 && echo "Done." || echo "Failed."
__setup_tmux_wrappers
if which reattach-to-user-namespace >/dev/null 2>&1; then
# and http://writeheavy.com/2011/10/23/reintroducing-tmux-to-the-osx-clipboard.html
[ -n "$TMUX" ] && __setup_tmux_wrappers
else
if [ -n "$TMUX" ]; then
echo "Installing pbpaste/pbcopy wrappers to get them working in Tmux..."
formula="--HEAD --wrap-pbcopy-and-pbpaste --wrap-launchctl reattach-to-user-namespace"
brew install $formula >/dev/null 2>&1 && echo "Done." || echo "Failed."
__setup_tmux_wrappers
fi
fi
fi
if [ -z "$JAVA_HOME" -a -d /System/Library/Frameworks/JavaVM.framework/Home ]; then
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
fi
if [ -z "$JAVA_HOME" -a -d /System/Library/Frameworks/JavaVM.framework/Home ]; then
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
fi
alias o='open .'
alias o='open .'
# replacement netstat cmd to find ports used by apps on OS X
alias netstat="sudo lsof -i -P"
alias pubkey="cat $HOME/.ssh/*.pub | pbcopy && echo 'Keys copied to clipboard'"
# replacement netstat cmd to find ports used by apps on OS X
alias netstat="sudo lsof -i -P"
alias pubkey="cat $HOME/.ssh/*.pub | pbcopy && echo 'Keys copied to clipboard'"
alias hidefile='/usr/bin/SetFile -a "V"'
alias showfile='/usr/bin/SetFile -a "v"'
alias hidefile='/usr/bin/SetFile -a "V"'
alias showfile='/usr/bin/SetFile -a "v"'
function manpdf() { man -t $@ | open -f -a Preview; }
function osinfo() {
x1="$(/usr/bin/sw_vers -productName)"
x2="$(/usr/bin/sw_vers -productVersion)"
x3="$(/usr/bin/sw_vers -buildVersion)"
x4="$(/usr/bin/arch)"
echo "${x1} - ${x2} - ${x3} - ${x4}"
}
function manpdf() { man -t $@ | open -f -a Preview; }
function osinfo() {
x1="$(/usr/bin/sw_vers -productName)"
x2="$(/usr/bin/sw_vers -productVersion)"
x3="$(/usr/bin/sw_vers -buildVersion)"
x4="$(/usr/bin/arch)"
echo "${x1} - ${x2} - ${x3} - ${x4}"
}
function tab() {
osascript 2>/dev/null <<EOF
tell application "System Events"
tell process "Terminal" to keystroke "t" using command down
end
tell application "Terminal"
activate
do script with command "cd \"$PWD\"; $*" in window 1
end tell
function tab() {
osascript 2>/dev/null <<EOF
tell application "System Events"
tell process "Terminal" to keystroke "t" using command down
end
tell application "Terminal"
activate
do script with command "cd \"$PWD\"; $*" in window 1
end tell
EOF
}
}
# Minimise terminal window to Dock
function mintw() { printf "\e[2t"; return 0; }
# Minimise terminal window to Dock
function mintw() { printf "\e[2t"; return 0; }
# Send Terminal window to background
function bgtw() { printf "\e[6t"; return 0; }
# Send Terminal window to background
function bgtw() { printf "\e[6t"; return 0; }
function hidetw() {
/usr/bin/osascript -e 'tell application "System Events" to set visible of some item of ( get processes whose name = "Terminal" ) to false'
return 0
}
function hidetw() {
/usr/bin/osascript -e 'tell application "System Events" to set visible of some item of ( get processes whose name = "Terminal" ) to false'
return 0
}
# positive integer test (including zero)
function positive_int() { return $(test "$@" -eq "$@" > /dev/null 2>&1 && test "$@" -ge 0 > /dev/null 2>&1); }
# positive integer test (including zero)
function positive_int() { return $(test "$@" -eq "$@" > /dev/null 2>&1 && test "$@" -ge 0 > /dev/null 2>&1); }
# move the Terminal window
function mvtw() {
if [[ $# -eq 2 ]] && $(positive_int "$1") && $(positive_int "$2"); then
printf "\e[3;${1};${2};t"
return 0
fi
return 1
}
# move the Terminal window
function mvtw() {
if [[ $# -eq 2 ]] && $(positive_int "$1") && $(positive_int "$2"); then
printf "\e[3;${1};${2};t"
return 0
fi
return 1
}
# resize the Terminal window
function sizetw() {
if [[ $# -eq 2 ]] && $(positive_int "$1") && $(positive_int "$2"); then
printf "\e[8;${1};${2};t"
/usr/bin/clear
return 0
fi
return 1
}
# resize the Terminal window
function sizetw() {
if [[ $# -eq 2 ]] && $(positive_int "$1") && $(positive_int "$2"); then
printf "\e[8;${1};${2};t"
/usr/bin/clear
return 0
fi
return 1
}
# full screen
function fullscreen() { printf "\e[3;0;0;t\e[8;0;0t"; /usr/bin/clear; return 0; }
# full screen
function fullscreen() { printf "\e[3;0;0;t\e[8;0;0t"; /usr/bin/clear; return 0; }
# default screen
function defaultscreen() { printf "\e[8;35;150;t"; printf "\e[3;300;240;t"; /usr/bin/clear; return 0; }
# default screen
function defaultscreen() { printf "\e[8;35;150;t"; printf "\e[3;300;240;t"; /usr/bin/clear; return 0; }
# max columns
function maxc() { printf "\e[3;0;0;t\e[8;50;0t"; /usr/bin/clear; return 0; }
# max columns
function maxc() { printf "\e[3;0;0;t\e[8;50;0t"; /usr/bin/clear; return 0; }
# max rows
function maxr() { printf "\e[3;0;0;t\e[8;0;100t"; /usr/bin/clear; return 0; }
# max rows
function maxr() { printf "\e[3;0;0;t\e[8;0;100t"; /usr/bin/clear; return 0; }
# show number of lines & columns
function lc() { printf "lines: $(/usr/bin/tput lines)\ncolums: $(/usr/bin/tput cols)\n"; return 0; }
# show number of lines & columns
function lc() { printf "lines: $(/usr/bin/tput lines)\ncolums: $(/usr/bin/tput cols)\n"; return 0; }
fi

View File

@ -3,7 +3,10 @@ export IRBRC="$HOME/.irbrc"
export RBXOPT="-Xrbc.db=/tmp/rbx -X19"
export JRUBY_OPTS="--1.9"
which=`which -a which | tail -n1` # avoid builtin
# if [ -f $SHELL_FILES/../../languages/ruby/rubyrc.rb ]; then
# echo setting RUBYOPT
# export RUBYOPT="-r$SHELL_FILES/../../languages/ruby/rubyrc"
# fi
if [ -f "/usr/local/share/chruby/chruby.sh" ]; then
source /usr/local/share/chruby/chruby.sh
@ -16,13 +19,13 @@ if [ -f "/usr/local/share/chruby/chruby.sh" ]; then
return 1
fi
}
elif $which -s rbenv; then
elif command -v rbenv; then
eval "$(rbenv init - $CURRENT_SHELL)"
function current_ruby() {
rbenv version-name
}
elif $which -s rvm; then
elif command -v rvm; then
source $HOME/.rvm/scripts/rvm
function current_ruby() {

View File

@ -6,15 +6,17 @@ function __append_path {
fi
}
[ -d "$HOME/bin" ] && __append_path "new_path" "$HOME/bin"
[ -d "$DOT_FILES/bin" ] && __append_path "new_path" "$DOT_FILES/bin"
[ -d '/usr/local/bin' ] && __append_path "new_path" "/usr/local/bin"
[ -d '/usr/local/sbin' ] && __append_path "new_path" "/usr/local/sbin"
[ -d '/opt/local/bin' ] && __append_path "new_path" "/opt/local/bin"
[ -d '/opt/local/sbin' ] && __append_path "new_path" "/opt/local/sbin"
[ -d '/usr/X11/bin' ] && __append_path "new_path" "/usr/X11/bin"
[ -d '/usr/bin' ] && __append_path "new_path" "/usr/bin"
[ -d '/usr/sbin' ] && __append_path "new_path" "/usr/sbin"
[ -d '/bin' ] && __append_path "new_path" "/bin"
[ -d '/sbin' ] && __append_path "new_path" "/sbin"
[ -d "$HOME/bin" ] && __append_path "new_path" "$HOME/bin"
[ -d "$HOME/.cargo/bin" ] && __append_path "new_path" "$HOME/.cargo/bin"
[ -d "$HOME/.emacs.d/bin" ] && __append_path "new_path" "$HOME/.emacs.d/bin"
[ -d "$DOT_FILES/bin" ] && __append_path "new_path" "$DOT_FILES/bin"
[ -d '/usr/local/bin' ] && __append_path "new_path" "/usr/local/bin"
[ -d '/usr/local/sbin' ] && __append_path "new_path" "/usr/local/sbin"
[ -d '/opt/local/bin' ] && __append_path "new_path" "/opt/local/bin"
[ -d '/opt/local/sbin' ] && __append_path "new_path" "/opt/local/sbin"
[ -d '/usr/X11/bin' ] && __append_path "new_path" "/usr/X11/bin"
[ -d '/usr/bin' ] && __append_path "new_path" "/usr/bin"
[ -d '/usr/sbin' ] && __append_path "new_path" "/usr/sbin"
[ -d '/bin' ] && __append_path "new_path" "/bin"
[ -d '/sbin' ] && __append_path "new_path" "/sbin"
PATH="$new_path"

View File

@ -1,10 +1,14 @@
source $SHELL_FILES/lib/syntax-highlighting/zsh-syntax-highlighting.zsh
source $SHELL_FILES/lib/history-substring-search/zsh-history-substring-search.zsh
source $FRESH_PATH/build/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# source $FRESH_PATH/build/vendor/history-substring-search/zsh-history-substring-search.zsh
# bind UP and DOWN arrow keys
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# Bind control + LEFT and RIGHT arrow keys to jump by word
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
# bind P and N for EMACS mode
bindkey -M emacs '^P' history-substring-search-up
bindkey -M emacs '^N' history-substring-search-down

View File

@ -1,13 +1,14 @@
## Command history configuration
HISTFILE=$HOME/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
HISTSIZE=1000000
SAVEHIST=1000000
setopt append_history
setopt extended_history
setopt hist_expire_dups_first
setopt hist_ignore_dups # ignore duplication command history list
setopt hist_ignore_space
setopt hist_verify
setopt inc_append_history
setopt share_history # share command history data
setopt EXTENDED_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_NO_STORE
setopt HIST_REDUCE_BLANKS
setopt HIST_VERIFY
setopt SHARE_HISTORY

View File

@ -0,0 +1,2 @@
export PATH="$HOME/.cargo/bin:$PATH"

View File

@ -1,5 +1,15 @@
bindkey -e
CURRENT_SHELL="zsh"
SHELL_FILES="${$(readlink $HOME/.zshrc):h}"
DOT_FILES="${SHELL_FILES:h:h}"
source $DOT_FILES/shells/bootstrap.sh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
fi
if command fortune >/dev/null; then fortune oblique; fi

View File

@ -15,6 +15,8 @@
mine = !sh -c 'git lg --author=\"`git me`\"'
br = branch
fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
# TODO make this use selecta, when installed
f = "!git ls-files | grep -i"

View File

@ -68,3 +68,10 @@ pom.xml.asc
/checkouts/
.lein-*
vendor/gems
.gem
.gem/
.yardoc/
.terraform/
.local/
*.log
.bash_history