Created
December 3, 2012 00:33
-
-
Save torque/4191807 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
-- split all selected lines at \N | |
function argh(sub,sel) | |
for i = #sel,1,-1 do | |
local v = sel[i] | |
local line = sub[v] | |
line.text = line.text:gsub("\\[Nn]",string.char(6)) | |
for a in line.text:reverse():gfind(("[^%s]+"):format(string.char(6))) do | |
line.text = a:reverse() | |
sub.insert(v+1,line) | |
end | |
sub.delete(v) | |
end | |
end | |
aegisub.register_macro("split errything","do it",argh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment