I recently discovered the ToDo setting in Pycharm's preferences and the ability to create custom filters for your todos. It's amazing.
Personally, I've been creating user specific todos for a long time. As I'm coding I'll throw in a line of python to tell me to do something later
The problem with just adding your name to the todo is now you have to sift through all the todos in your code looking for your name. That's not too big of an issue if you generally have small projects, but if you use any open-source packages or javascript files I guarantee you'll be sifting through other peoples' todos.
So here's the solve:
Create Custom ToDo Filters
- Open ToDo Settings. (Preferences > IDE Settings > TODO)
- Add a new pattern
- Click the "+" in the pattern pane.
- Type in your pattern. **NOTE: Be very careful of what patterns you use. If you make your pattern to generic your machine will be indexing for hours.
- Set up your color scheme if you want.
- Click "OK"
- Add a new filter using your pattern
- Click the "+" in the filter pane.
- Give your filter a name.
- Check the box next to the pattern you just created previously.
- Click "OK"
- When you click the "OK" button in the ToDo preferences dialog PyCharm will automatically start indexing all of your todos.
It's as simple as that. Now, in your ToDo tool window, you can use your filters to show just the todos that you want. I've used filters to separate todos for users (such as myself) and even projects.
No comments:
Post a Comment
Thanks for leaving a comment.