meino cramer wrote:

> Hi,
>
> (I am using Vim with Gentoo-Linux.)
>
> When developping functions and such, which goes into
> ~/.vimrc, I would like to resource .vimr via
>
>    :source ~/.vimrc
>
> , but I cannot guarantee, that there are no settings,
> which do "accumulate" when sourced several times.
>
> Is there a way to say to vim: "Forget anything you read
> from scripts or/and ~./vimrc  while starting initially?"
> and resource ~./vimrc then?
>
> Or -- in other words: Is it possible to "reboot" vim
> without leaving it?
>
> Have a nice weekend!
> Best regards,
> mcc

You can write your .vimrc in such a way, that sourcing
it multiple times is harmless.  My ~/.vimrc can be sourced
multiple times without any error or problem. Some of the
things to do:

* if your ~/.vimrc contains a function, you can define it
  using "function!" instead of "function".
* If you define an autocommand, you can use "au!" instead of "au".
* In my vimrc I do "cs kill -1" before "cs add ~/cscope.out"

My .vimrc is at http://dominique.pelle.free.fr/.vimrc.html

Cheers
-- Dominique
-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to