From 56f649e939d8122c6a80286dcd98e8ad112b2e5d Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Sat, 4 Feb 2012 21:10:11 -0800 Subject: [PATCH 01/14] Do not try to source the .secrets file if there is none (cherry picked from commit 0002a86a3f4cf5db8c7a623189cd08f8816dfa9d) --- zsh/aliases | 3 --- zsh/zshrc | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index 64ea284..8a77501 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -106,9 +106,6 @@ alias mctags=~/.bin/run_tags.rb #'/opt/local/bin/ctags -Rf ./tags *' alias ka9='killall -9' alias k9='kill -9' -# This trick makes sudo understand all my aliases -alias sudo='sudo ' - # Gem install alias sgi='sudo gem install --no-ri --no-rdoc' diff --git a/zsh/zshrc b/zsh/zshrc index 88775bd..7bf0f88 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -22,7 +22,7 @@ source $yadr/zsh/aliases source $yadr/zsh/zsh_aliases # Things I don't want to publish to github -source ~/.secrets +[[ -s "$HOME/.secrets" ]] && source "$HOME/.secrets" # Vim mode bindkey -v From aba8e8f1da8610258933de887ebab1c5df0ef480 Mon Sep 17 00:00:00 2001 From: yan Date: Mon, 30 Jan 2012 11:10:18 -0600 Subject: [PATCH 02/14] Added cmd-space to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fc7520a..ef474b0 100644 --- a/README.md +++ b/README.md @@ -303,6 +303,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * `;` in addition to `:` - avoid Shift for common tasks, just hit semicolon to get to ex mode * `,.` to go to last edit location instead of `'.` because the apostrophe is hard on the pinky * `Cmd-'` and `Cmd-"` to change content inside quotes + * Cmd-Space to autocomplete. Tab for snipmate snippets. #### Tab Navigation From ba510e401c78a58a8772e48e1f9c17f7eb086a77 Mon Sep 17 00:00:00 2001 From: yan Date: Sun, 5 Feb 2012 12:50:35 -0800 Subject: [PATCH 03/14] ,gd alias for git-grepping a ruby function definition --- README.md | 1 + vim/plugin/settings/git-grep.vim | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index ef474b0..04f84db 100644 --- a/README.md +++ b/README.md @@ -271,6 +271,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * `Cmd-*` - highlight all occurrences of current word (similar to regular `*` except doesn't move) * `,hl` - toggle search highlight on and off * `,gg` - GitGrep command line with a quote pretyped (close the quote yourself) + * `,gd` - GitGrep def (greps for 'def [function name]') when cursor is over the function name * `,gcp` - GitGrep Current Partial to find references to the current view partial * `//` - clear the search * `,q/` - quickfix window with last search (stolen from Steve Losh) diff --git a/vim/plugin/settings/git-grep.vim b/vim/plugin/settings/git-grep.vim index 386ba16..3359e28 100644 --- a/vim/plugin/settings/git-grep.vim +++ b/vim/plugin/settings/git-grep.vim @@ -18,3 +18,6 @@ vnoremap K :execute GitGrep(GetVisual()) "git grep current word up to the next exclamation point using ,K nnoremap ,K viwf!:execute GitGrep(GetVisual()) +"grep for 'def foo' +nnoremap ,gd :GitGrep 'def ' + From 420d75e5e7c212bde26c49de93a09c3c66d23309 Mon Sep 17 00:00:00 2001 From: yan Date: Sun, 5 Feb 2012 12:56:46 -0800 Subject: [PATCH 04/14] Updated README re: skwp theme for oh-my-zsh --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 04f84db..8cc0069 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,14 @@ sudo mv /usr/bin/ctags /usr/bin/ctags_original curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh ``` +Please note: if you want the skwp theme referenced in these dotfiles, you should +grab the skwp fork of oh-my-zsh, which just has the additional theme. While we are +waiting for @robbyrussell to merge the theme upstream (unknown if it will happen). + + cd ~/.oh-my-zsh + git remote add skwp https://github.com/skwp/oh-my-zsh.git + git pull skwp master + ### [Pry](http://pry.github.com/) Pry offers a much better out of the box IRB experience with colors, tab completion, and lots of other tricks. You should: From f6a4fe45fca6623e43111cc422a7c922c2c5b1ad Mon Sep 17 00:00:00 2001 From: yan Date: Tue, 7 Feb 2012 12:11:04 -0800 Subject: [PATCH 05/14] Upgraded ,gcp to really find references to current partial --- vim/bundle/skwp-vim-git-grep-rails-partial | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/skwp-vim-git-grep-rails-partial b/vim/bundle/skwp-vim-git-grep-rails-partial index 68b9d4a..9606c6c 160000 --- a/vim/bundle/skwp-vim-git-grep-rails-partial +++ b/vim/bundle/skwp-vim-git-grep-rails-partial @@ -1 +1 @@ -Subproject commit 68b9d4a8e64172ee168bf9329bc86138a80982a6 +Subproject commit 9606c6c52934bb8bc65176e7be7b6ecf06326066 From 5e2665a797d28c53cab04205ef4b8415966f1cad Mon Sep 17 00:00:00 2001 From: Danny Olson & Yan Pritzker Date: Fri, 10 Feb 2012 14:59:48 -0800 Subject: [PATCH 06/14] ,z and ,x bindings to move back and forth through buffers --- README.md | 3 ++- vim/plugin/settings/yadr-keymap.vim | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8cc0069..025efc6 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,8 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke #### Navigation - * `,z` - jump back and forth between last two buffers + * `,z` - go to previous buffer (:bp) + * `,x` - go to next buffer (:bn) * `Ctrl-j` and `Ctrl-k` to move up and down roughly by functions * `Ctrl-o` - Old cursor position - this is a standard mapping but very useful, so included here * `Ctrl-i` - opposite of Ctrl-O (again, this is standard) diff --git a/vim/plugin/settings/yadr-keymap.vim b/vim/plugin/settings/yadr-keymap.vim index d648ff4..cea0a5d 100644 --- a/vim/plugin/settings/yadr-keymap.vim +++ b/vim/plugin/settings/yadr-keymap.vim @@ -98,8 +98,10 @@ nnoremap ,f nnoremap ,F :let word=expand(""):vsp:wincmd w:exec("tag ". word) -"toggle between last two buffers with Z (normally ctrl-shift-6) -nnoremap ,z +"Move back and forth through previous and next buffers +"with ,z and ,x +nnoremap ,z :bp +nnoremap ,x :bn " ============================== " Window/Tab/Split Manipulation From 59f10e5e882ee0142ed69357f5f38a934ef6ba13 Mon Sep 17 00:00:00 2001 From: Will Milton Date: Wed, 22 Feb 2012 20:02:05 -0600 Subject: [PATCH 07/14] persistent undo for cli vim. Also had to create the backups directory, not sure where to do that. --- vimrc | 8 +++----- zsh/aliases | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/vimrc b/vimrc index d86da64..e715173 100644 --- a/vimrc +++ b/vimrc @@ -49,12 +49,10 @@ set nowb " ================ Persistent Undo ================== " Keep undo history across sessions, by storing in file. -" Only works in MacVim (gui) mode. +" Only works all the time. -if has('gui_running') - set undodir=~/.vim/backups - set undofile -endif +set undodir=~/.vim/backups +set undofile " ================ Indentation ====================== diff --git a/zsh/aliases b/zsh/aliases index 8a77501..e2c65d5 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -29,6 +29,9 @@ alias lsg='ll | grep' alias ae='vi $yadr/zsh/aliases' #alias edit alias ar='source $yadr/zsh/aliases' #alias reload +# vim using +alias vim=$(brew ls macvim | grep Contents/MacOS/Vim) + # vimrc editing alias ve='vi ~/.vimrc' From 51979c60972999d9a63eaa614286c619da3dbfe7 Mon Sep 17 00:00:00 2001 From: Ellis Berner Date: Fri, 24 Feb 2012 13:30:44 -0800 Subject: [PATCH 08/14] Add homebrew path --- zsh/zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/zshrc b/zsh/zshrc index 7bf0f88..d131406 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -48,4 +48,4 @@ zstyle ':completion:*:approximate:*' max-errors 1 numeric [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Add path to our custom bins -export PATH=$PATH:$yadr/bin:$yadr/bin/yadr +export PATH=/usr/local/bin:$PATH:$yadr/bin:$yadr/bin/yadr From 81af2e3c0a243c58bac293811b34814b8d3cb10d Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Fri, 24 Feb 2012 13:37:21 -0800 Subject: [PATCH 09/14] Changed html escape and unescape mappings to ,he and ,hu [Closes #27] --- README.md | 4 +++- vim/bundle/skwp-vim-html-escape | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 025efc6..cd9a907 100644 --- a/README.md +++ b/README.md @@ -348,6 +348,8 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * `,w` - strip trailing whitespaces * `sj` - split a line such as a hash {:foo => {:bar => :baz}} into a multiline hash (j = down) * `sk` - unsplit a link (k = up) + * `,he` - Html Escape + * `,hu` - Html Unescape * `Cmd-Shift-A` - align things (type a character/expression to align by, works in visual mode or by itself) #### Comments @@ -422,7 +424,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke * vim-ruby-conque - helpers to run ruby,rspec,rake within ConqueTerm - use ,rr (ruby), ,ss (rspec), ,ll (rspec line), ,RR (rake) * vim-rspec - really clean and colorful rspec output (Cmd-Shift-R) with ability to navigate directly to error; will replace vim-ruby-conque when I do a couple enhancements/bug fixes * vim-markdown-preview - :Mm to view your README.md as html - * html-escape - hit ctrl-h to escape html + * html-escape - ,he and ,hu to escape and unescape html * ruby-debug-ide - not quite working for me, but maybe it will for you. supposedly a graphical debugger you can step through * Gundo - visualize your undos - pretty amazing plugin. Hit ,u with my keymappings to trigger it, very user friendly * slime - use ctrl-c,ctrl-c to send text to a running irb/pry/console. To start the console, you must use screen with a named session: "screen -S [name] [cmd]", ex: "screen -S pry pry" diff --git a/vim/bundle/skwp-vim-html-escape b/vim/bundle/skwp-vim-html-escape index c509df0..0d673be 160000 --- a/vim/bundle/skwp-vim-html-escape +++ b/vim/bundle/skwp-vim-html-escape @@ -1 +1 @@ -Subproject commit c509df06f653f8cbce7bb1491a990a0fb9527b9e +Subproject commit 0d673be2b8420f2e700022df002fb851e7a55699 From 9405f6c7c40922a4fdad44891e80d142eb5b8747 Mon Sep 17 00:00:00 2001 From: Bastien Jaillot Date: Sat, 25 Feb 2012 16:54:18 +0100 Subject: [PATCH 10/14] Change gitignore_global to yadr one --- git/gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/gitconfig b/git/gitconfig index a6fc103..957f36c 100644 --- a/git/gitconfig +++ b/git/gitconfig @@ -99,7 +99,7 @@ [core] autocrlf = false editor = vim - excludesfile = ~/.dotfiles/gitignore_global + excludesfile = ~/.yadr/gitignore_global [advice] statusHints = false [diff] From 01b9dee130fd92f51b4d7a551cb3add2f50c471e Mon Sep 17 00:00:00 2001 From: Ellis Berner Date: Tue, 28 Feb 2012 00:12:41 -0800 Subject: [PATCH 11/14] Update chrome/install.sh --- chrome/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/install.sh b/chrome/install.sh index df62d64..21d67e6 100755 --- a/chrome/install.sh +++ b/chrome/install.sh @@ -3,4 +3,4 @@ # http://blog.dotsmart.net/2011/09/30/change-font-size-in-chrome-devtools/ # Use: -cp ~/.dotfiles/chrome/Custom.css ~/Library/Application\ Support/Google/Chrome/Default/Custom.css +cp ~/.yadr/chrome/Custom.css ~/Library/Application\ Support/Google/Chrome/Default/Custom.css From dc965647f06004342328512a8d8c48960fab5dd5 Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Tue, 28 Feb 2012 11:42:54 -0800 Subject: [PATCH 12/14] Moved solarized mods to the solarized plugin to ensure colors are correctly loaded at startup --- vim/bundle/skwp-vim-colors-solarized | 2 +- vim/plugin/settings/solarized.vim | 42 ---------------------------- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 vim/plugin/settings/solarized.vim diff --git a/vim/bundle/skwp-vim-colors-solarized b/vim/bundle/skwp-vim-colors-solarized index 50f0cc5..b2dbf4e 160000 --- a/vim/bundle/skwp-vim-colors-solarized +++ b/vim/bundle/skwp-vim-colors-solarized @@ -1 +1 @@ -Subproject commit 50f0cc511c3bf56c6ca5094e341db29f92a58dc4 +Subproject commit b2dbf4e0a7aa9cbb91d19cfec68901ef4e6906a6 diff --git a/vim/plugin/settings/solarized.vim b/vim/plugin/settings/solarized.vim deleted file mode 100644 index 811ac4b..0000000 --- a/vim/plugin/settings/solarized.vim +++ /dev/null @@ -1,42 +0,0 @@ -" Some color remaps -" If statements and def statements should look similar -" so you can see the flow -hi! link rubyDefine rubyControl - -" This is a better cursor -hi! link Cursor VisualNOS - -" This is a bit nicer visual selection -hi! link Visual DiffChange - -" Search is way too distracting in original Solarized -hi! link Search DiffAdd - -" Colors to make LustyJuggler more usable -" the Question color in LustyJuggler is mapped to -" the currently selected buffer. -hi! clear Question -hi! Question guifg=yellow - -hi! link TagListFileName Question - -" For jasmine.vim -hi! link specFunctions rubyDefine -hi! link specMatcher rubyConstant -hi! link specSpys rubyConstant - -" Ruby, slightly better colors for solarized -hi! link rubyStringDelimiter rubyConstant -hi! link rubyInterpolationDelimiter rubyConstant -hi! link rubySymbol rubyBlockParameter - -" For R and other languages that use Delimiters, we don't want them red -hi! link Delimiter Identifier -hi! link rDollar Identifier - -" For vimscript, don' tlike red.. -hi! link vimMapModKey Operator -hi! link vimNotation Label - -" Better json highlighting -hi! link htmlArg Label From ac7efd9cf1065b940a4138995653be2cf46adb29 Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Tue, 28 Feb 2012 11:43:55 -0800 Subject: [PATCH 13/14] Explicitly load plugin files to ensure all keybindings are loaded [Close #24] --- vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vimrc b/vimrc index e715173..fe53626 100644 --- a/vimrc +++ b/vimrc @@ -94,3 +94,6 @@ set scrolloff=8 "Start scrolling when we're 8 lines away from margins set sidescrolloff=15 set sidescroll=1 +for f in split(glob('~/.vim/plugin/settings/*.vim'), '\n') + exe 'source' f +endfor From 4d0fa73cec4437d0246100196ce3e1c05add3de1 Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Tue, 28 Feb 2012 14:05:29 -0800 Subject: [PATCH 14/14] Compatibility with latest pry/coderay --- irb/pryrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irb/pryrc b/irb/pryrc index b24329e..dbfcdf4 100644 --- a/irb/pryrc +++ b/irb/pryrc @@ -157,7 +157,7 @@ TERM_TOKEN_COLORS = { module CodeRay module Encoders - class Term < Encoder + class Terminal < Encoder # override old colors TERM_TOKEN_COLORS.each_pair do |key, value| TOKEN_COLORS[key] = value