Ease your dev life with Sublime Text 2
-
Upload
nickolay-ninarski -
Category
Technology
-
view
4.056 -
download
1
description
Transcript of Ease your dev life with Sublime Text 2
![Page 1: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/1.jpg)
Ease Your Dev Life
With 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)
![Page 2: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/2.jpg)
Sublime Text 2
The cool kids’ text editor
![Page 3: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/3.jpg)
Agenda
1. Tuning Sublime to make our life better
1. How to find settings on your own
2. Go To Anything
1. Go To Anything in settings
3. Installing The Package Control
4. Shortcuts, Shortcuts, Shortcuts
![Page 4: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/4.jpg)
Tuning Sublime to make our life better
User’s settings can be edited from:
Preferences > Settings – User
![Page 5: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/5.jpg)
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 }
![Page 6: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/6.jpg)
Tuning Sublime to make our life better
Default settings can be edited from:
Preferences > Settings – Default
![Page 7: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/7.jpg)
Tuning Sublime to make our life better
Default settings can be edited from:
Preferences > Settings – Default
Looky but no touchy!
![Page 8: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/8.jpg)
Go To Anything
Ctrl+P
![Page 9: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/9.jpg)
Go To Anything
:123 //to go to row 123 of the current document
@myFunc //to go to the definition of function myFunc
function.php //to go to the file function.php of the opened project/folder
themeshtrastyle.css:190 //to go to row 190 of style.css in the folder themes/shtrak/
![Page 10: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/10.jpg)
Go To Anything for Settings
Ctrl+Shift+P
![Page 11: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/11.jpg)
Go To Anything for Settings
Simply type and browse the setting menus of sublime
![Page 12: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/12.jpg)
Installing Package Control
Do it from here: http://wbond.net/sublime_packages/package_control/installation
![Page 13: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/13.jpg)
Installing Package Control
The 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.
![Page 14: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/14.jpg)
Finding treasures via the Package Control
Ctrl+Shift+P
![Page 15: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/15.jpg)
Shortcuts
Don’t touch the mouse!
![Page 16: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/16.jpg)
Shortcuts (Code)
Ctrl+X – Cut current line
Ctrl+C – Copy current line
Ctrl+Shift+V – Paste and keep indention
Ctrl+Shift+Up/Down – Move current line up/down
Tab (or Ctrl+]) – Indent
Shift+Tab (or Ctrl+[) – Deindent
Ctrl+/ – Toggle comment
Ctrl+Shift+/ – Toggle block comment
![Page 17: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/17.jpg)
Shortcuts (Multiple Cursors)
Ctrl+L – Select current line (repeat for next line)
Ctrl+Click – Add a cursor to that position
Ctrl+Shift+L – Place cursors to the end of each row
Ctrl+D – Select the current word and every next occurancy of the selected thing
![Page 18: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/18.jpg)
Shortcuts (Searching)
Ctrl+F – Open Search
Ctrl+I – Open Instant Search
Ctrl+Shift+F – Search in all the files in the project
Ctrl+H – Search and replace
![Page 19: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/19.jpg)
Shortcuts (Tabs)
Ctrl+W – Close current file
Ctrl+N – Open new file
Ctrl+Shift+T – Open the last opened tab
Alt+[1..9] – Switch to the number of the tab
Ctrl+PageUp/PageDown – Switch between tabs
Ctrl+Tab – Switch between last viewed tabs
![Page 20: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/20.jpg)
Shortcuts (Layouts)
Alt+Shift+1[2,3,4,5] – Changes the layout of the editor
Ctrl+[1,2,3,4] – Jump to group in the changed layout
Ctrl+Shift+[1,2,3,4] – Move the current file to the group
![Page 21: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/21.jpg)
Shortcuts (Bookmarks)
Ctrl+F2– Toggle bookmark
F2 – Go to next bookmark
Shift+F2 – Go to previous bookmark
Ctrl+Shift+F2 – Clear all bookmarks
![Page 22: Ease your dev life with Sublime Text 2](https://reader034.fdocuments.net/reader034/viewer/2022051413/554f6bedb4c905bb178b4e65/html5/thumbnails/22.jpg)
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)