Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use sublime text3

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to use sublime text3, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

D = "introduction" > introduction

Sublime Text: an editor software with code highlighting, syntax hints, automatic completion and quick response, not only has a gorgeous interface, but also supports plug-in extension mechanism, elegant use of Sublime Text, plug-ins are indispensable, using her to write code is definitely a pleasure.

Installation activation

Download from the official website: sublime text3

Open the .exe file to install, remember to select "Add to explorer context menu" and add it to the right-click shortcut menu. Other default next step

Find the latest Sublime Text3 activation code online, as follows:

-- BEGIN LICENSE--

Michael Barnes

Single User License

EA7E-821385

8A353C41 872A0D5C DF9B2950 AFF6F667

C458EA6D 8EA3C286 98D1D650 131A97AB

AA919AEC EF20E143 B361B1E7 4C8B7F04

B085E65E 2F5F5360 8489D422 FB8FC1AA

93F6323C FD7F7544 3F39C318 D95E6480

FCCC7561 8A4A1741 68FA4223 ADCEDE07

200C25BE DBBC4855 C4CFB774 C5EC138C

0FEC1CEF D9DCECEC D3A5DAD1 01316C36

-- END LICENSE--

Open the Sublime menu > help > enter License, and enter the activation code.

Reopen sublime text3, and if enter License becomes remove License, activation succeeds

Common settin

Set the default encoding format to UTF-8

Select menu Preferences- > (Settings)-User

Add the following line to the curly braces: "default_encoding": "UTF-8"

Sublime text 3 set Font

Select menu Preferences- > (Settings)-User

Add "font_face": "Consolas", "font_size": 12

My Preferences- > (Settings)-User setting item

{"auto_complete": true, "auto_match_enabled": true, "color_scheme": "Packages/Color Scheme-Default/Monokai.tmTheme", "default_encoding": "UTF-8", "font_face": "Consolas", "font_size": 14, "ignored_packages": ["AndyJS2", "Vintage"], "theme": "Adaptive.sublime-theme" "update_check": false} shortcut key

Swap up and down: Ctrl+sh~ift+ ↑↓

Cursor selection: Ctrl+alt+ ↑↓

Copy the whole line to the next line: ctrl+shift+d

Indent to the right: Tab

Indent to the left: Shift+Tab

Delete the whole line: Ctrl+Shift+K

Comment sheet line: Ctrl+/

Comment multiple lines: Ctrl+Shift+/

Undo: Ctrl+Z

Restore undo: Ctrl+Y

Find keyword: Ctrl+F

Open the search box: Ctrl+P

Enter the file name in the current project to quickly search for files

Enter @ and keyword to find the function name in the file

Enter: and number, jump to the line of code in the file

Enter # and keywords to find the variable name

Open the command box: Ctrl+Shift+P

Exit: Esc

Common plug-ins ◇ install plug-ins

CTRL+SHIFT+P opens the command box and searches for Package Control install installation

(the Package Control plug-in itself is a plug-in to facilitate the management of plug-ins)

Open the install package terminal

(directly call the command box or open Package Control, enter install package, click to enter)

Enter the name of the plug-in you want and click install

(reopen sublime and you can see the installed plug-ins in Package Setting.)

◇ update plug-in

Ctrl+Shift+P brings up the command panel, enter upgrade packages, and click Update

◇ delete plug-in

Ctrl+Shift+P calls up the command panel, enter remove, and bring up the Remove Package terminal and click on the plug-in to be deleted.

◇ Emmet

Function: coding shortcut key, front-end must

