Skip to content

Instantly share code, notes, and snippets.

@egwynn
egwynn / ggrepcword.vim
Created June 6, 2014 15:06
Ggrep for <cword> (in current dir or in git root)
function! GitRoot()
let cmd="git rev-parse --show-toplevel"
let result=system(cmd)
if v:shell_error
echom "Error: [".result."] (\"".result."\")"
echom "Command: [".cmd."]"
return expand("%:p:h/")
endif
return result
endfunction
" Open the corresponding .C/.T/.h/whatever file
function! EG_openMatching()
let path=expand("%:p:h")
let pattern=expand("%:t:r").".\\*"
let cur=expand("%:t")
let cmd="find ".path." -maxdepth 1 -name ".pattern." -and -not -name ".cur
let result=system(cmd)
if v:shell_error
echom "Error: [".result."] (".len(result).")"
echom "Command was: [".cmd."]"

Keybase proof

I hereby claim:

  • I am egwynn on github.
  • I am eli (https://keybase.io/eli) on keybase.
  • I have the public key with fingerprint BA83 8B42 BC86 54C7 8FAB  AD66 4FC4 8C50 74E8 66E9

To claim this, I am signing this object:

Examining /usr/lib/libc.a...non-existent...non-existent and no sources...out-of-date.
make: don't know how to make /usr/lib/libc.a. Stop
*** [make] Error code 2
Stop in /usr/src.
*** [upgrade_checks] Error code 1
Stop in /usr/src.
#!/usr/bin/env bash
# Takes a file with a list of options, and builds a simple "pick-many" dialog
# menu out of them.
if ! which dialog >/dev/null; then
echo "ERROR: 'dialog' not installed" 1>&2
exit 1
fi
Millenial Hellscape Littered With The Desperate Ravings Of Listless Twentysomething Wights ★★★★★
by bandolinho
Oh Vanity! How shameful and terrifying is the mass of desperate, hungry eyes
that lack the capacity to articulate what they desire! Oh Epiphany! How these
scuttling, frightened youths have writ tomes of self-mollification as if to
calm themselves of the impending ache of loneliness by burying their lives in
verbosity and vagueness. Oh Irony! They tell and they tell--my God! Do they
tell!--and yet show nothing of their souls as if to avoid a confrontation with
their own blandness and boredom. Oh how we all sing our own praises and yet