I know I can use Awk, but I am on a Windows box, and I am making a function for others that may not have Awk. I also know I can write a C program, but I would love not to have s
Vim support for a number of scripting languages built in -- see the Python interface as an example.
Just modify vim.current.buffer appropriately and you're set.
vim.current.buffer
To be a little more specific:
function! Rotate() python <