Marc Weber wrote:
On Thu, Apr 05, 2007 at 01:34:10PM +0000, Eric Leenman wrote:
Hi,

Is it possible to source all scripts/plugins from VIM without leaving VIM?
When experimenting with plugins, I now
1) modify plugin
2) start VIM
3) test plugin
4) detect an error
5) close VIM
6) goto 1)
Don't see why you need this.
You might try registering :exec 'source '.expand('%')
as BufWritePost autocommand. Then :wa should suffice ?
I have one mapping sourcing the currentfile which works fine most of the
time for me.

There are sessions. So you can write a script opening vim forever
loading the session file. When exiting you can write it.
See :h mksession

HTH
Marc Weber


Global plugins, like the vimrc and gvimrc, are not meant to be sourced more than once in the course of a given session. Depending on how they are written, it may or may not be possible to source them again without ill effects; but you won't be sure that they work as intended if you don't test them in their intended environment, i.e., in a fresh instance of Vim.

Filetype plugins (or syntax and indent plugins) are not meant to be sourced more than once for a given buffer, but if you wipeout the buffer and load it again they should be sourced again. Also, a filetype-plugin (or a syntax or indent plugin) MUST NOT alter settings in parallel split-windows, nor the default settings for future buffers of a different filetype (and for non-native English speakers: "must not" = "is required not to").


Best regards,
Tony.
--
"Why be a man when you can be a success?"
                -- Bertold Brecht

Reply via email to