Summary: Emmet (relying on the pyv8 plug-in) as an upgraded version of zen coding, for the front end, but a necessary plug-in, if you are not familiar with it, you can see the specific demonstration video on its website (http://docs.emmet.io/).

Using: tutorial-http://docs.emmet.io/cheat-sheet/

◇ AutoFileName

Function: quick input file name

Introduction: automatically complete the input of file name, such as picture selection

Use: enter "/" to see other files relative to this project folder

◇ IMESupport

Function: sublime Chinese input method

Introduction: still struggling with the Sublime Text Chinese input method can not follow the cursor? Try the plugin "IMESupport"! Currently, it only supports Windows, and can't follow the cursor well in the search interface.

Use: Ctrl + Shift + P → enter pci → enter IMESupport → enter enter

◇ JsFormat

Introduction: this is a plug-in that formats JS, which can format compressed files. After installing the JsFormat plug-in using Package Control, you can format JS in the JS file through the right mouse button-> JsFormat or keyboard shortcut Ctrl+Alt+F.

◇ SideBarEnhancements

Introduction: SideBarEnhancements is a very useful right-click menu enhancement plug-in. Before installing the plug-in, right-click in the FOLDERS bar on the left side of Sublime Text and there are only a few simple functions.

◇ TrailingSpaces

Introduction: sometimes, typing a few more spaces or Tab at the end of the code does not have any display effect. The plug-in TrailingSpaces can highlight extra spaces and Tab.

◇ CssComb

Introduction: CssComb is a plug-in for sorting and formatting CSS attributes. After installing the CssComb plug-in using Package Control, you may find that it does not run. It depends on Node.js. If your computer has installed the NodeJS environment, you can skip this step. If your computer has not installed the Node.js environment, you should go to the Node.js official website to [download] and install the corresponding version of Node.js.

How to use: menu Tools- > Run CSScomb or press the shortcut key Ctrl+Shift+C in the CSS file (the shortcut key conflicts with the ColorPicker plug-in to change it to Ctrl+Shift+alt+C)

◇ ConvertToUTF8

Introduction: sublime text itself does not support Chinese coding, so it needs to be solved by installing plug-ins, and ConvertToUTF8 plug-ins can be implemented.

How to use: press the shortcut key Ctrl+Shift+C (the shortcut key conflicts with the ColorPicker plug-in to change it to Ctrl+Shift+alt+z)

* * Shortcut key modification: * * preferences → browse packages Click Open to find the corresponding plug-in shortcut key

◇ Autoprefixer

Introduction: this is a CSS3 private prefix automatic completion plug-in, this plug-in uses CanIUse database, can accurately determine which attributes need what prefix, like the CssComb plug-in, this plug-in also requires the system has installed Node.js environment

Use: press Tab after entering the CSS3 attribute (before the colon), as shown below

◇ ColorPicker

Introduction: when editing the CSS style, ColorPicker can make sublime text have a built-in color palette, adjust the color, and click OK to generate a hexadecimal color code at the cursor.

Use: Ctrl/Cmd + Shift + C to call out

◇ ColorHighlighter

Summary: ColorHighlighter is a plug-in that displays the visual color of the selected color code. If you choose "# fff", it will show you white

◇ Terminal

Open the terminal of the file. The terminal defaults to CMD (linux is supported). Ctrl+shift+t opens the folder where the files are located, and ctrl+shift+alt+t opens the root folder of the project where the files are located, and you can reconfigure the shortcuts yourself. You can also right-click open terminal here to open it.

◇ File Header

Introduction: File Header is a plug-in that automatically adds prefix fields to files.

Configuration: preferences → browse packages Click Open to find the appropriate plug-in, open template to modify the template

◇ Code prompt plug-in Summary

SublimeCodeIntel

Function: SublimeCodeIntel realizes code intelligent prompt and automatic completion function.

Disadvantages: less hints, do not want to use

Supported languages: JavaScript, Mason, XBL, XUL, RHTML, SCSS, Python, HTML, Ruby, Python3, XML, Sass, XSLT, Django, HTML5, Perl, CSS, Twig, Less, Smarty, Node.js, Tcl, TemplateToolkit, PHP

Bettercompletion

Function: better completion realizes code intelligent prompt and automatic completion function.

Advantages: can be customized, recommended

Supported languages: javascript, jQuery, Bootstrap,php,react,css, etc.

Configuration: change the false of the corresponding file to true

JavaScriptCompletions

Function: JavaScriptCompletions realizes code intelligent prompt and automatic completion function.

Features: prompt full, high version of sublime support good

Supported language: javascript

The above is all the contents of this article "how to use sublime text3". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report