Ease your dev life with Sublime Text 2

5,799 views

Published on

The slides from the workshop in initLab for easing your dev life with the tools you use (Sublime Text 2)

Published in: Technology
0 Comments
14 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,799
On SlideShare
0
From Embeds
0
Number of Embeds
1,326
Actions
Shares
0
Downloads
69
Comments
0
Likes
14
Embeds 0
No embeds

No notes for slide

Ease your dev life with Sublime Text 2

  1. 1. Ease Your Dev LifeWith the tools you use A Sublime Text 2 Story Featuring Ninio (http://shtrak.eu/ninio) Shtrak! (http://shtrak.eu/it) Init Lab (http://initlab.org)
  2. 2. Sublime Text 2The cool kids’ text editor
  3. 3. Agenda1. Tuning Sublime to make our life better 1. How to find settings on your own2. Go To Anything 1. Go To Anything in settings3. Installing The Package Control4. Shortcuts, Shortcuts, Shortcuts
  4. 4. Tuning Sublime to make our life better User’s settings can be edited from: Preferences > Settings – User
  5. 5. Tuning Sublime to make our life better//My most vital settings{ "bold_folder_labels": true, "caret_style": "phase", "highlight_line": true, "highlight_modified_tabs": true, "word_wrap": true}
  6. 6. Tuning Sublime to make our life better Default settings can be edited from: Preferences > Settings – Default
  7. 7. Tuning Sublime to make our life better Default settings can be edited from: Preferences > Settings – Default Looky but no touchy!
  8. 8. Go To Anything Ctrl+P
  9. 9. Go To Anything:123 //to go to row 123 of the current document@myFunc //to go to the definition of functionmyFuncfunction.php //to go to the file function.php ofthe opened project/folderthemeshtrastyle.css:190 //to go to row 190 ofstyle.css in the folder themes/shtrak/
  10. 10. Go To Anything for Settings Ctrl+Shift+P
  11. 11. Go To Anything for SettingsSimply type and browse the setting menus ofsublime
  12. 12. Installing Package ControlDo it from here:http://wbond.net/sublime_packages/package_control/installation
  13. 13. Installing Package ControlThe steps:ctrl+`Paste: import urllib2,os; pf=Package Control.sublime-package; ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler()));open(os.path.join(ipp,pf),wb).write(urllib2.urlopen(http://sublime.wbond.net/+pf.replace( ,%20)).read());print(Please restart Sublime Text to finish installation)Restart Sublime.
  14. 14. Finding treasures via the Package ControlCtrl+Shift+P
  15. 15. ShortcutsDon’t touch the mouse!
  16. 16. Shortcuts (Code)Ctrl+X – Cut current lineCtrl+C – Copy current lineCtrl+Shift+V – Paste and keep indentionCtrl+Shift+Up/Down – Move current line up/downTab (or Ctrl+]) – IndentShift+Tab (or Ctrl+[) – DeindentCtrl+/ – Toggle commentCtrl+Shift+/ – Toggle block comment
  17. 17. Shortcuts (Multiple Cursors)Ctrl+L – Select current line (repeat for next line)Ctrl+Click – Add a cursor to that positionCtrl+Shift+L – Place cursors to the end of eachrowCtrl+D – Select the current word and every nextoccurancy of the selected thing
  18. 18. Shortcuts (Searching)Ctrl+F – Open SearchCtrl+I – Open Instant SearchCtrl+Shift+F – Search in all the files in the projectCtrl+H – Search and replace
  19. 19. Shortcuts (Tabs)Ctrl+W – Close current fileCtrl+N – Open new fileCtrl+Shift+T – Open the last opened tabAlt+[1..9] – Switch to the number of the tabCtrl+PageUp/PageDown – Switch between tabsCtrl+Tab – Switch between last viewed tabs
  20. 20. Shortcuts (Layouts)Alt+Shift+1[2,3,4,5] – Changes the layout of theeditorCtrl+[1,2,3,4] – Jump to group in the changedlayoutCtrl+Shift+[1,2,3,4] – Move the current file tothe group
  21. 21. Shortcuts (Bookmarks)Ctrl+F2– Toggle bookmarkF2 – Go to next bookmarkShift+F2 – Go to previous bookmarkCtrl+Shift+F2 – Clear all bookmarks
  22. 22. Keep practicing! And thank you! This was A Sublime Text 2 Story Featuring Ninio (http://shtrak.eu/ninio) Shtrak! (http://shtrak.eu/it) Init Lab (http://initlab.org)

×