First commit

This commit is contained in:
Christian Busch 2016-04-16 16:31:54 +02:00
commit e48fea037b
28 changed files with 1911 additions and 0 deletions

18
.gitignore vendored Normal file
View File

@ -0,0 +1,18 @@
# Compiled Python files
*.pyc
# Folder view configuration files
.DS_Store
Desktop.ini
# Thumbnail cache files
._*
Thumbs.db
# Files that might appear on external disks
.Spotlight-V100
.Trashes
.zsh/lib/extra.zsh
*.sublime-*

52
.gitmodules vendored Normal file
View File

@ -0,0 +1,52 @@
# Core
[submodule ".vim/bundle/pathogen"]
path = .vim/bundle/vim-pathogen
url = https://github.com/tpope/vim-pathogen.git
[submodule ".vim/bundle/ctrlp.vim"]
path = .vim/bundle/ctrlp.vim
url = https://github.com/kien/ctrlp.vim.git
[submodule ".vim/bundle/ack.vim"]
path = .vim/bundle/ack.vim
url = https://github.com/mileszs/ack.vim.git
[submodule ".vim/bundle/delimitMate"]
path = .vim/bundle/delimitMate
url = https://github.com/Raimondi/delimitMate.git
[submodule ".vim/bundle/nerdcommenter"]
path = .vim/bundle/nerdcommenter
url = https://github.com/scrooloose/nerdcommenter.git
[submodule ".vim/bundle/nerdtree"]
path = .vim/bundle/nerdtree
url = https://github.com/scrooloose/nerdtree.git
[submodule ".vim/bundle/supertab"]
path = .vim/bundle/supertab
url = https://github.com/ervandew/supertab.git
[submodule ".vim/bundle/vimerl"]
path = .vim/bundle/vimerl
url = https://github.com/jimenezrick/vimerl.git
[submodule ".vim/bundle/markdown"]
path = .vim/bundle/vim-markdown
url = https://github.com/tpope/vim-markdown.git
[submodule ".vim/bundle/syntastic"]
path = .vim/bundle/syntastic
url = https://github.com/scrooloose/syntastic.git
[submodule ".vim/bundle/vim-javascript-syntax"]
path = .vim/bundle/vim-javascript-syntax
url = https://github.com/jelera/vim-javascript-syntax.git
[submodule ".vim/bundle/JavaScript-Indent"]
path = .vim/bundle/JavaScript-Indent
url = https://github.com/vim-scripts/JavaScript-Indent.git
[submodule "init/Smyck-Color-Scheme"]
path = init/Smyck-Color-Scheme
url = https://github.com/hukl/Smyck-Color-Scheme.git

5
.gvimrc Normal file
View File

@ -0,0 +1,5 @@
set guifont=Menlo:h14
set gcr=n-v-c:block-Cursor/block-Cursor-blinkon0,i-ci:hor20-Cursor-blinkwait2000-blinkon1500-blinkoff500
" Hide Toolbar from MacVim
set guioptions-=T

7
.htoprc Normal file
View File

@ -0,0 +1,7 @@
# Beware! This file is rewritten every time htop exits.
# The parser is also very primitive, and not human-friendly.
# (I know, it's in the todo list).
left_meters=CPU Memory Swap
left_meter_modes=1 1 1
right_meters=Hostname Uptime
right_meter_modes=2 2

4
.hushlogin Normal file
View File

@ -0,0 +1,4 @@
# The mere presence of this file in the home directory disables the system
# copyright notice, the date and time of the last login, the message of the
# day as well as other information that may otherwise appear on login.
# See `man login`.

40
.inputrc Normal file
View File

