I need to write some settings and variables into some text file for later retrieval. Retrieving the file can be a simple source command. So what is the simplest way write the file from a vimscript?
I only want to store some global variables. Global because they will be used by multiple buffers.
You can save all settings to a file via this command:
Type
:let g:command to list all global variables.You can redirect the output to a file: