I wannt to replace all the tabs in a .cpp file to four spaces. I am a newbie
using scitilla, don't know how to use SCI_REPLACETARGETRE implement this.
Google it, i got:
function ReplaceTabsWithSpaces()
s = editor:textrange(0, editor.Length)
s, n = string.gsub(s, "\t", string.rep(" ", editor.TabWidth))
editor.TargetStart=0
editor.TargetEnd=editor.Length
_ALERT("Converting tabs to spaces: " .. n .. " tabs converted")
editor:ReplaceTarget(s)
end
function ReplaceSpacesWithTabs()
s = editor:textrange(0, editor.Length)
s, n = string.gsub(s, string.rep(" ", editor.TabWidth), "\t")
editor.TargetStart=0
editor.TargetEnd=editor.Length
_ALERT("Converting spaces to tabs: " .. n .. " tabs inserted")
editor:ReplaceTarget(s)
end
But how should i do using C++?
thanks~
Ryan_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest