Open up vim instance to write, then save the text to a variable?

Something like this maybe?

    path, io = mktemp()
    close(io)
    run(`vim $path`)
    f = read(path, String)
    rm(path)