Home Download Buy Blog Forum Support

"Smart" horizontal cursor positioning

Re: "Smart" horizontal cursor positioning

Postby bizoo on Fri Apr 19, 2013 7:06 am

highend wrote:Is it ST3 compatible bizoo?

It must works on ST3 as is.
bizoo
 
Posts: 889
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: "Smart" horizontal cursor positioning

Postby science on Sun Sep 01, 2013 4:50 pm

I just wanted to say thank you for creating this plugin. I also migrated from TextPad on Windows and the smart cursor feature in that program was a real insight into how programmers actually use the cursor. As far as I can tell in my initial usage you've correctly adapted this feature to ST.

To contribute, I noticed on this threat that aren't any newb instructions for installing this. So I'll add those here and hopefully help anyone else who comes along. These instructions are for ST 2

* Install Sublime Package Manager following these instructions: https://sublime.wbond.net/installation
* Restart Sublime (not sure if this is required)
* Menu: Preferences / Package Control
* Choose "Add Repository"
* Paste in: https://github.com/bizoo/SmartCursor
* Menu: Preferences / Package Control
* Choose "Install Package"
* Type SmartCursor
* You should see the SmartCursor plugin - click on it to install
* Takes a few seconds to download and it should show success at the bottom of ST
* Add the keybindings to your user keybinding file by:
** Menu: Preferences / Key Bindings - User
** Paste this file into your Key Bindings: https://raw.github.com/bizoo/SmartCurso ... ime-keymap
** (Note this file is also located in [sublime program folder]/Data/Packages/SmartCursor if it's easier to get from there)
** Save and close
* Restart Sublime (not sure if this is required)

If anyone sees errors in those install instructions, please repost with corrections. I hope this helps another beginner with Sublime Text and SmartCursor! Thanks for developing this!

Keywords to help others find this thread: TextPad, Sublime Text, cursor position, new line, arrow keys, cursor behavior, change
science
 
Posts: 1
Joined: Sun Sep 01, 2013 4:39 pm

Re: "Smart" horizontal cursor positioning

Postby aliteralmind on Fri Oct 03, 2014 3:01 am

Was just made aware of the SmartCursor plugin, which I haven't yet had the chance to try.

I added the following to the existing (three year old!) request on user echo, to mimic TextPad's behavior. It comes from my blog.

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:

Image

Type "Hello":

Image

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

Image

TextPad takes you here:

Image

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

Image

But when you press down, Sublime goes here

Image

And TextPad goes here

Image

In both situations, in TextPad, clicking the right or left arrow resets the position.
aliteralmind
 
Posts: 10
Joined: Fri Sep 26, 2014 4:40 pm

Re: "Smart" horizontal cursor positioning

Postby aliteralmind on Fri Oct 03, 2014 3:06 am

SmartCursor is not available via ST3 Package Control. :(

Just manually installed it, via the "download zip" button on the github page. Had to unzip it, then re-zip the contents--not the folder--as SmartCursor.sublime-package.

At first glance, it WORKS with situation one in my above description, when the cursor is in the middle of the line.

It doesn't work in situation two, when the cursor is clicked outside of the right margin. Any plans for this?

But that's a huge improvement!! :)
aliteralmind
 
Posts: 10
Joined: Fri Sep 26, 2014 4:40 pm

Re: "Smart" horizontal cursor positioning

Postby bizoo on Fri Oct 03, 2014 8:07 am

aliteralmind wrote:SmartCursor is not available via ST3 Package Control. :(

Just manually installed it, via the "download zip" button on the github page. Had to unzip it, then re-zip the contents--not the folder--as SmartCursor.sublime-package.

There's a post in this topic on how to install it using Package Manager (http://www.sublimetext.com/forum/posting.php?mode=reply&f=4&t=2529#pr53225)

aliteralmind wrote:It doesn't work in situation two, when the cursor is clicked outside of the right margin. Any plans for this?

If I understand your explication, it's more or less the behavior of the END key:
That put the cursor at the end of the current line and tell ST to always go to the end of line when moving up/down.
There's also a post from jps on the subject (http://www.sublimetext.com/forum/viewtopic.php?f=4&t=2529&p=38295&hilit=xpos#p38288)

But I've no plan to do something like that, don't think it's useful for me and it is probably very difficult to implement with the current mouse API.
bizoo
 
Posts: 889
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: "Smart" horizontal cursor positioning

Postby aliteralmind on Mon Oct 06, 2014 5:26 pm

Appreciate the response. Even in its current state, it's much much better than without it. So thanks.
aliteralmind
 
Posts: 10
Joined: Fri Sep 26, 2014 4:40 pm

Previous

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests