Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vimscript: outputting into a new (split) window

Tags:

vim

From within Vimscript, how does one open a new split window and insert the contents of a variable?

I'm trying to write a script that applies a function to the current buffer and displays the result in a split window.

Thanks.

like image 375
Thomas Avatar asked Oct 26 '25 05:10

Thomas


1 Answers

To open a new window, use :split. To insert the contents of a variable, use :call append(0, g:some_var)

like image 66
too much php Avatar answered Oct 28 '25 21:10

too much php



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!