diff --git a/README.md b/README.md index fc7520a..cd9a907 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: @@ -232,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) @@ -271,6 +280,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) @@ -303,6 +313,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 @@ -337,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 @@ -411,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/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 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] 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 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/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 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 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 ' + 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 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 diff --git a/vimrc b/vimrc index d86da64..fe53626 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 ====================== @@ -96,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 diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 64ea284..e2c65d5 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -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' @@ -106,9 +109,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 2181816..8510d66 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -69,3 +69,4 @@ __git_files () { _wanted files expl 'local files' _files } +export PATH=/usr/local/bin:$PATH