12 Sublime Text application tips and tricks to know

Source: Internet
Author: User

1) Select

Here are some shortcut keys for sublime text selection:

    • Command + DSelect a word

    • Command + LSelect a row

    • Command + ASelect All
      Ctrl + Command + M ' Check all the contents in parentheses (very useful when writing CSS or JS)

Sublime text also supports the operation of selecting multiple rows at once: Furthermore, Sublime Text brings lets us select multiple lines at once, which can significantly b Oost your productivity. There is several ways to perform this feature:

    • CommandPress Command and hold the key and click the line you want to select

    • Command + Ctrl + G(When partial text is selected) Press this key to select all the same text

    • Command + D(When partial text is selected) directly selects the next occurrence of the text

2) CSS Sorting

The order of CSS properties is generally not important because the browser is rendered correctly in any order. But sorting all the properties still helps the code to be neat. In sublime text, you can sort by selecting the CSS properties and pressing F5 them in alphabetical order.

You can also use third-party plug-ins such as Csscomb to control the sorting method in more detail.

3) command Panel (Palette)

Use the command panel to quickly accomplish multiple tasks. Press Command + Shift + P the Bring up panel and type the command you want. Look at a few examples below:

Renaming files

Set file as HTML syntax

Inserting Code Snippets

4) Toggle tab and Project

When you open multiple tabs at the same time, you can switch between them with the following hotkeys:

    • Command + TList all tabs

    • Command + Shift + ]Next tab page

    • Command + Shift + [Prev Tab

    • Command + Ctrl + PToggle Side Bar Display Project

5) Cross-file editing

The same editing operation can be repeated in multiple files at the same time. For example, when you have the same piece of code in multiple files, you can quickly edit it using the following steps:

    1. Press Command + Shift + F the Find box to enter the code you want to find. You can press Command + E the code snippet in the quick use selection.

    2. Wherespecify the range of files you want to look up in the box, or fill in the file to find the files that are <open files> currently open.

    3. ReplaceEnter the code you want to replace in the box, and press the Replace button to bulk replace it.

6) file crawler

Press Command + R to list all CSS selectors in the document. You can select and jump to view immediately. This operation is much faster than using the general "find" function.

7) spell check

If you often use sublime text for English authoring, it is useful to enable spell checking. Select Preferences > Settings – User the menu and add the following code:

"Spell_check": true,
8) Enhanced Sidebar

The Sidebarenhancements plugin effectively improves the sidebar of the sublime text. After installing the plugin, right-click on the sidebar to find new features: Open in Explorer, new file, new folder, ... Open, open in the browser.

Note: The hotkey that is opened in the browser is F12 .

9) Change Theme

Sublime text can be replaced by the appearance theme. Soda theme is a good topic that can be installed in the Package manager.

If the topic you want to install is not in the online repositories, you can also install it manually:

    1. Download and unzip the theme pack

    2. Click menuPreferences > Browse Packages…

    3. Copy the theme folder to the Packages folder.

    4. Click on Preferences > Settings – Users the menu and add the following code:"theme": "Soda Light.sublime-theme"

10) Replace the sublime text program icon

Not only can the theme be changed, but also the icon. There are plenty of redesigned sublime text icons on the dribbble. Replacement method:

    1. Download an icon that has .icns the best format. If not, convert it with IConvert.

    2. Terminal execution:open /Applications/Sublime\ Text.app/Contents/Resources/

    3. Replacement Sublime Text 3.icns or Sublime Text 2.icns file.

11) Sync Options

If you are working on more than one computer, synchronizing option settings should be a good idea. We use Dropbox to complete this task.

First, run the following command in the terminal to upload the settings file:

mkdir $HOME/dropbox/sublime-text-3/mv "$HOME/library/application support/sublime text 3/packages" "$HOME/dropbox/ sublime-text-3/"MV" $HOME/library/application support/sublime text 3/installed Packages "" $HOME/dropbox/ sublime-text-3/"

Then run the following command on all computers that need synchronization to download the settings:

Dstpath= "$HOME/library/application support/sublime Text 3" dropbox_path= "$HOME/dropbox/sublime-text-3" RM-RF "$ dstpath/installed Packages "RM-RF" $DSTPATH/packages "mkdir-p" $DSTPATH "ln-s" $DROPBOX _path/packages "" $DSTPATH/pac Kages "Ln-s" $DROPBOX _path/installed Packages "" $DSTPATH/installed Packages "
12) Clickable URL

Using the widget Clickableurls allows the URL in the file to be clicked.


12 Sublime Text application tips and tricks to know

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.