Home >Development Tools >sublime >How to edit your first text document with Sublime Text

How to edit your first text document with Sublime Text

藏色散人
藏色散人Original
2018-11-08 10:27:024052browse

This article mainly introduces how to use Sublime Text to edit your first text document!

SublimeText download address:

SublimeText3 Chinese version: http://www.php.cn/xiazai/gongju/93

SublimeText3 Mac version: http://www.php.cn/xiazai/gongju/500

SublimeText3 Linux new version: http://www.php.cn /xiazai/gongju/1471

SublimeText3 English version: http://www.php.cn/xiazai/gongju/1473

The code editor allows users to edit code scripts and text documents using various shortcut keys. In this chapter, let us understand through various examples about the first text document editing options in Sublime Text.

Write simultaneously

In this example, you will learn how to add print statements in two places.

Step 1 - Consider the first script in Python which contains the following code -

How to edit your first text document with Sublime Text

Step 2 - Let us assume that, In the given script, you want to mention the start and end points of the loop using simple statements. You can write print statements wherever you need, however, in the Sublime Text editor, you can add comments and statements in two places at the same time. The shortcut key is Ctrl cursor point on Windows and Linux, and Cmd cursor point on Mac. Then you can see the cursor point as mentioned below

How to edit your first text document with Sublime Text

Step 3 - Now you can insert print statements at the two locations of the above cursor point, As shown below.

How to edit your first text document with Sublime Text

Events Found

The Sublime Text editor includes a feature to find occurrences of keywords contained in a script. After highlighting the associated keyword, the shortcut key for finding occurrences of the keyword is Ctrl D.

How to edit your first text document with Sublime Text

If you want to search for a keyword, e.g. from the given Code printing, you can use Ctrl D or Cmd D to get the number of occurrences of associated keywords.

nHow to edit your first text document with Sublime Text

Add comments in comments

After selecting the part of the code that actually needs to be commented, we can use the shortcut key Ctrl Shift L Cmd Shift L for Windows and Cmd Shift L for Mac operating systems add comments at the end of the line.

How to edit your first text document with Sublime Text

This article is about the method and steps of editing the first text document with Sublime Text. I hope it will be helpful to friends in need!

The above is the detailed content of How to edit your first text document with Sublime Text. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more