Showing posts with label sublime3. Show all posts
Showing posts with label sublime3. Show all posts

Sublime Text: Multiple cursors or Multi-selection

Multiple cursors or Multi-selection in sublime text is easy

  • Press Alt/Command and then click in each region where you require a cursor. 
  • Select a block of lines : Shift + Command + L. 
  • Place the cursor over a particular word, and press Control/Command + D repeatedly to select additional occurrences of that word. 
  • Add an additional cursor at all occurrences of a word : Alt+F3 on Windows or Ctrl+Command+G on Mac.

Eclipse keyboard shortcuts and Sublime Text 3 keybord shortcuts

Switching from Eclipse to Sublime Text 3?,  need some quick shortcuts to

1. Switching/Moving Lines up and down
Eclipse shortcut:  ⌘-UP to move lines up,  ⌘-DOWN to move lines down,
Sublime Text 3: CTRL-⌘-UP to move lines up, CTRL-⌘-DOWN to move lines down.

2. Deleting Entire Line your cursor is on 
Eclipse shortcut:⌘-D
Sublime Text 3: CTRL-SHIFT-K

3. Goto Line in File 
Eclipse shortcut: ⌘-L
Sublime Text 3: ⌘-P, then type a colon followed by the line number (e.g. :12 for line 12). To go to a line in another file, type the file name and then a colon and the line number.

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...