Ivan F. Villanueva B. wrote:
Hello vimers,
I'm restarting learning groovy, a kind of scripting language for java
I have something like:
#!/usr/local/java/groovy/bin/groovy
println ( ["a","b"]*.length() )
println ( [String, File, List].'package'.name )
And would like to introduce in the same buffer the output of the execution of
the
file, but commented.
I can partially do it with
:r !groovy %
which adds the output
[1, 1]
[java.lang, java.io, java.util]
but I would like to have:
// output:
// [1, 1]
// [java.lang, java.io, java.util]
I don't know where to start looking for in the vim 7 documentation.
(untested)
:mark '
:put ="output:"
:r !groovy %
:exe "normal ''3gI// \e"
Best regards,
Tony.