cool, thanks for the help guys!
-lev
On Aug 28, 2006, at 11:31 AM, Tim Chase wrote:
for the lazy, is there any way to automatically append vim
options to the ~/.vimrc file?
I presume that there are select options that you want to preserve.
You could do something like this *untested* scriptlet (be sure to
back up your vimrc beforehand...perhaps your whole computer...I
take no responsibility if it crashes, burns, kicks your dog, eats
your dinner, wrecks your car, elopes with your daughter, or steals
your spouse)
:redir @a
:sil! set ts? sw? et?
:redir END
:let @a=substitute(@a, '\n', ' ', 'g')
:new
:put='set '[EMAIL PROTECTED]
:w! >> $HOME/.vimrc
:q!
The 2nd line allows you to specify which options interest you. You
may not care to save most options.
It then carte-blanche dumps the options at the end of your vimrc.
Whether this is what you want, YMMV.
It doesn't try to scan through your vimrc for pre-existing settings
as such, and change them...thus you'll end up with accruing cruft
in your vimrc every time you use it.
It should be fairly wrappable in a script/function/mapping to allow
you to reuse it as needed.
Just an idea... :)
-tim