How can I change a file’s encoding with vim? October 4, 2022 by Tarik From the doc: :write ++enc=utf-8 russian.txt So you should be able to change the encoding as part of the write command.