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, '\zs\w\+', bbs2host_{bbs}, '')) elseif line =~ pat_board let bbs = substitute(line, pat_board, '\2', '') call setline(i, substitute(line, '\zs\w\+', bbs2host_{bbs}, '')) endif let i = i + 1 endwhile