zsh_dots 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/.gitmodules +3 -3
- data/Gemfile.lock +7 -7
- data/README.md +31 -23
- data/Rakefile +21 -4
- data/bin/elocal_nightly.sh +12 -6
- data/bin/loggly +166 -0
- data/bin/repl.sh +6 -0
- data/config/Gemfile +19 -0
- data/config/bundle/config +3 -0
- data/config/gemrc +0 -1
- data/config/gitconfig +9 -5
- data/config/gitignore +102 -0
- data/config/muttrc.example +79 -0
- data/config/osx.zsh +162 -0
- data/config/railsrc +1 -1
- data/config/rspec +1 -2
- data/config/vimrc +320 -0
- data/config/zshenv +26 -9
- data/config/zshrc +14 -0
- data/etc/rails/template/.env +2 -0
- data/etc/rails/template/.travis.yml +27 -0
- data/etc/rails/template.rb +28 -1401
- data/lib/dots/aliases.zsh +48 -23
- data/lib/dots/directories.zsh +0 -4
- data/lib/dots/functions.zsh +62 -17
- data/lib/dots/plugins.zsh +18 -11
- data/lib/plugins/git/git.plugin.zsh +11 -18
- data/lib/plugins/git-process/git-process.plugin.zsh +20 -0
- data/lib/plugins/osx/osx.plugin.zsh +3 -1
- data/lib/plugins/rails3/rails3.plugin.zsh +1 -1
- data/lib/plugins/ruby/ruby.plugin.zsh +8 -5
- data/lib/ruby/dots/bootstrap.rb +56 -0
- data/lib/ruby/dots/command.rb +28 -49
- data/lib/ruby/dots/installation.rb +53 -0
- data/lib/ruby/dots/installer.rb +2 -0
- data/lib/ruby/dots/persistence.rb +41 -0
- data/lib/ruby/dots/version.rb +1 -1
- data/lib/ruby/dots.rb +33 -3
- data/{config/aws → lib/tasks/.gitkeep} +0 -0
- data/spec/integration/command_spec.rb +3 -3
- metadata +42 -18
- data/.rvmrc +0 -47
- data/config/.dot_file +0 -1
- data/config/rvmrc +0 -1
- data/config/zlogin +0 -1
- data/lib/plugins/aws/aws.plugin.zsh +0 -20
- data/lib/tasks/db.rake +0 -55
- data/lib/tasks/dots.rake +0 -32
- data/vendor/antigen.zsh +0 -251
data/config/osx.zsh
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
#!/usr/bin/env sh
|
2
|
+
#
|
3
|
+
# These are the configuration settings I use for OS X. You can apply them
|
4
|
+
# too using the `configure-osx` command.
|
5
|
+
|
6
|
+
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
|
7
|
+
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
|
8
|
+
|
9
|
+
echo "Enable subpixel font rendering on non-Apple LCDs"
|
10
|
+
defaults write NSGlobalDomain AppleFontSmoothing -int 2
|
11
|
+
|
12
|
+
echo "Enable the 2D Dock"
|
13
|
+
defaults write com.apple.dock no-glass -bool true
|
14
|
+
|
15
|
+
echo "Make Dock icons of hidden applications translucent"
|
16
|
+
defaults write com.apple.dock showhidden -bool true
|
17
|
+
|
18
|
+
echo "Enable iTunes track notifications in the Dock"
|
19
|
+
defaults write com.apple.dock itunes-notifications -bool true
|
20
|
+
|
21
|
+
echo "Show all filename extensions in Finder"
|
22
|
+
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
|
23
|
+
|
24
|
+
echo "Use current directory as default search scope in Finder"
|
25
|
+
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
|
26
|
+
|
27
|
+
echo "Show Path bar in Finder"
|
28
|
+
defaults write com.apple.finder ShowPathbar -bool true
|
29
|
+
|
30
|
+
echo "Show Status bar in Finder"
|
31
|
+
defaults write com.apple.finder ShowStatusBar -bool true
|
32
|
+
|
33
|
+
echo "Expand save panel by default"
|
34
|
+
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
|
35
|
+
|
36
|
+
echo "Expand print panel by default"
|
37
|
+
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
|
38
|
+
|
39
|
+
echo "Disable the “Are you sure you want to open this application?” dialog"
|
40
|
+
defaults write com.apple.LaunchServices LSQuarantine -bool false
|
41
|
+
|
42
|
+
echo "Disable shadow in screenshots"
|
43
|
+
defaults write com.apple.screencapture disable-shadow -bool true
|
44
|
+
|
45
|
+
echo "Enable highlight hover effect for the grid view of a stack (Dock)"
|
46
|
+
defaults write com.apple.dock mouse-over-hilte-stack -bool true
|
47
|
+
|
48
|
+
echo "Enable spring loading for all Dock items"
|
49
|
+
defaults write enable-spring-load-actions-on-all-items -bool true
|
50
|
+
|
51
|
+
echo "Show indicator lights for open applications in the Dock"
|
52
|
+
defaults write com.apple.dock show-process-indicators -bool true
|
53
|
+
|
54
|
+
echo "Display ASCII control characters using caret notation in standard text views"
|
55
|
+
# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt`
|
56
|
+
defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
|
57
|
+
|
58
|
+
echo "Disable press-and-hold for keys in favor of key repeat"
|
59
|
+
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
|
60
|
+
|
61
|
+
echo "Set a blazingly fast keyboard repeat rate"
|
62
|
+
defaults write NSGlobalDomain KeyRepeat -int 0.02
|
63
|
+
|
64
|
+
echo "Set a shorter Delay until key repeat"
|
65
|
+
defaults write NSGlobalDomain InitialKeyRepeat -int 12
|
66
|
+
|
67
|
+
echo "Disable auto-correct"
|
68
|
+
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
|
69
|
+
|
70
|
+
echo "Enable AirDrop over Ethernet and on unsupported Macs running Lion"
|
71
|
+
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
|
72
|
+
|
73
|
+
echo "Disable disk image verification"
|
74
|
+
defaults write com.apple.frameworks.diskimages skip-verify -bool true
|
75
|
+
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
|
76
|
+
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
|
77
|
+
|
78
|
+
echo "Automatically open a new Finder window when a volume is mounted"
|
79
|
+
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
|
80
|
+
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
|
81
|
+
defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
|
82
|
+
|
83
|
+
echo "Display full POSIX path as Finder window title"
|
84
|
+
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
|
85
|
+
|
86
|
+
echo "Increase window resize speed for Cocoa applications"
|
87
|
+
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
|
88
|
+
|
89
|
+
echo "Avoid creating .DS_Store files on network volumes"
|
90
|
+
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
|
91
|
+
|
92
|
+
echo "Disable the warning when changing a file extension"
|
93
|
+
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
|
94
|
+
|
95
|
+
echo "Show item info below desktop icons"
|
96
|
+
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist
|
97
|
+
|
98
|
+
echo "Enable snap-to-grid for desktop icons"
|
99
|
+
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
|
100
|
+
|
101
|
+
echo "Disable the warning before emptying the Trash"
|
102
|
+
defaults write com.apple.finder WarnOnEmptyTrash -bool false
|
103
|
+
|
104
|
+
echo "Require password immediately after sleep or screen saver begins"
|
105
|
+
defaults write com.apple.screensaver askForPassword -int 1
|
106
|
+
defaults write com.apple.screensaver askForPasswordDelay -int 0
|
107
|
+
|
108
|
+
echo "Enable tap to click (Trackpad)"
|
109
|
+
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
|
110
|
+
|
111
|
+
echo "Map bottom right Trackpad corner to right-click"
|
112
|
+
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
|
113
|
+
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
|
114
|
+
|
115
|
+
echo "Disable Safari’s thumbnail cache for History and Top Sites"
|
116
|
+
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
|
117
|
+
|
118
|
+
echo "Enable Safari’s debug menu"
|
119
|
+
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
|
120
|
+
|
121
|
+
echo "Make Safari’s search banners default to Contains instead of Starts With"
|
122
|
+
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
|
123
|
+
|
124
|
+
echo "Add a context menu item for showing the Web Inspector in web views"
|
125
|
+
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
|
126
|
+
|
127
|
+
echo "Only use UTF-8 in Terminal.app"
|
128
|
+
defaults write com.apple.terminal StringEncodings -array 4
|
129
|
+
|
130
|
+
echo "Disable the Ping sidebar in iTunes"
|
131
|
+
defaults write com.apple.iTunes disablePingSidebar -bool true
|
132
|
+
|
133
|
+
echo "Disable all the other Ping stuff in iTunes"
|
134
|
+
defaults write com.apple.iTunes disablePing -bool true
|
135
|
+
|
136
|
+
echo "Make ⌘ + F focus the search input in iTunes"
|
137
|
+
defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
|
138
|
+
|
139
|
+
echo "Disable the “reopen windows when logging back in” option"
|
140
|
+
# This works, although the checkbox will still appear to be checked.
|
141
|
+
defaults write com.apple.loginwindow TALLogoutSavesState -bool false
|
142
|
+
defaults write com.apple.loginwindow LoginwindowLaunchesRelaunchApps -bool false
|
143
|
+
|
144
|
+
echo "Enable Dashboard dev mode (allows keeping widgets on the desktop)"
|
145
|
+
defaults write com.apple.dashboard devmode -bool true
|
146
|
+
|
147
|
+
echo "Reset Launchpad"
|
148
|
+
[ -e ~/Library/Application\ Support/Dock/*.db ] && rm ~/Library/Application\ Support/Dock/*.db
|
149
|
+
|
150
|
+
echo "Show the ~/Library folder"
|
151
|
+
chflags nohidden ~/Library
|
152
|
+
|
153
|
+
echo "Disable local Time Machine backups"
|
154
|
+
hash tmutil &> /dev/null && sudo tmutil disablelocal
|
155
|
+
|
156
|
+
echo "Remove Dropbox’s green checkmark icons in Finder"
|
157
|
+
file=/Applications/Dropbox.app/Contents/Resources/check.icns
|
158
|
+
[ -e "$file" ] && mv -f "$file" "$file.bak"
|
159
|
+
unset file
|
160
|
+
|
161
|
+
echo "Kill affected applications"
|
162
|
+
for app in Safari Finder Dock Mail SystemUIServer; do killall "$app" >/dev/null 2>&1; done
|
data/config/railsrc
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
-m
|
1
|
+
--skip-bundle -m ~/etc/rails/template.rb --database=postgresql
|
2
2
|
|
data/config/rspec
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
--color
|
2
|
-
--format documentation
|
1
|
+
--color --format=progress
|
data/config/vimrc
ADDED
@@ -0,0 +1,320 @@
|
|
1
|
+
"""
|
2
|
+
""" @tubbo's vimrc
|
3
|
+
"""
|
4
|
+
|
5
|
+
""
|
6
|
+
"" Dependencies
|
7
|
+
""
|
8
|
+
|
9
|
+
set rtp+=~/.vim/bundle/vundle/
|
10
|
+
call vundle#rc()
|
11
|
+
Bundle 'gmarik/vundle'
|
12
|
+
|
13
|
+
" Colors
|
14
|
+
Bundle 'altercation/vim-colors-solarized'
|
15
|
+
|
16
|
+
" Languages
|
17
|
+
Bundle 'vim-ruby/vim-ruby'
|
18
|
+
Bundle 'jelera/vim-javascript-syntax'
|
19
|
+
Bundle 'kchmck/vim-coffee-script'
|
20
|
+
Bundle 'tpope/vim-markdown'
|
21
|
+
Bundle 'skwp/vim-rspec'
|
22
|
+
Bundle 'tpope/vim-rails'
|
23
|
+
Bundle 'sunaku/vim-ruby-shoulda-context'
|
24
|
+
Bundle 'vim-scripts/nginx.vim'
|
25
|
+
|
26
|
+
" Tools
|
27
|
+
Bundle 'tpope/vim-fugitive'
|
28
|
+
Bundle 'Lokaltog/vim-easymotion'
|
29
|
+
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
|
30
|
+
Bundle 'git://git.wincent.com/command-t.git'
|
31
|
+
Bundle 'Lokaltog/vim-powerline'
|
32
|
+
Bundle 'scrooloose/syntastic'
|
33
|
+
Bundle 'Shougo/neocomplcache'
|
34
|
+
Bundle 'mattn/webapi-vim'
|
35
|
+
Bundle 'mattn/gist-vim'
|
36
|
+
Bundle 'vim-scripts/sudo.vim'
|
37
|
+
Bundle 'janx/vim-rubytest'
|
38
|
+
|
39
|
+
|
40
|
+
""
|
41
|
+
"" Basic Setup
|
42
|
+
""
|
43
|
+
|
44
|
+
set nocompatible " Use vim, no vi defaults
|
45
|
+
set number " Show line numbers
|
46
|
+
set ruler " Show line and column number
|
47
|
+
syntax enable " Turn on syntax highlighting allowing local overrides
|
48
|
+
set encoding=utf-8 " Set default encoding to UTF-8
|
49
|
+
"filetype off " Somebody told me to add this I dunno.
|
50
|
+
set shell=zsh " Use the greatest shell in the universe inline
|
51
|
+
set autoread " Reload files after a change
|
52
|
+
set showcmd " Show (partial) command in the status line
|
53
|
+
set clipboard=unnamed " Use the system clipboard when possible.
|
54
|
+
set laststatus=2 " Make Powerline work on single-file sessions
|
55
|
+
let mapleader = "," " Set leader key to something easier to access
|
56
|
+
|
57
|
+
|
58
|
+
""
|
59
|
+
"" Whitespace
|
60
|
+
""
|
61
|
+
|
62
|
+
set nowrap " don't wrap lines
|
63
|
+
set tabstop=2 " a tab is two spaces
|
64
|
+
set shiftwidth=2 " an autoindent (with <<) is two spaces
|
65
|
+
set expandtab " use spaces, not tabs
|
66
|
+
set list " Show invisible characters
|
67
|
+
set backspace=indent,eol,start " backspace through everything in insert mode
|
68
|
+
|
69
|
+
if exists("g:enable_mvim_shift_arrow")
|
70
|
+
let macvim_hig_shift_movement = 1 " mvim shift-arrow-keys
|
71
|
+
endif
|
72
|
+
|
73
|
+
" List chars
|
74
|
+
set listchars="" " Reset the listchars
|
75
|
+
set listchars=tab:\ \ " a tab should display as " ", trailing whitespace as "."
|
76
|
+
set listchars+=trail:. " show trailing spaces as dots
|
77
|
+
set listchars+=extends:> " The character to show in the last column when wrap is
|
78
|
+
" off and the line continues beyond the right of the screen
|
79
|
+
set listchars+=precedes:< " The character to show in the last column when wrap is
|
80
|
+
" off and the line continues beyond the right of the screen
|
81
|
+
|
82
|
+
""
|
83
|
+
"" Searching
|
84
|
+
""
|
85
|
+
|
86
|
+
set hlsearch " highlight matches
|
87
|
+
set incsearch " incremental searching
|
88
|
+
set ignorecase " searches are case insensitive...
|
89
|
+
set smartcase " ... unless they contain at least one capital letter
|
90
|
+
|
91
|
+
" Search highlighting, only done by request and easy to get rid of.
|
92
|
+
set nohlsearch
|
93
|
+
nnoremap <C-L> :set hlsearch!<cr>
|
94
|
+
nnoremap <C-l> :nohl<cr>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
""
|
99
|
+
"" Documentation
|
100
|
+
""
|
101
|
+
|
102
|
+
" Ctrl+H browses, then use Ctrl+H,{N|S} to scroll through them.
|
103
|
+
vmap <C-h> <C-]>
|
104
|
+
nnoremap <C-h>n :tnext<cr>
|
105
|
+
nnoremap <C-h>s :tselect<cr>
|
106
|
+
|
107
|
+
|
108
|
+
""
|
109
|
+
"" Wild settings
|
110
|
+
""
|
111
|
+
|
112
|
+
" TODO: Investigate the precise meaning of these settings
|
113
|
+
" set wildmode=list:longest,list:full
|
114
|
+
|
115
|
+
" Disable output and VCS files
|
116
|
+
set wildignore+=*.o,*.out,*.obj,.git,*.rbc,*.rbo,*.class,.svn,*.gem
|
117
|
+
|
118
|
+
" Disable archive files
|
119
|
+
set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz
|
120
|
+
|
121
|
+
" Ignore bundler and sass cache
|
122
|
+
set wildignore+=*/vendor/gems/*,*/vendor/cache/*,*/.bundle/*,*/.sass-cache/*
|
123
|
+
|
124
|
+
" Disable temp and backup files
|
125
|
+
set wildignore+=*.swp,*~,._*
|
126
|
+
|
127
|
+
|
128
|
+
""
|
129
|
+
"" Backup and swap files
|
130
|
+
""
|
131
|
+
set backupdir=~/.vim/_backup// " where to put backup files.
|
132
|
+
set directory=~/.vim/_temp// " where to put swap files.
|
133
|
+
|
134
|
+
|
135
|
+
""
|
136
|
+
"" Misc.
|
137
|
+
""
|
138
|
+
|
139
|
+
let macvim_hig_shift_movement = 1 " MacVim shift+arrow-keys behavior (required in .vimrc)
|
140
|
+
" Skip bullshit directories
|
141
|
+
let Grep_Skip_Dirs = 'RCS CVS SCCS .svn generated .sass-cache .git'
|
142
|
+
set grepprg=/bin/grep\ -nH
|
143
|
+
" Enforce Ruby 1.9 syntax in the selection
|
144
|
+
"map <leader>h %s/:\([a-z0-9_]\+\)\s*=>/\1: /g<cr>
|
145
|
+
|
146
|
+
|
147
|
+
""
|
148
|
+
"" Testing
|
149
|
+
""
|
150
|
+
|
151
|
+
let g:rubytest_cmd_test = "rtest %p"
|
152
|
+
let g:rubytest_cmd_testcase = "rtest %p -n \'/%c/\'"
|
153
|
+
let g:rubytest_cmd_spec = "rspec --format=documentation %p"
|
154
|
+
let g:rubytest_cmd_example = "rspec --format=documentation %p -l '%c'"
|
155
|
+
let g:rubytest_cmd_feature = "cucumber %p"
|
156
|
+
let g:rubytest_cmd_story = "cucumber %p -n '%c'"
|
157
|
+
|
158
|
+
|
159
|
+
""
|
160
|
+
"" Autocommands
|
161
|
+
""
|
162
|
+
|
163
|
+
augroup vimrcEx
|
164
|
+
" Clear all autocmds in the group
|
165
|
+
autocmd!
|
166
|
+
|
167
|
+
" Whenever we're writing text, like comments, make the width mo more
|
168
|
+
" than 72 characters. This is to ensure maximum readability of
|
169
|
+
" documentation with things like CTags.
|
170
|
+
autocmd FileType text setlocal textwidth=72
|
171
|
+
|
172
|
+
" Jump to last cursor position unless it's invalid or in an event handler
|
173
|
+
autocmd BufReadPost *
|
174
|
+
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
175
|
+
\ exe "normal g`\"" |
|
176
|
+
\ endif
|
177
|
+
|
178
|
+
" In Ruby, autoindent with two spaces, always expand tabs
|
179
|
+
autocmd FileType coffee,ruby,haml,eruby,yaml,html,javascript,sass,cucumber set ai sw=2 sts=2 et
|
180
|
+
|
181
|
+
" In Python, maintain strict 4-space indents and don't word wrap
|
182
|
+
autocmd FileType python set sw=4 sts=4 set wrap=off
|
183
|
+
|
184
|
+
" Alternative Markdown extensions
|
185
|
+
autocmd BufRead *.mkd set ai formatoptions=tcroqn2 comments=n:> textwidth=120;
|
186
|
+
autocmd BufRead *.markdown set ai formatoptions=tcroqn2 comments=n:> textwidth=120;
|
187
|
+
|
188
|
+
" Alternative YAML extensions
|
189
|
+
autocmd BufRead *.fdoc* set filetype=yaml
|
190
|
+
autocmd BufRead *.pv set filetype=yaml
|
191
|
+
|
192
|
+
" Standard two-space indentation in CoffeeScript files
|
193
|
+
au BufNewFile,BufReadPost *.coffee setl shiftwidth=2 expandtab
|
194
|
+
|
195
|
+
" Indent <p> tags inherently
|
196
|
+
"autocmd FileType html,eruby if g:html_indent_tags !~ '\\|p\>' | let g:html_indent_tags .= '\|p\|li\|dt\|dd' | endif
|
197
|
+
|
198
|
+
" Open the README file in a project dir (if there is one)
|
199
|
+
"autocmd AuNERDTreeCmd VimEnter * call OpenReadme()
|
200
|
+
|
201
|
+
" Strip whitespace in Python
|
202
|
+
autocmd BufWritePre *.py :%s/\s\+$//e
|
203
|
+
augroup END
|
204
|
+
|
205
|
+
" When there's no text behind it, tab indents. When there is, tab
|
206
|
+
" autocompletes.
|
207
|
+
function! InsertTabWrapper()
|
208
|
+
let col = col('.') - 1
|
209
|
+
if !col || getline('.')[col - 1] !~ '\k'
|
210
|
+
return "\<tab>"
|
211
|
+
else
|
212
|
+
return "\<c-p>"
|
213
|
+
endif
|
214
|
+
endfunction
|
215
|
+
inoremap <tab> <c-r>=InsertTabWrapper()<cr>
|
216
|
+
inoremap <s-tab> <c-n>
|
217
|
+
|
218
|
+
" Opens the README.md file
|
219
|
+
function! OpenReadme()
|
220
|
+
if filereadable('README.md')
|
221
|
+
edit README.md
|
222
|
+
endif
|
223
|
+
endfunction
|
224
|
+
|
225
|
+
" Turn backups off since we store everything in Git
|
226
|
+
set nobackup
|
227
|
+
set nowb
|
228
|
+
set noswapfile
|
229
|
+
|
230
|
+
" Persistent undo
|
231
|
+
try
|
232
|
+
if MySys() == "windows"
|
233
|
+
set undodir=C:\Windows\Temp
|
234
|
+
else
|
235
|
+
set undodir=~/.vim_runtime/undodir
|
236
|
+
endif
|
237
|
+
|
238
|
+
set undofile
|
239
|
+
catch
|
240
|
+
endtry
|
241
|
+
|
242
|
+
|
243
|
+
""
|
244
|
+
"" Color Scheme
|
245
|
+
""
|
246
|
+
|
247
|
+
let g:solarized_italic=0
|
248
|
+
syntax on
|
249
|
+
colorscheme solarized
|
250
|
+
set background=light
|
251
|
+
|
252
|
+
|
253
|
+
""
|
254
|
+
"" Navigation
|
255
|
+
""
|
256
|
+
|
257
|
+
" Search for files
|
258
|
+
map <C-t> :CommandT<cr>
|
259
|
+
" Pressing ,ss will toggle and untoggle spell checking
|
260
|
+
map <leader>ss :setlocal spell!<cr>
|
261
|
+
" Find either the test file or implementation file path for the currently-opened file
|
262
|
+
" (depending on which one it is)
|
263
|
+
" Open this file's corresponding test or implementation.
|
264
|
+
function! OpenTestAlternate()
|
265
|
+
let new_file = AlternateForCurrentFile()
|
266
|
+
exec ':e ' . new_file
|
267
|
+
endfunction
|
268
|
+
" Find the test or implementation code that corresponds with this file.
|
269
|
+
function! AlternateForCurrentFile()
|
270
|
+
let using_rspec = filereadable('spec/spec_helper.rb')
|
271
|
+
let current_file = expand("%")
|
272
|
+
let new_file = current_file
|
273
|
+
let in_test = match(current_file, '^test/') != -1 || match(current_file, '^spec/') != -1
|
274
|
+
let going_to_test = !in_test
|
275
|
+
let in_app = match(current_file, '\<controllers\>') != -1 || match(current_file, '\<models\>') != -1 || match(current_file, '\<views\>') != -1 || match(current_file, '\<decorators\>') != -1 || match(current_file, '\<support\>') != -1 || match(current_file, '\<observers\>') != -1 || match(current_file, '\<parsers\>') != -1 || match(current_file, '\<transformers\>') != -1
|
276
|
+
|
277
|
+
if going_to_test
|
278
|
+
if in_app
|
279
|
+
let new_file = substitute(new_file, '^app/', '', '')
|
280
|
+
end
|
281
|
+
|
282
|
+
" Test::Unit places its tests in a different location than RSpec
|
283
|
+
if using_rspec
|
284
|
+
let new_file = substitute(new_file, '\.rb$', '_spec.rb', '')
|
285
|
+
let new_file = 'spec/' . new_file
|
286
|
+
else
|
287
|
+
let new_file = substitute(new_file, '\.rb$', '_test.rb', '')
|
288
|
+
let new_file = 'test/' . new_file
|
289
|
+
let new_file = substitute(new_file, 'models', 'unit', '')
|
290
|
+
let new_file = substitute(new_file, 'support', 'unit', '')
|
291
|
+
let new_file = substitute(new_file, 'controllers', 'functional', '')
|
292
|
+
endif
|
293
|
+
else
|
294
|
+
if in_app
|
295
|
+
let new_file = 'app/' . new_file
|
296
|
+
end
|
297
|
+
|
298
|
+
if using_rspec
|
299
|
+
let new_file = substitute(new_file, '_spec\.rb$', '.rb', '')
|
300
|
+
let new_file = substitute(new_file, 'spec/', '', '')
|
301
|
+
else
|
302
|
+
let new_file = substitute(new_file, '_test\.rb$', '.rb', '')
|
303
|
+
let new_file = substitute(new_file, '^test/', '', '')
|
304
|
+
|
305
|
+
if match(new_file, 'support/')
|
306
|
+
let new_file = substitute(new_file, 'unit', 'support', '')
|
307
|
+
else
|
308
|
+
let new_file = substitute(new_file, 'unit', 'models', '')
|
309
|
+
endif
|
310
|
+
|
311
|
+
let new_file = substitute(new_file, 'functional', 'controllers', '')
|
312
|
+
endif
|
313
|
+
endif
|
314
|
+
return new_file
|
315
|
+
endfunction
|
316
|
+
nnoremap <leader>. :call OpenTestAlternate()<cr>
|
317
|
+
map <C-j> <leader>.
|
318
|
+
|
319
|
+
" Remap :W => :w to avoid errors
|
320
|
+
command! W w
|
data/config/zshenv
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Master configuration for all shells.
|
2
2
|
#
|
3
3
|
# Environment variable definitions go here, but that's about it. All
|
4
4
|
# other definitions go into zshrc or lib/plugins.
|
@@ -7,15 +7,22 @@
|
|
7
7
|
ZSH=$HOME/.dots
|
8
8
|
DOTS=$ZSH
|
9
9
|
|
10
|
-
#
|
10
|
+
# Domain-specific PATHs.
|
11
|
+
RBPATH=/usr/local/lib/ruby/gems/1.9.1/bin:/usr/local/Cellar/ruby/1.9.3-p327/bin
|
12
|
+
JSPATH=node_modules/.bin:/usr/local/share/npm/bin
|
13
|
+
PYPATH=/usr/local/Cellar/python/2.7.1/bin
|
11
14
|
GOPATH=$HOME/Code/Go
|
12
|
-
|
15
|
+
PGPATH=/Applications/Postgres.app/Contents/MacOS/bin
|
13
16
|
MANPATH=/opt/local/share/man:$MANPATH
|
17
|
+
HEROKU_PATH="/usr/local/heroku/bin"
|
18
|
+
CPATH=/usr/local/bin:/usr/local/sbin:/usr/local/git/bin:/usr/bin:$HOME/bin
|
19
|
+
|
20
|
+
# Global PATH, the variable that really matters
|
21
|
+
PATH=$PGPATH:$RBPATH:$CPATH:$PYPATH:$PATH
|
14
22
|
|
15
23
|
# Text editing and paging
|
16
24
|
EDITOR='vim'
|
17
25
|
PAGER='less -R'
|
18
|
-
DRAWER=true # use macvim_drawer
|
19
26
|
|
20
27
|
# A more basic version of my promptstring for non-interactive shells.
|
21
28
|
PROMPT="♬ "
|
@@ -39,9 +46,6 @@ DISABLE_AUTO_TITLE="true"
|
|
39
46
|
# Display red dots when ZSH is hanging.
|
40
47
|
COMPLETION_WAITING_DOTS="true"
|
41
48
|
|
42
|
-
# Load the framework.
|
43
|
-
source "$ZSH/lib/dots.sh"
|
44
|
-
|
45
49
|
# Make Ruby even faster
|
46
50
|
RUBY_HEAP_MIN_SLOTS=1000000
|
47
51
|
RUBY_HEAP_SLOTS_INCREMENT=1000000
|
@@ -52,9 +56,22 @@ RUBY_HEAP_FREE_MIN=500000
|
|
52
56
|
# Always use Bundler with RVM.
|
53
57
|
USE_BUNDLER=force
|
54
58
|
|
59
|
+
# Set this to a different Git remote to pull updates from there.
|
60
|
+
# NOTE: You will have to manage updating from upstream yourself.
|
61
|
+
DOTS_REMOTE='origin'
|
62
|
+
|
55
63
|
# Colorize Grep
|
56
64
|
export GREP_OPTIONS='--color=auto'
|
57
65
|
export GREP_COLOR='1;32'
|
58
66
|
|
59
|
-
#
|
60
|
-
|
67
|
+
# Use the Turn testing engine on eLocal
|
68
|
+
export USE_TURN=true
|
69
|
+
|
70
|
+
# Load Java from OS X
|
71
|
+
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/
|
72
|
+
|
73
|
+
# Start rbenv
|
74
|
+
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
|
75
|
+
|
76
|
+
# Load the framework.
|
77
|
+
. $ZSH/lib/dots.sh
|
data/config/zshrc
CHANGED
@@ -6,3 +6,17 @@
|
|
6
6
|
local path_prompt="%{$reset_color%}%~"
|
7
7
|
PROMPT="%{$fg[white]%}♬ %{$reset_color%}"
|
8
8
|
RPROMPT="%{$fg[yellow]%}${path_prompt}"
|
9
|
+
|
10
|
+
# Use 'viins' mappings for *most* inline command editing
|
11
|
+
bindkey -v
|
12
|
+
|
13
|
+
# Re-bind history search actions so that the text already typed into
|
14
|
+
# the prompt is used to filter results. When typing "rake" into the
|
15
|
+
# prompt and hitting the up arrow, only results that match /^rake/
|
16
|
+
# will be returned.
|
17
|
+
bindkey '^R' history-incremental-search-backward
|
18
|
+
bindkey '\e[A' history-beginning-search-backward
|
19
|
+
bindkey '\e[B' history-beginning-search-forward
|
20
|
+
|
21
|
+
### Added by the Heroku Toolbelt
|
22
|
+
export PATH="/usr/local/heroku/bin:$PATH"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
env:
|
2
|
+
global:
|
3
|
+
secure: "Bvlfi1/Vd8m+pt+2qaxBr6mcsn1KpANi3zCLjotK0VCoot3dezangCF2r0sm\n8iymQ5nb0WElPXX1F7su9SHOByXsSSBtgSbcS7J5b6epGLwpHuQYbEKQl65C\nGR029SRr2iEdPA8tZF8sIxV1uepgj8Dhjz8NmFJFqcadyBhcsto="
|
4
|
+
language: ruby
|
5
|
+
bundler_args: "--without=development"
|
6
|
+
before_install:
|
7
|
+
- "export DISPLAY=:99.0"
|
8
|
+
- "sh -e /etc/init.d/xvfb start"
|
9
|
+
before_script:
|
10
|
+
- "createuser -s ghettoblaster && rake db:setup"
|
11
|
+
script: "bundle exec rspec --format=documentation"
|
12
|
+
after_success:
|
13
|
+
# Install the Heroku gem (or the Heroku toolbelt)
|
14
|
+
- "gem install heroku"
|
15
|
+
# Add your Heroku git repo:
|
16
|
+
- "git remote add heroku git@heroku.com:wunderkind.git"
|
17
|
+
# Turn off warnings about SSH keys:
|
18
|
+
- "echo 'Host heroku.com' >> ~/.ssh/config"
|
19
|
+
- "echo ' StrictHostKeyChecking no' >> ~/.ssh/config"
|
20
|
+
- "echo ' CheckHostIP no' >> ~/.ssh/config"
|
21
|
+
- "echo ' UserKnownHostsFile=/dev/null' >> ~/.ssh/config"
|
22
|
+
# Clear your current Heroku SSH keys:
|
23
|
+
- "heroku keys:clear"
|
24
|
+
# Add a new SSH key to Heroku
|
25
|
+
- "yes | heroku keys:add"
|
26
|
+
# Push to Heroku!
|
27
|
+
- "yes | git push heroku master"
|