Skip to content

Commit

Permalink
Update 16/3/15
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekreeki committed Mar 16, 2015
1 parent 15234aa commit 663ca10
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ alias ll='ls -GFhl'
# alias ls='ls -GFhl'

# BUNDLER
alias bi='bundle install'
alias bi='bundle install && spring stop'

# RAILS
alias restart='mkdir -p tmp && touch tmp/restart.txt'
Expand All @@ -16,6 +16,7 @@ alias gs='git status -s'
alias ga='git add'

alias gbr='git branch'
alias gbf='git branch | cut -c3- | fzf | xargs git checkout'
alias gcl='git clone'
alias gco='git checkout'

Expand All @@ -41,5 +42,6 @@ alias vim="mvim -v"

# NOCORRECT

alias rspec='bin/rspec --format VimFormatter --out quickfix.out --format progress'
alias mvim='nocorrect mvim'
alias spring='nocorrect spring'
2 changes: 1 addition & 1 deletion .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
aliases = config --get-regexp '(alias.*)'

[core]
excludesfile = /Users/mikekreeki/.gitignore
excludesfile = /Users/mikekreeki/.dotfiles/git/.gitignore
editor = "mvim -f"

; [merge]
Expand Down
56 changes: 48 additions & 8 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
Plugin 'scrooloose/syntastic'
Plugin 'Shougo/neocomplete.vim'
Plugin 'Shougo/neosnippet.vim'
Bundle 'Shougo/neosnippet-snippets'
Plugin 'Yggdroot/indentLine'
Plugin 'kien/rainbow_parentheses.vim'
Plugin 'Lokaltog/vim-powerline'
Expand All @@ -38,14 +39,13 @@
Plugin 'ntpeters/vim-better-whitespace'
Plugin 'AndrewRadev/multichange.vim'
Plugin 'rhysd/conflict-marker.vim'
" Plugin 'rhysd/clever-f.vim'
Plugin 'idanarye/vim-merginal'

Plugin 'rking/ag.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'int3/vim-extradite'
Plugin 'tpope/vim-rvm'
" Plugin 'tpope/vim-bundler'
Plugin 'tpope/vim-bundler'

Plugin 'tpope/vim-rails'
Plugin 'vim-ruby/vim-ruby'
Expand All @@ -63,6 +63,7 @@
Plugin 'groenewege/vim-less'
Plugin 'justinj/vim-react-snippets'
Plugin 'depuracao/vim-rdoc'
Plugin 'mtscout6/vim-cjsx'

Plugin 'airblade/vim-gitgutter'
Plugin 'janko-m/vim-test'
Expand Down Expand Up @@ -91,6 +92,8 @@
Plugin 'kmnk/vim-unite-giti'
Plugin 'Shougo/neomru.vim'
Plugin 'mattn/ctrlp-launcher'
Plugin 'tpope/vim-rsi'
Plugin 'skwp/greplace.vim'

call vundle#end()

Expand Down Expand Up @@ -133,10 +136,28 @@

set scrolloff=1

" Syntax coloring lines that are too long just slows down the world
set synmaxcol=300

" Use only 1 space after "." when joining lines instead of 2
set nojoinspaces

" Don't reset cursor to start of line when moving around
set nostartofline

" show completion on the mode-line
set wildmenu

" Auto-reload buffers when files are changed on disk
set autoread

if $TERM == "xterm-256color" || $TERM == "screen-256color" || $COLORTERM == "gnome-terminal"
set t_Co=256
endif

au BufWritePost .vimrc so $MYVIMRC
nnoremap <leader>V :e $MYVIMRC<cr>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" INDENTATION

Expand Down Expand Up @@ -293,6 +314,10 @@
set history=250

set updatetime=750
set undofile " Save undo's after file closes
set undodir=~/.vim/undo " where to save undo histories
set undolevels=1000 " How many undos
set undoreload=10000 " number of lines to save for undo

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" MOVING BETWEEN FILES
Expand All @@ -305,6 +330,8 @@

nmap <leader>s :only<CR>:AV<CR>
let g:netrw_liststyle = 0

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" MODES

Expand Down Expand Up @@ -383,8 +410,8 @@
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" ALIASES

:command! W w
:command! Q q
cnoreabbrev W w
cnoreabbrev Q q

:command! Stop !spring stop

Expand Down Expand Up @@ -469,6 +496,10 @@
highlight! link DiffDelete GitGutterDelete
highlight! link DiffChange GitGutterChange

" Make those debugger statements painfully obvious
au BufEnter *.rb syn match error contained "\<binding.pry\>"
au BufEnter *.rb syn match error contained "\<debugger\>"

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CONCEAL

Expand Down Expand Up @@ -577,10 +608,7 @@

nmap <silent> <leader>R :TestNearest<CR>
nmap <silent> <leader>r :TestFile<CR>
" nmap <silent> <leader>a :TestSuite<CR>
" nmap <silent> <leader>l :TestLast<CR>
let g:test#ruby#rspec#executable = 'bundle exec rspec'
let g:test#ruby#rspec#options = '--no-color'

" Not vim-test related
Expand Down Expand Up @@ -615,7 +643,7 @@
let g:neocomplete#sources#tags#cache_limit_size = 5000000

let g:neosnippet#enable_snipmate_compatibility = 1
let g:neosnippet#snippets_directory='~/.vim/snippets'
let g:neosnippet#snippets_directory='~/.vim/bundle/vim-react-snippets/snippets'

imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
Expand Down Expand Up @@ -735,6 +763,13 @@

nmap <S-Enter> :ZoomWin<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" greplace.vim

set grepprg=ag

let g:grep_cmd_opts = '--line-numbers --noheading'

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Unite

Expand Down Expand Up @@ -763,6 +798,11 @@
" Convert hashes to 1.9 syntax
nmap <leader>h :%s/:\([^=,'"]*\) =>/\1:/gc<CR>
" Treat JSON files like JavaScript
au BufNewFile,BufRead *.json setf javascript

" Make sure all markdown files have the correct filetype
au BufRead,BufNewFile *.{md,markdown,mdown,mkd,mkdn,txt} setf markdown

" vim-github-dashboard
let g:github_dashboard = { 'username': 'mikekreeki', 'password': $GITHUB_TOKEN }
Expand Down
5 changes: 5 additions & 0 deletions git/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Thumbs.db

# RVM
.rvmrc
.ruby-gemset

# POW
.powrc
Expand All @@ -22,8 +23,12 @@ Thumbs.db
.swp
*.swp
tags
.smartgf_tags
.smartgf_tags_date

# RAILS
.env
config/mongoid.yml
config/database.yml
quickfix.out
spec/vim_formatter.rb
18 changes: 18 additions & 0 deletions rspec/vim_formatter.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
class VimFormatter
RSpec::Core::Formatters.register self, :example_failed

def initialize(output)
@output = output
end

def example_failed(notification)
@output << format(notification) + "\n"
end

private

def format(notification)
rtn = "%s: %s" % [notification.example.location, notification.exception.message]
rtn.gsub("\n", ' ')[0,160]
end
end

0 comments on commit 663ca10

Please sign in to comment.