exebook
exebook

Reputation: 33900

SublimeText: How to bind 'Home' key to move cursor to a position 0 in the line (not to the first non-space char)?

Sublime will move cursor to the first non space character on the line:

Original cursor position:

function test() {
    var a = 42|
}

After press Home:

function test() {
    |var a = 42
}

Desired cursor position after the Home key pressed:

function test() {
|    var a = 42
}

In notepad++ I fixed this easily by remapping from HOME to DISPLAY_HOME (I might not remember the exact literal name)

Please help (if that is possible at all)

Upvotes: 1

Views: 236

Answers (3)

exebook
exebook

Reputation: 33900

hardbol does the trick:

  • Preferences-> Key Bindings - User

    { "keys": ["home"], "command": "move_to", "args": {"to": "hardbol"} }
    

Upvotes: 2

archydragon
archydragon

Reputation: 139

Just press "Home" button twice.

Upvotes: 1

Ashish Kumar
Ashish Kumar

Reputation: 3039

Try this:

{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} }

I found it in a forum. http://www.sublimetext.com/forum/viewtopic.php?f=3&t=5830

Upvotes: 0

Related Questions