Dynamic diagram showing 16 sublime text shortcut usage---------------materialized sublime

Source: Internet
Author: User

After I did a demo containing some live coding, some viewers asked me how I operated so quickly. Of course there is no single answer, the answer is a bunch of simple shortcuts and a lot of practice combinations. In response to those queries, I felt it necessary to look at the shortcut keys I didn't want to think about and use every day.

Here's a featured list of 16 shortcuts (a custom shortcut), animated in GIF, which I use every day. Enjoy it!

(Translator Note: The original list of shortcut keys are OS X environment, in order to facilitate the Windows and Linux environment Child shoes Learning, the translator will note Windows and Linux corresponding shortcut keys)

Choose
    • Select the next occurrence of a selected item
    • Select all occurrences of a selected item
    • Select the start and end tags associated with the cursor
    • Select contents in container (new)
    • Select the contents in parentheses
Moving lines and text
    • Move Up or down
    • Copy rows or selected items
    • Increase and Decrease Indent
Cut and delete, copy and paste
    • Cut Rows or selected items
    • Paste and keep indent
    • Wrap rows or select items with labels
    • To remove an unclosed container element
Text and number manipulation
    • Calculating mathematical expressions
    • Increment and decrement
    • Uppercase and lowercase
Annotation and alignment variables
    • Note Checked items/rows
    • Aligntab Customizing shortcut keys

Select the next occurrence of a selected item:? + D

(Translator note: ctrl+d)

Put the cursor on a word, press? + D, the word will be selected. Keep holding down? and press D multiple times, the next occurrence of the currently selected item is selected. By holding down and pressing D three times, the three identical text will be selected.

Select all occurrences of a selected item: CTRL +? + G

(Translator note: ALT+F3)

Same as above, but it selects all occurrences in the file. Be careful with this, because it selects all occurrences of a file. .

Select the start and end tags associated with the cursor:? +?+ K

(Translator Note: ctrl+shift+ ')

This is a magic weapon. Perhaps you want all the properties to remain the same, but just want to select the label. This shortcut key for you to do this will notice that you can manipulate multiple tabs at once. * Requires Emmet plugin

Select contents in container: CTRL + D

(Translator note: ctrl+shift+a)

If you place the cursor between the text and press the key above, the text will be selected, like? + D. But press it again, select the parent container, and then press to select the parent container. * Requires Emmet plugin

Select the content in parentheses:? + ? + Space

(Translator note: ctrl+shift+m)

This helps to select everything between parentheses. The same applies to CSS.

Move up or down: CTRL +? +↑ or ↓

(Translator Note: ctrl+shift+↑ or ↓)

Copy rows or selected items:? + ? + D

(Translator Note: ctrl+shift+d) If you have selected the text, it will copy your selected items. Otherwise, placing the cursor on the line will copy the entire row.

Increase and Decrease Indent:? + [or]

(Translator Note: ctrl+[or])

Cut rows or selected items:? + X

(Translator note: ctrl+x)

Cut one line to your clipboard and you can paste it somewhere else. 9

Paste and keep indent:? + ? + V

(Translator Note: ctrl+shift+v) This is another shortcut that I use every time. In GIF I show the contrast between the two effects of normal paste (? + V) and indent paste. Notice how the indentation is arranged.

Wrap lines with labels or select items: CTRL +? + W

(Translator note: alt+shift+w)

Wrapping a line with a label; Start typing the tags you want to use and you're successful.

To remove an unclosed container element:? +

(Translator note: ctrl+shift+;) This removes the parent tag associated with your cursor. It is helpful to clear the tag. 12

Calculate mathematical expression:? + ? + Y

(Translator Note: ctrl+shift+y) I never thought I would use this a lot, but it really works.

Increment and decrement:? + option +↑or↓, option +↑or↓

(Translator Note: alt+shift+↑ or ↓,ctrl+↑ or ↓)

Hold? The number will be changed in step 10, without holding 1 as the step. Also note that you do not need to select numbers, Sublime Text is smart enough to update the bank's recent figures.

Uppercase and lowercase:? + K then U,? + K then L

(Translator note: ctrl+k+u,ctrl+k+l)

Note Select item/row:? + /

(Translator note: ctrl+/)

This is available in all languages and is available for both rows and selected items.

Extra delightful thing! Use Aligntab to customize shortcut keys

The shortcut keys above are sublime text default shortcuts, but you can also add your own custom shortcut keys. The following example applies the Aligntab plug-in using three custom key bindings to align content vertically based on = =, and:. Because I work primarily with JavaScript and PHP, these bindings are useful for almost every scene I need, but you can align vertically with any character you want.

In your own editor implement the GIF effect below, just install Aligntab, add custom bindings to your custom key binding file, select some code, and click CTRL +? + . Or or =.

Conclusion

Once you see a change in multiple lines of code, there is usually a way to implement the change using a few keys instead of editing them one by one. By continuously using the combination of the above shortcut keys to perform repetitive or predictable changes, you can greatly increase the speed of your coding.

Here is a short gif that includes selecting all occurrences, copying the linked text, pasting the copied text with a multiline cursor, and converting the text to lowercase.

Http://www.techug.com/16-subline-text-tips

Dynamic diagram showing 16 sublime text shortcut usage---------------materialized sublime

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.