Chalice for Vim Vol.4at SOFTWARE
Chalice for Vim Vol.4 - 暇つぶし2ch576:名無しさん@お腹いっぱい。
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


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch