sublimetext2 - Hotkey to end the line with a semicolon and jump to a new line in Sublime Text 2 -


i'm trying figure out hotkey @ work. got job , using mac more or less first time in life.

back home on laptop, when using eclipse, seem remember there being single hotkey both:

  • add ; end of current line (no matter caret within said line)
  • place cursor @ beginning of new line, same indentation level line had added semicolon to

does know if eclipse-specific hotkey, or know of way replicate said hotkey in sublime text 2?

best solution recording macro on sublime text , assigning keyboard shortcut. follow these steps:

  1. create line such alert('hello') , leave cursor right after letter 'o'.
  2. then go tools > record macro start recording.
  3. press command+ go end of line.
  4. press ; , hit enter
  5. stop recording macro going tools > stop recording macro
  6. you can test macro tools > playback macro (optional)
  7. save macro going tools > save macro (ex: endofline.sublime-macro)
  8. create shortcut adding between square brackets in in preferences > key bindings - user file:

    { "keys": ["super+;"], "command": "run_macro_file", "args": {"file": "packages/user/endofline.sublime-macro"} } 
  9. now, every time hit command+;, magically place semicolon @ end of current line , move cursor next line.

happy coding!


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -