Permalink
Browse files

Merge remote-tracking branch 'upstream/master'

* upstream/master: (33 commits)
  Bring back keybindings to enable vim mode and ctrl-R [Fix #212]
  Rdebugrc [Fix #189]
  Upgraded vim plugins
  Sprintly alias
  Prevent neocomplcache hanging in python [Fix #163]
  Added `vim/spell` to gitignore.
  Added tmux support [Fix #190]
  Fix pointer to PCKeyboardHack [Fix #200]
  Upgrade vim plugins
  Enable vi mode in the prompt
  remove highlighters to fix beep [fixes #199]
  enable ssh-agent forwarding
  removed redundant $PATH
  remove rvm, part of prezto ruby module
  remove key-bindings, part of prezto
  remove color-man-pages, part of prezto
  load prezto modules
  enable all syntax highlighters
  update to latest zpreztorc from prezto repository
  refactor skwp theme in the "prezto" style
  ...

Conflicts:
	vim/bundle/Shougo-neocomplcache
	vim/bundle/scrooloose-syntastic
	vim/plugin/settings/neocomplcache.vim
  • Loading branch information...
2 parents 2f37510 + 630063e commit 740f7e51abf60b1ae278123880a341410e75991e @macat committed Nov 14, 2012
View
@@ -5,6 +5,7 @@ vim/view
*un~
vim/.netrwhist
vim/tmp
+vim/spell
vim/after/.vimrc.after
.netrwhist
bin/subl
View
@@ -270,10 +270,6 @@
path = vim/bundle/vim-scripts-Specky
url = https://github.com/vim-scripts/Specky.git
ignore = dirty
-[submodule "zsh/zsh-syntax-highlighting"]
- path = zsh/zsh-syntax-highlighting
- url = https://github.com/zsh-users/zsh-syntax-highlighting.git
- ignore = dirty
[submodule "vim/bundle/tpope-vim-bundler"]
path = vim/bundle/tpope-vim-bundler
url = https://github.com/tpope/vim-bundler
@@ -360,3 +356,11 @@
path = vim/bundle/xsunsmile-showmarks
url = https://github.com/xsunsmile/showmarks.git
ignore = dirty
+[submodule "vim/bundle/digitaltoad-vim-jade"]
+ path = vim/bundle/digitaltoad-vim-jade
+ url = git://github.com/digitaltoad/vim-jade.git
+ ignore = dirty
+[submodule "vim/bundle/tpope-vim-ragtag"]
+ path = vim/bundle/tpope-vim-ragtag
+ url = https://github.com/tpope/vim-ragtag
+ ignore = dirty
View
@@ -47,7 +47,8 @@ git clone https://github.com/skwp/dotfiles ~/.yadr
cd ~/.yadr && rake install
```
-Note: YADR will not destroy any of your files unless you tell it to.
+**Note:** YADR will automatically install all of its subcomponents. If you want to be asked
+about each one, use `ASK=true rake install`
### Upgrading
@@ -63,9 +64,9 @@ rake update
Read on to learn what YADR provides!
-## Public service announcement: stop abusing your hands!
+### Public service announcement: stop abusing your hands!
-[Remap caps-lock to escape](http://pqrs.org/macosx/keyremap4macbook/extra.html)
+[Remap caps-lock to escape with PCKeyboardHack](http://pqrs.org/macosx/keyremap4macbook/pckeyboardhack.html)
The escape key is the single most used key in vim.
Old keyboards used to have Ctrl where caps lock is today. But it's even better if you put escape there.
@@ -79,10 +80,9 @@ We automatically install a few useful packages including ack, ctags, git, and hu
You can install macvim from brew as well, or download it from their website.
```bash
-brew install ack ctags git hub macvim
+brew install ack ctags git hub macvim tmux reattach-to-user-namespace
```
-
### Github Issues: [ghi gem](https://github.com/stephencelis/ghi)
We include the `ghi` command. Try `ghi list` and have fun managing issues from command line!
View
@@ -4,9 +4,7 @@ desc "Hook our dotfiles into system-standard positions."
task :install => [:submodule_init, :submodules] do
puts
puts "======================================================"
- puts "Welcome to YADR Installation. I'll ask you a few"
- puts "questions about which files to install. Nothing will"
- puts "be overwritten without your consent."
+ puts "Welcome to YADR Installation."
puts "======================================================"
puts
@@ -18,47 +16,55 @@ task :install => [:submodule_init, :submodules] do
file_operation(Dir.glob('irb/*')) if want_to_install?('irb/pry configs (more colorful)')
file_operation(Dir.glob('ruby/*')) if want_to_install?('rubygems config (faster/no docs)')
file_operation(Dir.glob('ctags/*')) if want_to_install?('ctags config (better js/ruby support)')
+ file_operation(Dir.glob('tmux/*')) if want_to_install?('tmux config')
file_operation(Dir.glob('vimify/*')) if want_to_install?('vimification of command line tools')
file_operation(Dir.glob('{vim,vimrc}')) if want_to_install?('vim configuration (highly recommended)')
- if want_to_install?('zsh enhancements & prezto')
- install_prezto
- end
+ Rake::Task["install_prezto"].execute
install_fonts if RUBY_PLATFORM.downcase.include?("darwin")
success_msg("installed")
end
+task :install_prezto do
+ if want_to_install?('zsh enhancements & prezto')
+ install_prezto
+ end
+end
+
task :update => [:install] do
#TODO: for now, we do the same as install. But it would be nice
#not to clobber zsh files
end
task :submodule_init do
- run %{ git submodule update --init --recursive }
+ unless ENV["SKIP_SUBMODULES"]
+ run %{ git submodule update --init --recursive }
+ end
end
desc "Init and update submodules."
task :submodules do
- puts "======================================================"
- puts "Downloading YADR submodules...please wait"
- puts "======================================================"
-
- run %{
- cd $HOME/.yadr
- git submodule foreach 'git fetch origin; git checkout master; git reset --hard origin/master; git submodule update --recursive; git clean -dfx'
- git clean -dfx
- }
- puts
+ unless ENV["SKIP_SUBMODULES"]
+ puts "======================================================"
+ puts "Downloading YADR submodules...please wait"
+ puts "======================================================"
+
+ run %{
+ cd $HOME/.yadr
+ git submodule foreach 'git fetch origin; git checkout master; git reset --hard origin/master; git submodule update --recursive; git clean -dfx'
+ git clean -dfx
+ }
+ puts
+ end
end
task :default => 'install'
private
def run(cmd)
- puts
puts "[Running] #{cmd}"
`#{cmd}` unless ENV['DEBUG']
end
@@ -98,6 +104,7 @@ def install_fonts
end
def install_prezto
+ puts
puts "Installing Prezto (ZSH Enhancements)..."
unless File.exists?(File.join(ENV['ZDOTDIR'] || ENV['HOME'], ".zprezto"))
@@ -107,48 +114,43 @@ def install_prezto
file_operation(Dir.glob('zsh/prezto/runcoms/z*'), :copy)
end
+ puts
+ puts "Overriding prezto ~/.zpreztorc with YADR's zpreztorc to enable additional modules..."
+ run %{ ln -nfs "$HOME/.yadr/zsh/prezto-override/zpreztorc" "${ZDOTDIR:-$HOME}/.zpreztorc" }
+
+ puts
puts "Creating directories for your customizations"
run %{ mkdir -p $HOME/.zsh.before }
run %{ mkdir -p $HOME/.zsh.after }
run %{ mkdir -p $HOME/.zsh.prompts }
end
def want_to_install? (section)
- puts "Would you like to install configuration files for: #{section}? [y]es, [n]o"
- STDIN.gets.chomp == 'y'
+ if ENV["ask"]=="true"
+ puts "Would you like to install configuration files for: #{section}? [y]es, [n]o"
+ STDIN.gets.chomp == 'y'
+ else
+ true
+ end
end
def file_operation(files, method = :symlink)
- skip_all = false
- overwrite_all = false
- backup_all = false
-
files.each do |f|
file = f.split('/').last
source = "#{ENV["PWD"]}/#{f}"
target = "#{ENV["HOME"]}/.#{file}"
- puts "--------"
- puts "file: #{file}"
- puts "source: #{source}"
- puts "target: #{target}"
+ puts "======================#{file}=============================="
+ puts "Source: #{source}"
+ puts "Target: #{target}"
if File.exists?(target) || File.symlink?(target)
- unless skip_all || overwrite_all || backup_all
- puts "File already exists: #{target}, what do you want to do? [s]kip, [S]kip all, [o]verwrite, [O]verwrite all, [b]ackup, [B]ackup all"
- case STDIN.gets.chomp
- when 'o' then overwrite = true when 'b' then backup = true
- when 'O' then overwrite_all = true
- when 'B' then backup_all = true
- when 'S' then skip_all = true
- end
- end
- FileUtils.rm_rf(target) if overwrite || overwrite_all
- run %{ mv "$HOME/.#{file}" "$HOME/.#{file}.backup" } if backup || backup_all
+ puts "[Overwriting] #{target}...leaving original at #{target}.backup..."
+ run %{ mv "$HOME/.#{file}" "$HOME/.#{file}.backup" }
end
if method == :symlink
- run %{ ln -s "#{source}" "#{target}" }
+ run %{ ln -nfs "#{source}" "#{target}" }
else
run %{ cp -f "#{source}" "#{target}" }
end
@@ -162,6 +164,8 @@ def file_operation(files, method = :symlink)
end
end
+ puts "=========================================================="
+ puts
end
end
View
@@ -0,0 +1,4 @@
+set autolist
+set autoeval
+set autoreload
+set forcestep
View
@@ -0,0 +1,73 @@
+# Ring the bell if any background window rang a bell
+set -g bell-action any
+
+# Default termtype. If the rcfile sets $TERM, that overrides this value.
+set -g default-terminal screen-256color
+# set -g default-terminal "screen-256color"
+#
+set-option -g default-command "reattach-to-user-namespace -l $SHELL -l"
+
+# Keep your finger on ctrl, or don't
+bind-key ^D detach-client
+
+# Create splits and vertical splits
+bind-key v split-window -h
+bind-key ^V split-window -h
+bind-key s split-window
+bind-key ^S split-window
+
+# Pane resize in all four directions using vi bindings.
+# Can use these raw but I map them to shift-ctrl-<h,j,k,l> in iTerm.
+bind-key J resize-pane -D
+bind-key K resize-pane -U
+bind-key H resize-pane -L
+bind-key L resize-pane -R
+
+# Use vi keybindings for tmux commandline input.
+# Note that to get command mode you need to hit ESC twice...
+set -g status-keys vi
+
+# Use vi keybindings in copy and choice modes
+setw -g mode-keys vi
+#
+# easily toggle synchronization (mnemonic: e is for echo)
+# sends input to all panes in a given window.
+bind e setw synchronize-panes on
+bind E setw synchronize-panes off
+
+# set first window to index 1 (not 0) to map more to the keyboard layout...
+set -g base-index 1
+
+# color scheme (styled as vim-powerline)
+set -g status-left-length 52
+set -g status-right-length 451
+set -g status-fg white
+set -g status-bg colour234
+set -g pane-border-fg colour245
+set -g pane-active-border-fg colour39
+set -g message-fg colour16
+set -g message-bg colour221
+set -g message-attr bold
+set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
+set -g window-status-format "#[fg=colour235,bg=colour252,bold] #I #W "
+#set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
+#set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
+set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #I: #W #[fg=colour39,bg=colour234,nobold]⮀"
+
+# Patch for OS X pbpaste and pbcopy under tmux.
+# set-option -g default-command "reattach-to-user-namespace -l zsh"
+
+# Screen like binding
+unbind C-b
+set -g prefix C-a
+
+# No escape time for vi mode
+set -sg escape-time 0
+
+# Screen like binding for last window
+unbind l
+bind C-a last-window
+
+# Bigger history
+set -g history-limit 10000
+#
Submodule sjbach-lusty deleted from b1dd3a
Submodule tpope-vim-ragtag added at 2f639e
@@ -1,4 +1,5 @@
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$'
+let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others']
" Default to filename searches - so that appctrl will find application
" controller
@@ -0,0 +1,42 @@
+" neocomplcache
+" A beter autocomplete system!
+
+let g:neocomplcache_enable_at_startup = 1
+let g:neocomplcache_enable_camel_case_completion = 1
+let g:neocomplcache_enable_underbar_completion = 1
+let g:neocomplcache_enable_smart_case = 1
+
+" default # of completions is 100, that's crazy
+let g:neocomplcache_max_list = 5
+
+" words less than 3 letters long aren't worth completing
+let g:neocomplcache_auto_completion_start_length = 3
+
+" Map standard Ctrl-N completion to Cmd-Space
+inoremap <D-Space> <C-n>
+
+" This makes sure we use neocomplcache completefunc instead of
+" the one in rails.vim, otherwise this plugin will crap out
+let g:neocomplcache_force_overwrite_completefunc = 1
+
+" Define keyword.
+if !exists('g:neocomplcache_keyword_patterns')
+ let g:neocomplcache_keyword_patterns = {}
+endif
+let g:neocomplcache_keyword_patterns['default'] = '\h\w*'
+
+" Enable omni completion.
+autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
+autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
+autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
+autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
+autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
+autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
+" Enable heavy omni completion.
+if !exists('g:neocomplcache_omni_patterns')
+ let g:neocomplcache_omni_patterns = {}
+endif
+let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
+
+" Prevent hanging with python: https://github.com/skwp/dotfiles/issues/163
+let g:neocomplcache_omni_patterns['python'] = ''
View
@@ -1,3 +1,3 @@
# path, the 0 in the filename causes this to load first
-export PATH=/usr/local/sbin:/usr/local/bin:$PATH:$HOME/.yadr/bin:$HOME/.yadr/bin/yadr
+export PATH=$PATH:$HOME/.yadr/bin:$HOME/.yadr/bin/yadr
View
@@ -97,6 +97,8 @@ alias gsm='git submodule'
alias gsmi='git submodule init'
alias gsmu='git submodule update'
alias gt='git t'
+alias gbg='git bisect good'
+alias gbb='git bisect bad'
# Common shell functions
alias less='less -r'
@@ -110,7 +112,7 @@ alias cl='clear'
alias gz='tar -zcvf'
# Ruby
-alias c='pry -r ./config/environment' # Rails 3
+alias c='rails c' # Rails 3
alias co='script/console --irb=pry' # Rails 2
alias ts='thin start'
alias ms='mongrel_rails start'
@@ -144,3 +146,6 @@ alias zc='zeus console'
# Rspec
alias rs='rspec spec'
+
+# Sprintly - https://github.com/nextbigsoundinc/Sprintly-GitHub
+alias sp='sprintly'
Oops, something went wrong.

0 comments on commit 740f7e5

Please sign in to comment.