exe "normal! :%j\r"
Hello Michael. vim script can be thought of as a series of ex commands (colon commands), therefore the first line of your script could be rewritten: %j which should give a clue as to how you might want to *write* your file. also, you probably don't need the exe command all the way through your script - exe allows an arbitrary expression to be executed, so you can include variables in the command. You might think that your firefox command would need to use exe, since you are including the expand() call to find the path, but the following would work just as well: !firefox "%:p" HTH
