Changeset 12813 for lang/vim

Show
Ignore:
Timestamp:
05/29/08 22:51:01 (6 months ago)
Author:
ujihisa
Message:

lang/vim/misc/runghc.vim: without using echo

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/vim/misc/runghc.vim

    r12658 r12813  
    99 
    1010func! s:Runghc() 
    11   let code = join(getline(1, line("$")), "\n") 
     11  let codes = getline(1, line("$")) 
    1212  let tmpfile = "/tmp/runghc-vim-tmpfile.hs" 
     13 
    1314  exe 'bo sp [runghc]' 
    14   call eval("append(0, split(system('echo \"'.code.'\" > '.tmpfile.' && runghc '.tmpfile), '\n'))") 
     15  call writefile(codes, tmpfile) 
     16  call append(0, split(system('runghc '.tmpfile), '\n')) 
    1517 
    1618  setlocal nomodifiable