Skip to content

Instantly share code, notes, and snippets.

@dahu
Created August 19, 2015 23:40
Show Gist options
  • Save dahu/7bb01e861649a4e9a783 to your computer and use it in GitHub Desktop.
Save dahu/7bb01e861649a4e9a783 to your computer and use it in GitHub Desktop.
database lookup -- AWKish example in VimL for shay_shay
" AWKish example in VimL for shay_shay
" Barry Arthur, Aug 2015
let db = {}
for l in readfile('utiluqotic.txt')
let recs = split(l, '|')
let db[recs[0]] = recs
endfor
iabbrev db <c-r>=db[expand('%:r')][5]<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment