getBookTitles.vim (455B)
1 " Run the following script on a .tsv file to copy the book titles and abbreviations from that file 2 set wrapscan 3 let books = [] 4 let abbrs = [] 5 0pu_ | + 6 while line('.') != 1 7 let currLine = split(getline('.'), '\t') 8 let books += [currLine[0]] 9 let abbrs += [currLine[1]] 10 exe ':norm /^\%(=currLine[0]\)\@!' 11 endw 12 redir @b>|let books 13 redir @a>|let abbrs 14 redir END 15 0pu a 16 norm ilet ela=lldt[ 17 1d 18 0pu b 19 norm ilet ela=lldt[ 20 1d 21 3d 22 echom "Done."