Tips for using the sublime2 Text Editor

Source: Internet
Author: User
Tips for using the sublime2 Text Editor


------------------------------------ Software use ---------------------------------------
1. Right-click to enable sublime2
Windows Registry Editor Version 5.00

[Hkey_classes_root \ * \ shell \ sublime2]
@ = "Sublime2 (& S )"

[Hkey_classes_root \ * \ shell \ sublime2 \ command]
@ = "\" C :\\ Program Files \ sublime text \ sublimetext.exe \ "-p -- remote-tab-silent \" % 1 \""

Save the following content as a sublime2.reg registry file and double-click it!

2. Support for VIM Mode
Choose Options> Settings> default, and set them to the following:
"Ignored_packages": []

3. Install the vim enhancement plug-in vintageex
Open option-> browse the installation package in sequence, and decompress vintageex under it. You must install it. Otherwise, your sublime only supports the simple mode in vim and does not support the last line mode.

4. Install the svn synchronization Development Environment plug-in tortoise
Choose Options> browse the installation package, and decompress toroise under it:

5. support PHP and python to view all functions on the page. You can quickly locate the function by pressing CTRL + R, or press Ctrl + Shift + P and then enter, you can also view the scaling map of the ID in HTML.

6. Supports C and Python compilation. You only need to press Ctrl + B. Of course, you must add c: \ python27 to the system environment variable.

7. Disable the row number method.
Choose Options> Settings> default, and set them to the following:
"Line_numbers": false,

8. Disable auto-completion of single double quotation marks and parentheses and braces
"Auto_match_enabled": false,

9. The background line method of the current operation line is displayed.
"Highlight_line": True,

10. Modify the default encoding method
"Default_encoding": "UTF-8 ",

11. How to convert the character set of the current file
File> GBK or UTF-8

12. How to close the sidebar
View in sequence-> sidebar

13. Disable the mini Map Method
View in sequence-> hide the mini Map

14. Search for other code files in the current directory
CTRL + Shift + P

15. Font setting
"Font_face ":"",
"Font_size": 18,

16. Display Console Method
View the console or Ctrl + ~ You can use the python command in the console, but it is short.

17. Typographical indentation
Select All, press the tab key to indent right, and then press SHIFT + TAB to indent left.

18. quickly switch the start and end methods of A () or {} code segment
Press SHIFT + 5

19. Multiple mouse operations
Press ctrl and click multiple places at the same time to operate multiple places at a time, which is very convenient

20. Fast comment and uncomment Method
Press Ctrl +/or Ctrl + Shift +/and then press it to cancel

21. sublime command completion plug-in Emmet
It will automatically stop or enable the snippet plug-in. This is an upgraded version of Zen coding. It mainly targets the previous HTML code and can fully use the CSS selector function.
1) installation method:
Press Ctrl + Shift + P, enter install or install, and then enter Emmet to install. It will automatically install Emmet and JS V8 systems for you, now, just re-open the sublime once. It's so handsome.
2) It supports the selector command:
E
Element name (DIV, P );
E # ID
Use the ID element (div # Content, P # intro, span # error );
E. Class
Use the class Element (Div. header, P. Error. critial). You can also use the class and Idid: div # content. Column. width;
E> N
Child element (div> P, div # footer> P> span );
E + n
Sibling element (H1 + P, div # header + Div # content + Div # footer );
E * n
Element doubling (UL # nav> li * 5> );
E $ * n
Entry number (UL # nav> Li. item-$ * 5 );

22. Emmet operation instance
1) instance 1
Emmet command:
Div. VSA> ul # nav> Li. Item $ * 5> A {item $}
Complete the Code:
<Div class = "VSA">
<Ul id = "nav">
<Li class = "Item1"> <a href = ""> Item 1 </a> </LI>
<Li class = "item2"> <a href = ""> Item 2 </a> </LI>
<Li class = "item3"> <a href = ""> Item 3 </a> </LI>
<Li class = "item4"> <a href = ""> Item 4 </a> </LI>
<Li class = "item5"> <a href = ""> Item 5 </a> </LI>
</Ul>
</Div>
2) instance 2
Emmet command:
. Item
Complete the Code:
<Div class = "item"> </item>
3) instance 3
Emmet command:
Ul>. Item * 2
Complete the Code:
<Ul>
<Li> </LI>
<Li> </LI>
</Ul>
4) instance 4
Emmet command:
DL> (DT> P> A [name = DT $] ^ dd {description $}) * 2
Complete the Code:
<DL>
<DT>
<P> <a href = "" name = "dt1"> </a> </P>
</DT>
<DD> description1 </DD>
<DT>
<P> <a href = "" name = "dt2"> </a> </P>
</DT>
<DD> description2 </DD>
</Dl>
5) instance 5
Emmet command:
(Input: checkbox [name = CB1] # cbitem $ + Label [for = cbitem $] {label $}) * 2
Complete the Code:
<Input type = "checkbox" name = "CB1" id = "cbitem01">
<Label for = "cbitem01"> label1 </label>
<Input type = "checkbox" name = "CB1" id = "cbitem02">
<Label for = "cbitem02"> label2 </label>

23. Quickly view the classes and functions on the page
CTRL + R

24. Quickly view keywords on the page
CTRL +;

25. Set the left-side Tree Structure
CTRL + ALT + k
// Option-> default binding:
{"Keys": ["CTRL + ALT + K"], "command": "toggle_side_bar "},

26. View Python classes and functions in sublime:
CTRL + R

27. view the python keywords in sublime:
CTRL +;

28. The sublimerepl plug-in is very useful for learning python, so you can go to the tool> sublimerepl-> Python-> and there are several very useful tools.
1) Python
2) Python run current file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.