I lost my latest version of my .vimrc and I have no snapshots of it anywhere but I do have a vim still open that has the new functions and mappings. I was hoping that maybe someone would know how to "export" that running vim's maps and functions out to a file so I could recreate the .vimrc?
Opening vimrc Using file name completion, you could type :e $M then press Tab until you see the desired variable. If you only want to see the path, type :echo $M then press Tab to see the variable, and press Enter. In gvim, the Edit menu includes "Startup Settings" which will use $MYVIMRC to edit your vimrc file.
A VIMRC file is a settings file used by the Vim text editor. It stores settings for the editor that are loaded when the editor is opened.
According to the help menu (see :help $MYVIMRC ), vim will look for a user vimrc in specific places. It look first for ~/. vimrc and then for ~/. vim/vimrc .
Neovim uses $XDG_CONFIG_HOME/nvim instead of ~/. vim as its main configuration directory and $XDG_CONFIG_HOME/nvim/init. vim instead of ~/. vimrc as its main configuration file.
Use :mkvimrc
(or :mksession
if you also want to save any buffer-local state too).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With