NOTE: If notepad ++ is a good code artifact, sublime text should be called an artifact. The biggest advantage of sublime text is that it can be used perfectly across platforms, both Mac and Windows. The second is powerful plug-in support, which is almost omnipotent.
Start using sublime text:
Sublime text has the dev version, which is recommended for use. We generally recommend you download the portable version, which is convenient and does not need to be installed. The plug-in and the subject are in the same directory, portable.
Related reading:
- Frontend development tools recommended for large frontend
- We recommend the lightweight development software notepad ++ and its two powerful auxiliary plug-ins.
Sublime text shortcut:
- CTRL + Shift + P: Open the Command Panel
- CTRL + P: Search for files in the project
- CTRL + G: the row to jump
- CTRL + W: Close the currently opened file
- Ctrl + Shift + W: Close all open files
- Ctrl + Shift + V: paste and format
- Ctrl + D: select a word. If you repeat a word, you can add and select the next same word.
- Ctrl + L: select a row. You can add and select the next row in sequence.
- Ctrl + Shift + L: Select multiple rows
- Ctrl + Shift + Enter: Insert a new row before the current row
- Ctrl + X: Delete the current row
- Ctrl + M: Jump to the corresponding brackets
- Ctrl + U: Soft undo, undo cursor position
- Ctrl + J: Select TAG content
- Ctrl + F: Search for content
- Ctrl + Shift + F: Find and replace
- Ctrl + H: replace
- Ctrl + R: Go to method
- Ctrl + N: New window
- Ctrl + K + B: Switch sidebar
- Ctrl + Shift + M: select the content of the current bracket.
- Ctrl + F2: Set/delete tags
- Ctrl +/: comment out the current row
- Ctrl + Shift +/: insert comments at the current position
- Ctrl + Alt +/: block annotation, Focus on the first line, and write the annotation description
- Ctrl + Shift + A: before and after the current label is selected
- F11: Full Screen
- Shift + F11: In Full Screen mode, only the current file is edited.
- Alt + F3: select all the same words
- Alt +.: Closed tag
- Alt + Shift + number: split screen display
- Alt + number: Switch to open the nth File
- Shift + right-click and drag: the cursor is mostly not used to change or insert column content
- You can switch the Tab file with the forward and backward keys of the mouse.
- Press Ctrl and click or select one by one. You can edit multiple locations.
- Press Ctrl + Shift + up/down to replace rows
Sublime text settings:
- Setting User
The following are{"font_face": "courier new","font_size": 9.0,"highlight_line": true,"scroll_past_end": false,"tab_size": 4,"theme": "Soda Dark.sublime-theme","word_wrap": true}
Sublime text Plugin:
We recommend that you enable package control first, which is very convenient when installing the plug-in. Enable this function: Choose menu bar-View-show console, paste the following code, press enter, and restart sublime. If your network cannot be enabled, you cannot use it. Search and download it manually (your network is also blocked ?).
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
Start to install some useful plug-ins, CTRL + Shift + P (menu-tools-command paletter), enter install, select install package, and press Enter, enter or select the plug-in you need and press enter to install the plug-in (note the small text changes in the lower left corner and prompt the installation is successful). This is also the method for installing other plug-ins, which is very fast.
- ZenCoding
I have to use a front-end development plug-in, Write less, show more. can be directly used after installation, triggered by the Tab key, Alt + Shift + W is a code machine.
- Alignment
Code alignment, such as writing several variables, selecting these lines, Ctrl + Alt + A, wow, all.
- Prefixr
You can add private suffixes such as-webkit automatically when writing CSS, and press Ctrl + Alt + X to trigger them.
- Tag
Html Format, right-click Auto-Format Tags on Ducument.
- Clipboard History
Clipboard history, show more historical copies, Ctrl + Shift + V triggered.
- SideBarEnhancements
The function of right-click the sidebar is enhanced, which is very practical.
- Theme-Soda
The perfect encoding topic, once used, said "theme": "Soda Dark. sublime-theme" added to the Setting user"
- GBK to UTF8
Convert the File encoding from GBK to UTF8, and find the File in the menu-File.
- SFTP
Directly edit the files on the FTP or SFTP server.
- WordPress
Integrating some WordPress functions is especially useful for people like me who often need to write WP templates and plug-ins.
- PHPTidy
Organize PHP code
- YUI Compressor
Compressing JS and CSS files
Reprinted, please note: big front-end» sublime text usage introduction, full set of shortcuts and plug-in recommendations