Changeset 15697

Show
Ignore:
Timestamp:
07/12/08 14:47:24 (5 years ago)
Author:
ujihisa
Message:

using VIM::Buffer.current.append

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/vim/ruby/mixi.vim

    r15696 r15697  
    4747  def get_latest 
    4848    page = @agent.get 'http://mixi.jp/list_diary.pl' 
    49     ["http://mixi.jp/" << page.links[33].uri.to_s.toutf8, 
    50     page.links[33].text.toutf8] 
     49    [ 
     50      page.links[33].text.toutf8, 
     51      "http://mixi.jp/" << page.links[33].uri.to_s.toutf8 
     52    ] 
    5153  end 
    5254 
     
    8082 
    8183def mixi_run 
     84  vim = VIM::Buffer.current 
    8285  return if VIM.evaluate('confirm("really?")') == 0 
    8386 
     
    105108  m.post title.toeuc, body.toeuc, images 
    106109  m.get_latest.each do |line| 
    107     VIM.evaluate %[append(#{endline}, \"#{line.chomp}\")] 
     110    vim.append(vim.count, line) 
    108111  end 
    109112end