06/12/31 11:13:19 km7uylpy0
べた書きするとこんな感じ
let pat_board = '\v^.*http://(\w+)\.2ch\.net/(\w+)/.*$'
let pat_thread = '\v^.*http://(\w+)\.2ch\.net/test/read\.cgi/(\w+)/.*$'
ChaliceReloadBoardList
let i = 1
while i <= line('$')
let line = getline(i)
if line =~ pat_board
let host = substitute(line, pat_board, '\1', '')
let bbs = substitute(line, pat_board, '\2', '')
let bbs2host_{bbs} = host
endif
let i = i + 1
endwhile
ChaliceGoThreadList
if b:title != " スレの栞"
ChaliceBookmarkToggle threadlist
endif
let i = 1
while i <= line('$')
let line = getline(i)
if line =~ pat_thread
let bbs = substitute(line, pat_thread, '\2', '')
call setline(i, substitute(line, 'URLリンク(\zs\w\+)<)', bbs2host_{bbs}, ''))
endif
let i = i + 1
endwhile