Reload a VIM script during script development.
Vim script
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
plugin
README

README

This is a mirror of http://www.vim.org/scripts/script.php?script_id=1904

DESCRIPTION
Re-sources a Vim script. The script may use a multiple inclusion guard
variable g:loaded_{scriptname} (with {scriptname} having either the same case
as specified or all lowercase.) 
If you specify the bare scriptname (without .vim extension), the script must
reside in $VIMRUNTIME/plugin/{scriptname}.vim. Otherwise, the passed filespec
is interpreted as the file system location of a Vim script and sourced as-is. 
If you execute :ReloadScript without passing a scriptname, the current buffer
is re-sourced. 

USAGE
ReloadScript				Re-sources the current buffer. 
ReloadScript {scriptname}		Re-sources the passed plugin script. 
ReloadScript {path/to/script.vim}	Re-sources the passed file. 

ASSUMPTIONS
Not every script supports reloading. There may be error messages like
"function already exists". To support reloading, the script should use the
bang (!) variants of :function! and :command!, which will automatically
override already existing elements. 

Ensure that the script uses a multiple inclusion guard variable that conforms
to the conventions mentioned above. The :ReloadScript command will issue a
warning if it cannot find the inclusion guard variable.