Skip to content

Instantly share code, notes, and snippets.

View snatchev's full-sized avatar
🎏
worse is better

Stefan Natchev snatchev

🎏
worse is better
View GitHub Profile
set nocompatible
set mouse=a
" lets use ack instead of grep. add default flags if needed
set grepprg=ack
function! Ack(args)
tabnew
execute "silent! grep " . a:args
botright copen
endfunction
# this method will take in a hash of date fragments and turns it into a date from_now
# I can't think of a more descriptive name at the moment, i will just use an example:
#>> future_date_from_hash(:days => 5, :minutes => 3, :month => 1)
#eq (5.days + 3.minutes 1.month).from_now
def future_date_from_hash(hash = {})
hash.to_a.map{|d| d.last.send(d.first)}.inject(&:+).from_now
end
@snatchev
snatchev / .gvimrc
Created June 2, 2009 17:52
snatchev's dot vim configs
" CtrlP OS-X Menu remapping
if has("gui_macvim")
set guioptions=egmrt
macmenu &File.New\ Tab key=<D-S-t>
set guifont=Menlo\ for\ Powerline:h16
endif
map <D-Down> <C-W><Down>
map <D-Up> <C-W><Up>
map <D-Left> <C-W><Left>