Sublime text 2 tips

Source: Internet
Author: User

After using sublime text2 for a short period of time, what I know is only the tip of the iceberg. In order not to let this little thing flow out of the seahorse, I 'd like to forget it here.

Plugin installation:

Install the package control component (many plug-ins can be directly installed using the package contorl component ):

PressCTRL +'Call up console

Paste the followingCodeGo to the command line at the bottom and press Enter:

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 ())

After restarting sublime text 2, ifPerferences-> package ControlThe package control option is displayed, and the installation is successful.

 

Some plug-ins that you are using and feel good about:

    1. Zen coding-a plug-in for efficient HTML and CSS Programming
    2. Sublime prefixr -- prefixr, css3 private prefix auto-completion plug-in
    3. Goto-CSS-declaration -- jump to the class or ID Declaration of the CSS file (provided that the corresponding CSS file must be opened at the same time)

Installation Method:Sublime text 2-> perferences-> packageControl ->Install package->Enter the plug-in name

PS: goto-CSS-declaration is rarely used. Usually, Chrome is used to press F12 to view details.

 

Shortcut Key:

1. project folder browsing (CTRL + K + B)

2. Switch files (CTRL + p)

3. Select the same words one by one (CTRL + double-click the mouse/Ctrl + D)

4. Select all the same words at a time (Alt + F3)

5. select several lines of text (SHIFT + command + l)

6. Select the current block and include indentation (you no longer need to drag the selected block) (CTRL + Shift + J)

7. Customize a tag to enclose the selected area (better after zencoding is installed) (Alt + Shift + W)

8. folder search (CTRL + Shift + F)

9. Comment (CTRL + /)

 

Additional: January 1, April 11, 2013

Select and edit:

CTRL + G-- Jump to the corresponding row

CTRL +Left mouse button-multiple cursors (multiple places can be edited at the same time)

CTRL + d-- Select the same

CTRL + k, CTRL + d-- Cancel the current selection and continue to select the next same

CTRL + L-- Select a row (you can continue to select the row if you press and hold it down)

CTRL + Shift + L-- Split the selection of several rows into each row (the cursor automatically stays at the end of the row)

CTRL + kk-- Delete the content from the pointer to the end of the row

CTRL + m-- In{}Jump between head and end

CTRL +]-- Indent the current row

CTRL + [-- Do not indent the current row

Tab-- Indent (cursor position)

Shift + Tab-- Do not indent (cursor)

CTRL + Ku-- Convert to uppercase letters

CTRL + KL-- Convert to lowercase letters

CTRL + enter-- Insert blank rows after the cursor

CTRL + Shift + enter-- Insert blank rows before the cursor

CTRL + KT-- Collapse attributes

CTRL + K0-- Expand All

CTRL + Shift +Bytes/Swap -- Swap upper and lower rows

CTRL + Shift + [-- Collapse code

CTRL + Shift +]-- Expand code

CTRL + T-- Word Interchange

Alt +.-- Close the current tag

Alt + Shift + <arrow>-- Current cursor to left/Right select selected area

CTRL + Shift + m-- Select{}All content in

CTRL + Shift + Space(Space key) -- expand the Selection Range

CTRL + Shift +-- Select the parent label of the cursor

CTRL +/-- Add comments

CTRL + z-- Undo

CTRL + Y-- Resume Revocation

 

Search and replace:

CTRL + R-- Quick list/Jump to a function

CTRL + F-- Open the single file search panel

Find the next one:Enter

Find the previous one:Shift + enter

Find all:Alt + enter

CTRL + H-- Search and replace

CTRL + ALT + enter-- Replace all

 

Use search when the search panel is hidden:

F3-- Search for the last searched content

Shift + F3-- Select the previous one.

Alt + F3-- Select all

Alt + Shift + 1(Non-keypad) window split, Restore Default1Screen

Alt + Shift + 2Left/right split screen-2Column

Alt + Shift + 3Left/right split screen-3Column

Alt + Shift + 4Left/right split screen-4Column

Alt + Shift + 5Equal score4Screen

Alt + Shift + 8Vertical Split screen-2Screen

Alt + Shift + 9Vertical Split screen-3Screen

 

Search and replace multiple files:

CTRL + Shift + F-- Open the multi-file search and replacement panel

Start searching:Enter

 

View search results:

Next matching file:F4

The previous matching file:Shift + F4

 

CTRL + P-- Go to a page

CTRL +;-- Go to the page to jump

CTRL + KB-- Open or close the sidebar

F11-- Full screen

ESC-- Exit all panels

Related Article

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.