Scite List All Occurances

lua-users home
wiki

There was no script for this entry, this is my implementation.

The output should look like that of grep or findstr and so F4 'Next Message' should work as expected.


function SciteListAllOccurances()
  if props.CurrentSelection ~= "" then
    for m in editor:match( "^.*" .. props.CurrentSelection .. ".*$", SCFIND_REGEXP, 0) do
      print(props.FileNameExt .. ":" .. (editor:LineFromPosition(m.pos)+1) .. ":" .. m.text);
    end
  else
    alert("The InternalGrep script only searchs for selected text");
  end
end
--April White, January 21, 2006
RecentChanges · preferences
edit · history
Last edited August 31, 2006 8:38 pm GMT (diff)