Home >Development Tools >sublime >How to edit your first text document with Sublime Text
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 -
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
Step 3 - Now you can insert print statements at the two locations of the above cursor point, As shown below.
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.
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.
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.
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!