@ -0,0 +1,40 @@
# Make Tab autocomplete regardless of filename case
set completion-ignore-case on
# List all matches in case multiple possible completions are possible
set show-all-if-ambiguous on
# Immediately add a trailing slash when autocompleting symlinks to directories
set mark-symlinked-directories on
# Use the text that has already been typed as the prefix for searching through
# commands (i.e. more intelligent Up/Down behavior)
"\e[B": history-search-forward
"\e[A": history-search-backward
# Do not autocomplete hidden files unless the pattern explicitly begins with a dot
set match-hidden-files off
# Show all autocomplete results at once
set page-completions off
# If there are more than 200 possible completions for a word, ask to show them all
set completion-query-items 200
# Show extra file information when completing, like `ls -F` does
set visible-stats on
# Be more intelligent when autocompleting by also looking at the text after
# the cursor. For example, when the current line is "cd ~/src/mozil", and
# the cursor is on the "z", pressing Tab will not autocomplete it to "cd
# ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the
# Readline used by Bash 4.)
set skip-completed-text on
# Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456'
set input-meta on
set output-meta on
set convert-meta off
# Use Alt/Meta + Delete to delete the preceding word
"\e[3;3~": kill-word

7
.ssh/config Normal file
View File

@ -0,0 +1,7 @@
# ssh (secure shell) configuration file
# http://www.linuxmanpages.com/man5/ssh_config.5.php
Host *
UseRoaming no
ControlMaster auto
ControlPath ~/.ssh/control-%h-%p-%r
ControlPersist 600

124
.tmux.conf Normal file
View File

@ -0,0 +1,124 @@
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
######################
### 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 ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set -g default-terminal "screen-256color"
# 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
# }

0
.vim/backups/.gitignore vendored Normal file
View File

95
.vim/colors/smyck.vim Normal file
View File

@ -0,0 +1,95 @@
" ----------------------------------------------------------------------------
" Vim color file
" Maintainer: John-Paul Bader <contact@smyck.org>
" Last Change: 2012 April
" License: Beer Ware
" ----------------------------------------------------------------------------
" Reset Highlighting
hi clear
if exists("syntax_on")
syntax reset
endif
set background=dark
set linespace=3
let g:colors_name = "smyck"
hi Normal cterm=none ctermbg=none ctermfg=15 gui=none guibg=#282828 guifg=#F7F7F7
hi LineNr cterm=none ctermbg=none ctermfg=8 gui=none guibg=#282828 guifg=#8F8F8F
hi StatusLine cterm=none ctermbg=8 ctermfg=15 gui=none guibg=#5D5D5D guifg=#FBFBFB
hi StatusLineNC cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#5D5D5D guifg=#FBFBFB
hi Search cterm=none ctermbg=6 ctermfg=15 gui=none guibg=#2EB5C1 guifg=#F7F7F7
hi IncSearch cterm=none ctermbg=3 ctermfg=8 gui=none guibg=#F6DC69 guifg=#8F8F8F
hi ColumnMargin cterm=none ctermbg=0 gui=none guibg=#000000
hi Error cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
hi ErrorMsg cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
hi Folded cterm=none ctermbg=8 ctermfg=2 gui=none guibg=#3B3B3B guifg=#90AB41
hi FoldColumn cterm=none ctermbg=8 ctermfg=2 gui=none guibg=#3B3B3B guifg=#90AB41
hi NonText cterm=bold ctermbg=none ctermfg=8 gui=bold guifg=#8F8F8F
hi ModeMsg cterm=bold ctermbg=none ctermfg=10 gui=none
hi Pmenu cterm=none ctermbg=8 ctermfg=15 gui=none guibg=#8F8F8F guifg=#F7F7F7
hi PmenuSel cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
hi PmenuSbar cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
hi SpellBad cterm=none ctermbg=1 ctermfg=15 gui=none guifg=#F7F7F7
hi SpellCap cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
hi SpellRare cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
hi SpellLocal cterm=none ctermbg=4 ctermfg=15 gui=none guifg=#F7F7F7
hi Visual cterm=none ctermbg=15 ctermfg=8 gui=none guibg=#F7F7F7 guifg=#8F8F8F
hi Directory cterm=none ctermbg=none ctermfg=4 gui=none guibg=#242424 guifg=#88CCE7
hi SpecialKey cterm=none ctermbg=none ctermfg=8 gui=none guifg=#8F8F8F
hi DiffAdd cterm=bold ctermbg=2 ctermfg=15
hi DiffChange cterm=bold ctermbg=4 ctermfg=15
hi DiffDelete cterm=bold ctermbg=1 ctermfg=15
hi DiffText cterm=bold ctermbg=3 ctermfg=8
hi MatchParen cterm=none ctermbg=6 ctermfg=15 gui=none guibg=#2EB5C1 guifg=#F7F7F7
hi CursorLine cterm=none ctermbg=238 ctermfg=none gui=none guibg=#424242
hi CursorColumn cterm=none ctermbg=238 ctermfg=none gui=none guibg=#424242
hi Title cterm=none ctermbg=none ctermfg=4 gui=none guifg=#88CCE7
" ----------------------------------------------------------------------------
" Syntax Highlighting
" ----------------------------------------------------------------------------
hi Keyword cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
hi Comment cterm=none ctermbg=none ctermfg=8 gui=none guifg=#8F8F8F
hi Delimiter cterm=none ctermbg=none ctermfg=15 gui=none guifg=#F7F7F7
hi Identifier cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
hi Structure cterm=none ctermbg=none ctermfg=12 gui=none guifg=#9DEEF2
hi Ignore cterm=none ctermbg=none ctermfg=8 gui=none guifg=bg
hi Constant cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
hi PreProc cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
hi Type cterm=none ctermbg=none ctermfg=12 gui=none guifg=#96D9F1
hi Statement cterm=none ctermbg=none ctermfg=10 gui=none guifg=#D1FA71
hi Special cterm=none ctermbg=none ctermfg=6 gui=none guifg=#d7d7d7
hi String cterm=none ctermbg=none ctermfg=3 gui=none guifg=#F6DC69
hi Number cterm=none ctermbg=none ctermfg=3 gui=none guifg=#F6DC69
hi Underlined cterm=none ctermbg=none ctermfg=magenta gui=underline guibg=#272727
hi Symbol cterm=none ctermbg=none ctermfg=9 gui=none guifg=#FAB1AB
hi Method cterm=none ctermbg=none ctermfg=15 gui=none guifg=#F7F7F7
hi Interpolation cterm=none ctermbg=none ctermfg=6 gui=none guifg=#2EB5C1
" Erlang
hi link erlangAtom Keyword
hi link erlangBitType Keyword
hi link rubyBeginend Keyword
hi link rubyClass Keyword
hi link rubyModule Keyword
hi link rubyKeyword Keyword
hi link rubyOperator Method
hi link rubyIdentifier Keyword
hi link rubyClassVariable Symbol
hi link rubyInstanceVariable Constant
hi link rubyGlobalVariable Constant
hi link rubyClassVariable Method
hi link rubyConstant Constant
hi link rubySymbol Symbol
hi link rubyFunction Constant
hi link rubyControl Keyword
hi link rubyConditional Keyword
hi link rubyInterpolation Interpolation
hi link rubyInterpolationDelimiter Interpolation
hi link rubyRailsMethod Method

1117
.vim/colors/solarized.vim Normal file

File diff suppressed because it is too large Load Diff

0
.vim/swaps/.gitignore vendored Normal file
View File

74
.vim/syntax/json.vim Normal file
View File

@ -0,0 +1,74 @@
" Vim syntax file
" Language: JSON
" Maintainer: Jeroen Ruigrok van der Werven <asmodai@in-nomine.org>
" Last Change: 2009-06-16
" Version: 0.4
" {{{1
" Syntax setup {{{2
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let main_syntax = 'json'
endif
" Syntax: Strings {{{2
syn region jsonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=jsonEscape
" Syntax: JSON does not allow strings with single quotes, unlike JavaScript.
syn region jsonStringSQ start=+'+ skip=+\\\\\|\\"+ end=+'+
" Syntax: Escape sequences {{{3
syn match jsonEscape "\\["\\/bfnrt]" contained
syn match jsonEscape "\\u\x\{4}" contained
" Syntax: Strings should always be enclosed with quotes.
syn match jsonNoQuotes "\<\a\+\>"
" Syntax: Numbers {{{2
syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>"
" Syntax: An integer part of 0 followed by other digits is not allowed.
syn match jsonNumError "-\=\<0\d\.\d*\>"
" Syntax: Boolean {{{2
syn keyword jsonBoolean true false
" Syntax: Null {{{2
syn keyword jsonNull null
" Syntax: Braces {{{2
syn match jsonBraces "[{}\[\]]"
" Define the default highlighting. {{{1
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_json_syn_inits")
if version < 508
let did_json_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink jsonString String
HiLink jsonEscape Special
HiLink jsonNumber Number
HiLink jsonBraces Operator
HiLink jsonNull Function
HiLink jsonBoolean Boolean
HiLink jsonNumError Error
HiLink jsonStringSQ Error
HiLink jsonNoQuotes Error
delcommand HiLink
endif
let b:current_syntax = "json"
if main_syntax == 'json'
unlet main_syntax
endif

