In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article focuses on "how to create notes for Pycharm extensions". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to create notes for Pycharm extensions"!
1. Theme
You often need to create a task list in the course of a development project, and for small tasks, inserting notes and comments in your code can be amazing.
The format of this comment is as follows:
2. Create notes and comments
Very simple:
First, position the cursor to the appropriate line.
Then, create a line of comments (Ctrl+Slash).
Finally, after #, type TODO or todo, and then enter a comment
3. Browse the notes
Browse in the TODO tool window window (Alt+6 or View → Tool Windows → TODO):
For more information about windows, see Using Tool Windows.
4. Navigation between note entries
One way is to switch by clicking the note mark in the right slot of the window.
Another way is to switch in the TODO tool window window. Use the shortcut menu command Jump to Source in the window, or select a note and press F4.
5. Private customization of note mode
Pycharm comes with two post-it modes, starting with "todo" or "TODO". As long as the comment meets the above format, it will be displayed in the TODO tool window window.
Here we show how to create notes in other formats.
Click the settings button on the main toolbar, and under the IDE Settings node, click TODO to open the TODO page page:
Suppose we want to create a note for code browsing on a specific line, including the "review" keyword, and then create this note pattern.
Click the green plus sign in the Patterns section and enter the following regular expression:
Change both the icon and the color scheme:
After the setting is completed, Pycharm will automatically detect all comments in the current project. If you find a note that meets the criteria, it will display in the TODO tool window window with a new color scheme:
6. Create a note filter
Suppose we only want to see the note information related to code browsing and hide the other notes, here we need to use the note filter.
Click the icon for TODO tool window and select Edit Filters:
Of course, you can also do this through the TODO page page in the settings dialog box (setting up → IDE Settings → TODO).
Click the green plus sign in the Filters area.
Two modes\ btodo\ b.* and\ breview\ b.* are displayed in the Add Filter dialog box that opens. Here we choose to hide the traditional mode, leaving only the\ breview\ b * mode. Select this mode and enter the filter name:
7. Filter the notes
Return to the TODO tool window window and click:
Select the review command to display the filter results in the tool window window, and double-click the corresponding entry to achieve a quick jump:
8. Create a template for note notes
Creating a template helps you quickly write note information.
Open the settings dialog box, and under the IDE Settings node, click Live Templates: set → IDE Settings → Live Templates:
Click the green plus sign to add the template and enter the relevant information:
Notice that the newly created template is automatically added to the user group.
Notice the red prompt at the bottom and click Define to view optional information about the contents of the template.
Finally, define the template body:
There are two variables, $WHO$ and $TEXT$. The former is the input area, and the latter is automatically filled. Click the Edit variables button:
In the Edit Template Variables dialog box dialog box, select the contents of the variable $WHO$:
Test the template. Create a comment line, type rv, and press TAB:
Enter the text and enter:
At this point, I believe you have a deeper understanding of "how to create Pycharm extension notes". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.