Reading the documentation about alternate file, I thought I could manipulate # like a global variable, but it's not the case. I was thinking doing something like let &#='/path/to/alternate/file'Which is not possible.How would you set manually the alternate file?
How to set manually the alternate file
register;multiple files;alternate file
The alternate file is stored in a register, #. Change you line to:let @#='/path/to/alternate/file'For more help see::h registers:h quote#:h :let-@