how to save current new buffer (opened with :new) to other location, outside of vim_data (which is default vim working location)
my default vim working location in vimrc is set to ~/Desktop/vim_data
let's visualize folder structure like this:
~/Desktop > vim_data > sub1
sub2
> general data folder1
> general_data_folder2
inside vim_data folder there are subfolders called: sub1 & sub2 current :pwd is in "vim_data" i want to save my current new buffer to general data folder1, how to i do that ? to open a file in other location is easy, i can just type ":e .." or :Explore, but to save i have tried the method does not work.
:w /path/to/file.txt
? Or on Windows:w c:\path\to\file.txt
– B Layer Aug 26 '20 at 23:41:w ../general\ data\ folder1/filename
. Note that the spaces are escaped with backslashes. If you use Tab completion you shouldn't even have to enter any of that. Start with:w ../g<Tab>
for example. – B Layer Aug 27 '20 at 21:39