Is there a function in Vimscript or a convention that allows you to simply print text to the editor? The function echo only supplies a command line print function, and does not actually print to the editor.
Asked
Active
Viewed 3,659 times
2 Answers
5
When you say "print to the editor", I take it you mean "print to the current buffer". If that's correct, take a look at :help append().
Randy Morris
- 39,631
- 8
- 69
- 76
2
A facility I sometimes use is :redir @" (or :redir @a for register a), which redirects the output of commands to a buffer, so you can paste it. To stop output redirection, say :redir end. See :help :redir.
Lumi
- 14,775
- 8
- 59
- 92