You can already do this.
:new
<type your little thing>
ggyG
:@"
See
:help :@
Regards,
Gary
> p.e.in a little window beside the vim window.
Well, if you type exactly
:for i in range(3,30)
put ='2**' . i . ' = '.printf('%-10.0f',pow(2,i))
endfor
That's exactly what will appear, in a few lines at the bottom of the vim "screen". Admittedly, it will disappear when you press enter after the endfor, but you can see it again if you open the "command-line-window", see
:h command-line-window
regards, John
What about using the ':help Ex-mode' (for example with gQ).
Best,
Marcin
> This gives the possibility to do little things very quickly without
> the use of macros.
One can already do such things very quickly, just using the existing command mode prompt. If you type exactly (ending each line with enter)
:for i in range(3,30)
put ='2**' . i . ' = '.printf('%-10.0f',pow(2,i))
endfor
it will run there and then. You could check out the command-line-window, too, see :h cmdwin
Regards, John
Regards, John
:call setline('.', map(range(3,30), 'printf("2**%d = %-10.0f", v:val, pow(2, v:val))'))
Would you try my 'Rcode' plugin[1]? You can type the code in a temporary
small buffer and run it.
[1]: http://www.vim.org/scripts/script.php?script_id=3705
--
Best regards,
lilydjwg
Linux Vim Python 我的博客:
http://lilydjwg.is-programmer.com/
--
A: Because it obfuscates the reading.
Q: Why is top posting so bad?