I have a vim script I\'m developing in my current buffer and I want to execute it. Is there a simple way to do it?
After a long search I have only found two related
An autocmd to source the file whenever you save might help:
autocmd BufWritePost <buffer> source %
Use:
:%y" (alternatively: ggyG) :@"
It will copy whole buffer into default register and then run it.
See :help :y and :help :@ (and also :help range maybe).
:help :y
:help :@
:help range