Current Cursor Position?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
rparenti
Posts: 4
Joined: Wed Feb 04, 2004 12:58 pm

Current Cursor Position?

Post by rparenti »

Is there a command to copy the current cursor position, so that I can use it later in a macro to either SearchGoTo or GoToColumn that position?

What I really want to do, is after pasting some text I want to return to the beginning of the pasted text, not leave the cursor at the end of it.

thanks ... Rob
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post by ak47wong »

I looked, but couldn't find one. It would be useful. Emacs, for example, lets you move back to the beginning of the pasted text by pressing C-x C-x (that's CTRL+X twice). It would be nice if TextPad could do that.

One way is to do it with bookmarks. You can set a bookmark, paste, and then move to the previous bookmark. Unfortunately, if the cursor is at the start of the line, the bookmark moves down when you do the paste, so you'll have to work around that (e.g. add a new line above and set the bookmark there).

Or you could insert a distinctive string, paste, and then search backwards for the string and delete it. Those are two ideas :)

Andrew
rparenti
Posts: 4
Joined: Wed Feb 04, 2004 12:58 pm

Post by rparenti »

Good ideas Andrew. It turns out bookmarks are line focused, so when you search for the previous bookmark it just goes to the beginning of the line.

The idea of inserting a distinctive string and then searching backwards for it, deleting it, etc -- that works, and I now have a new little macro to do what I need. Kind of a kludge.

It seems odd that they would have a GoTo command that accepts a column position without having a way of capturing your current position. They must have an internal command that does that for use with block selections.

Feature request? Developers? Anyone? Bueller?

Thanks ... Rob
Post Reply