Lev Lvovsky wrote:
for the lazy, is there any way to automatically append vim options to
the ~/.vimrc file?
thanks :)
-lev
You can create a session (see ":help mksession") then yank part of the
session file to append it to your vimrc; but it is not just as simple as
that:
Be sure to check that those options are really what you want to set at
every startup; and if you use several versions of Vim (6.2, 6.4, 7.0;
for Unix-like OSes, for Windows, for Mac; GTK2 GUI, kvim GUI, other X11
GUI, non-X11 GUI; console Vim) you may want to add some compatibility
checks using "if has(...)" "if exists(...)" "if version ..." etc. Some
options (such as 'cursorline' or 'tabline') appeared fairly recently,
others (such as 'viminfo') may exist or not depending on compile-time
settings, the 'guifont' option has four totally incompatible formats,
only one of which is accepted by any given version of gvim (one of them
refers only to kvim, a modified build of Vim using Qt widgets which is
not supported anymore; but for instance SuSE Linux 9.3 comes with kvim
6.2.14), many options exist only in the GUI, etc. etc. etc.
-- Note: If you use a Gnome build of gvim, it will save your session
transparently when you close the Gnome or kde window manager, and
restore them the next time you log in to it.
Best regards,
Tony.
- Re: automatically appending options to vimrc? A.J.Mechelynck
-