Reputation: 1051
I learnt today that top
has a W
command, which will write the current settings to a .toprc
file (or something equivalent) that automatically gets applied next time.
Does vim have a similar feature? Or can one be easily hacked together? Yes I could go and put the commands in a .vimrc
, but I've ssh'ed into a server it would be a lot more convenient to :set
some basic settings, then use some command :<write-settings-as-vimrc>
, and continue on with my work. This would let me not break context.
Edit: I tried searching for "save current vim config as .vimrc" and while I found 2 ("vim ~/.vimrc"), 3 ("Put them in your vimrc "), 4 (:mksession
but not :mkvimrc
), I didn't find anything about :mkvimrc
. The built-in Stack Overflow duplicate search also didn't turn up anything. Despite being unable to find it, this question is a duplicate of 5 (and also a duplicate of 6) so I'll be closing this question. I'm putting all these links here in the hope of guiding google-bot to better search results.
Upvotes: -2
Views: 30