0
.vim/undo/.gitignore vendored Normal file
View File

89
.vimrc Normal file
View File

@ -0,0 +1,89 @@
set nocompatible
" Initialize Pathogen
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
" Enable syntax highlighting
syntax on
filetype plugin indent on
" Colorscheme see https://github.com/hukl/Smyck-Color-Scheme
color smyck
" Add line numbers
set number
set ruler
" Set encoding
set encoding=utf-8
" Whitespace stuff
set nowrap
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
" Show trailing spaces and highlight hard tabs
set list listchars=tab:»·,trail
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" Strip trailing whitespaces on each save
fun! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfun
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
" Search related settings
set incsearch
set hlsearch
" Map Ctrl+l to clear highlighted searches
nnoremap <silent> <C-l> :<C-u>nohlsearch<CR><C-l>
" Highlight characters behind the 80 chars margin
:au BufWinEnter * let w:m2=matchadd('ColumnMargin', '\%>80v.\+', -1)
" Disable code folding
set nofoldenable
" Directories for swp files
set backupdir=~/.vimbackup
set directory=~/.vimbackup
" NERDTree configuration
let NERDTreeIgnore=['\.pyc$', '\.rbc$', '\~$']
map <Leader>n :NERDTreeToggle<CR>
" make uses real tabs
au FileType make set noexpandtab
" Erlang uses 4 spaces
au FileType erlang set softtabstop=4 tabstop=4 shiftwidth=4
" Thorfile, Rakefile, Vagrantfile and Gemfile are Ruby
au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,config.ru} set ft=ruby
" add json syntax highlighting
au BufNewFile,BufRead *.json set ft=javascript
" make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" ctrp custom ignores
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.hg$\|\.svn$\|\.eunit$',
\ 'file': '\.exe$\|\.so$\|\.dll\|\.beam$\|\.DS_Store$'
\ }
let g:erlangCheckFile = "~/.vim/bundle/vimerl/compiler/erlang_check_file.erl"
let g:erlangHighlightErrors = 1

3
.zlogin Normal file
View File

@ -0,0 +1,3 @@
PATH="$HOME/bin:$PATH"
PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin"
PATH="/usr/local/bin:$PATH"

18
.zsh/lib/aliases.zsh Normal file
View File

@ -0,0 +1,18 @@
alias ll='ls -la'
alias lh='ls -lah'
alias ...='cd ../..'
alias ydl="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
alias google='ping -c 10240000 google.com'
alias foldersize='du -sh'
alias nmap_localnet='nmap -sP 192.168.1.0/24'
alias sulast='sudo $(history -p !-1)'
alias whois="whois -h whois-servers.net"
alias ltmux="if tmux has-session -t $USER; then tmux attach -t $USER; else tmux new -s $USER; fi"
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
alias r='open -a'
alias htop='sudo htop'
alias flushdns='dscacheutil -flushcache && killall -HUP mDNSResponder'
alias pkg_add='brew install'
alias pkg_search='brew search'
alias pkg_remove='brew remove'
alias pkg_upgrade='brew update && brew upgrade && brew cleanup'

26
.zsh/lib/appearance.zsh Normal file
View File

@ -0,0 +1,26 @@
# ls colors
autoload colors; colors;
export LSCOLORS="Gxfxcxdxbxegedabagacad"
#export LS_COLORS
# Enable ls colors
if [ "$DISABLE_LS_COLORS" != "true" ]
then
# Find the option for using colors in ls, depending on the version: Linux or BSD
ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G'
fi
#setopt no_beep
setopt auto_cd
setopt multios
setopt cdablevarS
if [[ x$WINDOW != x ]]
then
SCREEN_NO="%B$WINDOW%b "
else
SCREEN_NO=""
fi
# Apply theming defaults
PS1="%n@%m:%~%# "

25
.zsh/lib/colors.zsh Normal file
View File

@ -0,0 +1,25 @@
typeset -Ag FX FG BG
LSCOLORS="exfxcxdxbxegedabagacad"
LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:"
FX=(
reset "%{%}"
bold "%{%}" no-bold "%{%}"
italic "%{%}" no-italic "%{%}"
underline "%{%}" no-underline "%{%}"
blink "%{%}" no-blink "%{%}"
reverse "%{%}" no-reverse "%{%}"
)
for color in {000..255}; do
FG[$color]="%{[38;5;${color}m%}"
BG[$color]="%{[48;5;${color}m%}"
done
# Show all 256 colors with color number
function spectrum_ls() {
for code in {000..255}; do
print -P -- "$code: %F{$code}Test%f"
done
}

75
.zsh/lib/completion.zsh Normal file
View File

@ -0,0 +1,75 @@
# fixme - the load process here seems a bit bizarre
unsetopt menu_complete # do not autoselect the first completion entry
unsetopt flowcontrol
setopt auto_menu # show completion menu on succesive tab press
setopt complete_in_word
setopt always_to_end
WORDCHARS=''
zmodload -i zsh/complist
## case-insensitive (all),partial-word and then substring completion
if [ "x$CASE_SENSITIVE" = "xtrue" ]; then
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
unset CASE_SENSITIVE
else
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
fi
# uncomment if completion should be colorful
# zstyle ':completion:*' list-colors ''
# should this be in keybindings?
bindkey -M menuselect '^o' accept-and-infer-next-history
zstyle ':completion:*:*:*:*:*' menu select
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w"
# disable named-directories autocompletion
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
cdpath=(.)
# use /etc/hosts and known_hosts for hostname completion
[ -r /etc/ssh/ssh_known_hosts ] && _global_ssh_hosts=(${${${${(f)"$(</etc/ssh/ssh_known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
[ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
[ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts=()
[ -r ~/.ssh/config ] && _ssh_config=($(cat ~/.ssh/config | sed -ne 's/Host[=\t ]//p')) || _ssh_config=()
hosts=(
"$_global_ssh_hosts[@]"
"$_ssh_hosts[@]"
"$_etc_hosts[@]"
"$_ssh_config[@]"
"$HOST"
localhost
)
zstyle ':completion:*:hosts' hosts $hosts
# Use caching so that commands like apt and dpkg complete are useable
zstyle ':completion::complete:*' use-cache 1
zstyle ':completion::complete:*' cache-path ~/.oh-my-zsh/cache/
# Don't complete uninteresting users
zstyle ':completion:*:*:*:users' ignored-patterns \
adm amanda apache avahi beaglidx bin cacti canna clamav daemon \
dbus distcache dovecot fax ftp games gdm gkrellmd gopher \
hacluster haldaemon halt hsqldb ident junkbust ldap lp mail \
mailman mailnull mldonkey mysql nagios \
named netdump news nfsnobody nobody nscd ntp nut nx openvpn \
operator pcap postfix postgres privoxy pulse pvm quagga radvd \
rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs
# ... unless we really want to.
zstyle '*' single-ignored show
if [ "x$COMPLETION_WAITING_DOTS" = "xtrue" ]; then
expand-or-complete-with-dots() {
echo -n "\e[31m......\e[0m"
zle expand-or-complete
zle redisplay
}
zle -N expand-or-complete-with-dots
bindkey "^I" expand-or-complete-with-dots
fi

14
.zsh/lib/correction.zsh Normal file
View File

@ -0,0 +1,14 @@
setopt correct_all
alias cap='nocorrect cap'
alias man='nocorrect man'
alias tree='nocorrect tree'
alias thor='nocorrect thor'
alias mv='nocorrect mv'
alias mysql='nocorrect mysql'
alias mkdir='nocorrect mkdir'
alias gist='nocorrect gist'
alias heroku='nocorrect heroku'
alias ebuild='nocorrect ebuild'
alias hpodder='nocorrect hpodder'
alias vim='nocorrect vim'

4
.zsh/lib/directories.zsh Normal file
View File

@ -0,0 +1,4 @@
# Changing/making/removing directory
setopt auto_name_dirs
setopt auto_pushd
setopt pushd_ignore_dups

13
.zsh/lib/history.zsh Normal file
View File

@ -0,0 +1,13 @@
## Command history configuration
HISTFILE=$HOME/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
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

51
.zsh/lib/key_bindings.zsh Normal file
View File

@ -0,0 +1,51 @@
# TODO: Explain what some of this does..
bindkey -e
bindkey '\ew' kill-region
bindkey -s '\el' "ls\n"
bindkey -s '\e.' "..\n"
bindkey '^r' history-incremental-search-backward
bindkey "^[[5~" up-line-or-history
bindkey "^[[6~" down-line-or-history
# make search up and down work, so partially type and hit up/down to find relevant stuff
bindkey '^[[A' up-line-or-search
bindkey '^[[B' down-line-or-search
bindkey "^[[H" beginning-of-line
bindkey "^[[1~" beginning-of-line
bindkey "^[OH" beginning-of-line
bindkey "^[[F" end-of-line
bindkey "^[[4~" end-of-line
bindkey "^[OF" end-of-line
bindkey ' ' magic-space # also do history expansion on space
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey '^[[Z' reverse-menu-complete
# Make the delete key (or Fn + Delete on the Mac) work instead of outputting a ~
bindkey '^?' backward-delete-char
bindkey "^[[3~" delete-char
bindkey "^[3;5~" delete-char
bindkey "\e[3~" delete-char
# consider emacs keybindings:
#bindkey -e ## emacs key bindings
#
#bindkey '^[[A' up-line-or-search
#bindkey '^[[B' down-line-or-search
#bindkey '^[^[[C' emacs-forward-word
#bindkey '^[^[[D' emacs-backward-word
#
#bindkey -s '^X^Z' '%-^M'
#bindkey '^[e' expand-cmd-path
#bindkey '^[^I' reverse-menu-complete
#bindkey '^X^N' accept-and-infer-next-history
#bindkey '^W' kill-region
#bindkey '^I' complete-word
## Fix weird sequence that rxvt produces
#bindkey -s '^[[Z' '\t'
#

13
.zsh/lib/misc.zsh Normal file
View File

@ -0,0 +1,13 @@
## smart urls
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
## file rename magick
bindkey "^[m" copy-prev-shell-word
## jobs
setopt long_list_jobs
## pager
export PAGER=less
export LC_CTYPE=$LANG

21
.zsh/lib/prompt.zsh Normal file
View File

@ -0,0 +1,21 @@
setopt prompt_subst
autoload -U promptinit
promptinit
# Change user name color to red if logged in as root
if [[ $UID == 0 || $EUID == 0 ]]; then
PROMPT='$fg[red]%n@%m '
else
PROMPT='$fg[blue]%n@%m '
fi
PROMPT+='$fg[yellow]%~ '
# Change green arrows (⇣⇡) if cnnection is via ssh
if [[ "${SSH_TTY}" ]]; then
PROMPT+="$fg[green]⇣⇡ $fg[white]〉";
else
PROMPT+="$fg[white]〉";
fi;
PROMPT+='%{$reset_color%}'

8
.zshrc Normal file
View File

@ -0,0 +1,8 @@
export ZSH=~/.zsh
# Load all of the config files in $ZSH/lib that end in .zsh
for config_file ($ZSH/lib/*.zsh) source $config_file
# Load and run compinit
autoload -U compinit
compinit -i

8
bootstrap.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
git pull origin master
git submodule update --init
cp init/Smyck-Color-Scheme/smyck.vim .vim/colors/smyck.vim
rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" \
--exclude "README.md" --exclude "init/" -avh --no-perms . ~