Effortlessly Manage Notes and Lists with Sublime Text

There are a lot of free plugins created by the (awesome!) community to extend the capabilities of Sublime Text beyond just a code editor. In this post, I would like to share a tip that I found really useful.

When building a website, things may not always work as expected. Bugs and errors will pop up, and I make a note to address these issues later. This helps minimize interruptions and keeps me focused on the task at hand.

Like any coder, I don’t want to open another app just to jot down these errors. Fortunately, there’s a plugin that allows us to do this within Sublime Text, called Plain Task.

Plain Task

After installing the plugin, you can create a new file and save it in the .todo format (or .todolist, .tasks, or .taskpaper). This will highlight the new file in yellow, allowing you to start taking notes and managing tasks directly in the file.

Highlighted TODO file in Sublime Text

To add Headings or Titles, simply end the line with a colon, as shown below. The colon marks the line as the title or note heading.

Example of headings and titles in Sublime Text

To add a new todo list item, press Command + Enter on a Mac or Ctrl + Enter on Windows. These key combinations will add a checkbox, common in todo lists. Press the keys again to create a new task.

Checkbox added in a TODO list in Sublime Text

To mark an item as done, press Command + D on a Mac or Ctrl + D on Windows. You can also press Alt + C to mark it as Cancelled.

List item marked as done in Sublime Text

Adding a note is as simple as writing plain text. Just jot down what you need to remember.

Note added in a TODO list in Sublime Text

Adding Todo Icons

Currently, our .todo file is displayed with a plain, unknown-type blank paper icon.

Unknown file type icon for TODO file

We can change this to the icon provided by PlainTask for a more unique identity. First, copy the icon stored in the icons folder of the PlainTasks package into the Sublime Text application using the following command:

cp ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/PlainTasks/icons/TODO.icns /Applications/Sublime\ Text\ 2.app/Contents/Resources/

Next, run the following command to open the Info.plist file in Sublime Text:

open -a Sublime\ Text\ 2 /Applications/Sublime\ Text\ 2.app/Contents/Info.plist

Add the following lines within the array to register the icon:

<dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleTypeName</key>
    <string>TODO</string>
    <key>CFBundleTypeExtensions</key>
    <array>
        <string>todo</string>
        <string>todolist</string>
        <string>tasks</string>
        <string>taskpaper</string>
    </array>
    <key>CFBundleTypeIconFile</key>
    <string>TODO</string>
</dict>

Rebuild the Info.plist with the following command:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -f -r /Applications/Sublime\ Text\ 2.app/

And there you have it! Your .todo file now has a new icon.

New icon for TODO file in Sublime Text

Conclusion

That’s it! Now you can take notes and add todo lists without having to install or open additional applications within Sublime Text. We hope you find this tip useful. For further reference, visit the official PlainTasks repository on GitHub.

More with Sublime Text

For more things you can do with Sublime Text, check out:

WebsiteFacebookTwitterInstagramPinterestLinkedInGoogle+YoutubeRedditDribbbleBehanceGithubCodePenWhatsappEmail