[wingide-users] customizing kill-line
Wingware Support
support at wingware.com
Thu Jul 15 09:22:43 MDT 2010
On 7/14/2010 10:37 PM, David Underhill wrote:
> Can I customize kill-line's implementation? I'd like to have always
> kill through the EOL character(s) even if there are other character(s)
> on the line.
You can do this via scripting. The function would be:
def kill_line_with_eol(ed=wingapi.kArgEditor):
doc = ed.GetDocument()
start, end = ed.GetSelection()
end_lineno = doc.GetLineNumberFromPosition(start)
if end_lineno + 1 < doc.GetLineCount():
kill_end = doc.GetLineStart(end_lineno + 1)
else:
kill_end = doc.GetLineEnd(end_lineno)
doc.DeleteChars(start, kill_end - 1)
Cheers,
John
More information about the wingide-users
mailing list