\w [ FILE ]

\w [ FILE ] outputs the current query buffer to the file filename.