Hello. I’m not sure how to call this feature but I really got used to it and would like to to know if its possible to get same behavior in Sublime Text 2. I’ll try to explain with images:
Can I make Sublime Text 2 behave like this? Thanks.
Hello. I’m not sure how to call this feature but I really got used to it and would like to to know if its possible to get same behavior in Sublime Text 2. I’ll try to explain with images:
Can I make Sublime Text 2 behave like this? Thanks.
Current behavior doing what? If you press up arrow at the end of the short line, the cursor will move like in your expected image. So I guess you mean something else.
Sublime does behave like this already but only if you’ve placed the cursor at the end of line without using the END key. If you place the cursor with the mouse or the cursor keys, you’ll see the behaviour you want; if you hit END on the short line then hit Up, you’ll get the current behaviour which is to stick to the end of the (longer) line when you hit Up.
But you can get what you want by hitting END+CursorLeft+CursorRight before you hit Up. You can make this the default behaviour for the END key with the following…
{"args": {"extend": false, "to": "eol"}, "command": "move_to"},
{"args": {"by": "characters", "forward": false }, "command": "move"},
{"args": {"by": "characters", "forward": true }, "command": "move"}
]
Save it in your Packages/User folder and call it “newend.sublime-macro”
{ "keys": "end"], "command": "run_macro_file", "args": {"file": "Packages/User/newend.sublime-macro"} }
You’ll need to add a comma to the end of the above line unless it’s the last or only keybinding line in the file. The line should be in-between the starting and ending ].
S
[quote=“qgates”]Sublime does behave like this already but only if you’ve placed the cursor at the end of line without using the END key. If you place the cursor with the mouse or the cursor keys, you’ll see the behaviour you want; if you hit END on the short line then hit Up, you’ll get the current behaviour which is to stick to the end of the (longer) line when you hit Up.
But you can get what you want by hitting END+CursorLeft+CursorRight before you hit Up. You can make this the default behaviour for the END key with the following…
{"args": {"extend": false, "to": "eol"}, "command": "move_to"},
{"args": {"by": "characters", "forward": false }, "command": "move"},
{"args": {"by": "characters", "forward": true }, "command": "move"}
]
Save it in your Packages/User folder and call it “newend.sublime-macro”
{ "keys": "end"], "command": "run_macro_file", "args": {"file": "Packages/User/newend.sublime-macro"} }
You’ll need to add a comma to the end of the above line unless it’s the last or only keybinding line in the file. The line should be in-between the starting and ending ].
S[/quote]
WOW! It worked, thanks a lot, you saved my day!