Vertical movement

To go up and down lines, you could again cast the index to a float and add n.0 to it, but there is once again a much neater shortcut. This time, it is +nl or -nl, depending on the direction.

For example, if we had a shortcut to move the cursor three lines down, we could get its position with pos = text.index(tk.INSERT) and then set it to three lines lower with pos = pos + "+3l".

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset