Home Download Buy Blog Forum Support

How do I force Enter to the very beginning of the next line?

How do I force Enter to the very beginning of the next line?

Postby galatians on Wed Jan 25, 2012 5:22 am

In Bluefish I can hit Ctrl-Enter and it will ignore auto-indent and put me at the beginning of the next line. I can't figure out an equivalent in Sublime.

Also, in the following code in Bluefish I can double click the 300px text and it will just select the '300' so I can type to replace the numbers but in Sublime double clicking '300px' selects the whole thing including 'px'. Is there any way to configure Sublime to behave the same as Bluefish in this respect?

Code: Select all
#div_id {
  width: 300px;
}


Thanks.
galatians
 
Posts: 5
Joined: Wed Jan 25, 2012 5:15 am

Re: How do I force Enter to the very beginning of the next line?

Postby atomi on Wed Jan 25, 2012 5:58 am

Make a macro call it whatever.sublime-macro in your User folder
Code: Select all
[
    {"command": "move_to", "args": {"to": "hardeol"}},
    {"command": "insert", "args": {"characters": "\n"}},
    {"command": "move_to", "args": {"to": "hardbol"}}
]


edit your user keymap and add
Code: Select all
{ "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "Packages/User/whatever.sublime-macro"} },


I don't know about the double click selection. If you find out please post back here. Thanks.
atomi
 
Posts: 342
Joined: Thu Jan 20, 2011 5:06 pm
Location: Los Angeles CA US

Re: How do I force Enter to the very beginning of the next line?

Postby galatians on Wed Jan 25, 2012 7:05 am

That macro worked perfectly thanks!

I'll let you know if I figure out the select thing.
galatians
 
Posts: 5
Joined: Wed Jan 25, 2012 5:15 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 16 guests