How do you save a file in a vim script? I have a script that modify a file and
I want to save it.  After that send it to an external command. The last two
lines are the important ones.  Any help would be greatly appreciate it. 

exe "normal! :%j\r"
while search("<div class=\"vpc_bcc_cell\">","Wc") != 0
  exe "normal! d^"
  exe "normal! /<\\\/div>\r"
  exe "normal! 2nf>"
  exe "normal! a\r\e"
endwhile
exe "normal! /<\\\/div>\r"
exe "normal! 2nf>"
exe "normal! a\r\e"
exe "normal! :g!/^<div/d\r"
%s#^.*window.open('\([^']\+\)'.*thumb"
src="\([^"]\+\)".*_link"[^>]\+>\([^<]\+\)<.*class="vpc_bcc_cell_text"[^>]*>\([^<]\+\)<.*$#\1<br
/>\r\2<br />\r\3<br />\r\4<br />\r<br />\r#
%s/&/&amp;/g
exe "normal! gg"
exe "normal! I<html><head><title></title></head><body>\e"
exe "normal! Go</body></html>\e"
exe "normal! :upd"
exe "normal! :!firefox.exe \"".expand("%:p")."\"\r"


Michael D. Phillips - A computer science enthusiast
I do not hate Windows, I just like the alternatives better.
Linux is my primary choice.


 
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news

Reply via email to