John Burnett 4 years ago • updated by Aliteralmind 1 year ago 4
One thing that I am missing from my previous editor (Textpad) that I havne't seen anywhere else, is the way cursor movement is handled when switching lines.  It's a bit hard to describe, but it is *very* handy.  I'll try to describe it below, but it's probably easier if you follow along by trying firsthand by downloading Textpad 4.x (e.g. http://www.textpad.com/download/v47/txpeng473.exe).

For example, say I have the following two lines, with the cursor positioned at the pipe:

--The quick | fox jumped
--over the lazy dog.

...and then I typed "brown", the cursor would end up here:

--The quick brown| fox jumped
--over the lazy dog.

...in most editors (including Sublime), if I then pressed the down arrow, I'd wind up with this:

--The quick brown fox jumped
--over the lazy d|og.

However, Textpad ends up with this:

--The quick brown fox jumped
--over the l|azy dog.

This comes in *very* handy when doing multiple similar edits across multiple lines.

It seems the editor is keeping track of both the cursor's "current X position" and the "base X position", which is "the original X position before any editing occurred since the last horizontal cursor navigation command".  Then, if you move the cursor up or down (with either up/down arrows, or pgup/pgdn), the cursor tries to keep as close to the original X position as possible, but within the current line's constraints.  The base X position is updated next time you manually position the cursor horizontally (e.g. left/right arrows, mouse click, etc).

Anyway, like I said, it's hard to appreciate without trying, and it'd be awesome to see added to what already looks to be a great editor.
in most editors (including Sublime), if I then pressed the down arrow, I'd wind up with this:
I think there's a good reason why most editors do it the way Sublime does it. The behavior TextPad displays is quite unexpected. If you need an entire paragraph to describe the behavior, it isn't exactly intuitive! And the case you mention (similar edits across multiple lines) is better handled by creating multiple selections and typing once instead of type->navigate->type->navigate->type, etc.
Unfortunately, multiple selections only work if what you're typing is the same for each line (rare).  Additionally, in this case, I'd ask that you try the behavior before dismissing it as unintuitive.  Thanks!
Sounds very interesting.  An option to turn it on and off would be important for those who prefer the standard behavior.
Just created a duplicate issue, not knowing this one existed. Here's my writeup about it (and the blog post it came from):

TextPad is much smarter with cursor placement

This seemingly small and subtle thing is actually what I miss most most. TextPad is much smarter about where to place the cursor when pressing the up and down keys.

First, place your cursor here, either with the keyboard or mouse:

screenshot 1 of 4

Type “Hello”:

screenshot 2 of 4

And then press the down arrow. Sublime takes you here:

screenshot 3 of 4

TextPad takes you here:

screenshot 4 of 4

This makes it much much easier to do common things on contiguous lines, such as populate lists with unique values. It
remembers where you originally placed the cursor, or where you started typing (after navigating around with arrows).

The second part of this is that, when clicking outside of the right margin, the remembered position is where you click the mouse, not where the cursor is actually placed. So the cursor goes to the end of the line, as you expect

screenshot 1 of 3

But when you press down, Sublime goes here

screenshot 2 of 3

And TextPad goes here

screenshot 3 of 3

Of course this makes it easier to do unique stuff at the end of each line.


In both situations, in TextPad, clicking the right or left arrow resets the position.