Created
March 24, 2015 03:56
-
-
Save nefftd/c9d4bb93e41415087a7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local buffer = vim.buffer() | |
local data = {} | |
for i = 1,#buffer do | |
-- NOTE: buffer is a userdata; must be copied into array | |
data[i] = buffer[i] | |
end | |
data = table.concat(data,'\n') -- join the table into a string, separated by new lines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment