Created
August 19, 2015 23:40
-
-
Save dahu/7bb01e861649a4e9a783 to your computer and use it in GitHub Desktop.
database lookup -- AWKish example in VimL for shay_shay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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