Home Download Buy Blog Forum Support

Move cursor anywhere

Move cursor anywhere

Postby Senf on Sat Oct 27, 2012 7:44 pm

The problem.
Most of us have done it: splitting a comment over multiple lines. Needless to say, padding by holding the space bar wasn't very convenient in the following example:
Image

The solution.
  1. Right now, clicking behind the last character of a line makes the cursor jump to its end. This could be changed by an option: when clicking in the empty space, the editor automatically pads the line with spaces, so that the cursor is precisely where I have clicked.
  2. A command could do something similar: pressing Ctrl+Enter for example could insert a new line below the current one, and move the cursor downwads so that it stays in the same column in the process. This could again be accomplished by automatically inserting the right amount of spaces.
I've used the comment problem as an example, but there are other places you could use these features, for example hacking a "DEBUG" comment somewhere on the right side of a line.

Something even cooler.
We can already select boxes in Sublime to copy and overwrite them. Make a feature to similarly opening a text box similar to Photoshop: Whatever you're writing is constrained to that text box; when you press ESC or click outside the box, it simply disappears.
Image
Similarly, one could expand the current "make box selection" to incorporate the "pad with spaces" behaviour mentioned before: Selecting a box in the nirvana to the right of the screen places a couple of cursors in adjacent lines and the same column. The behaviour right now is putting the cursor to the end of every line one's touching, and I dare to say that's not been useful too many times.
Senf
 
Posts: 5
Joined: Sun Sep 16, 2012 11:28 pm

Re: Move cursor anywhere

Postby adzenith on Mon Oct 29, 2012 9:28 pm

The box thing could totally be done with a plugin (as long as you're willing to use the keyboard to make the box).
That's actually a really cool idea.
adzenith
 
Posts: 1213
Joined: Mon Oct 19, 2009 9:12 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 6 guests