Skip to content

Nomekuma/auto-strikethrough-task-obsidian-pluggin

Repository files navigation

AutoStrikethroughTasksPlugin

AutoStrikethroughTasksPlugin is a plugin for Obsidian that automatically applies or removes strikethrough formatting to completed or incomplete tasks in your notes.

Features

  • Automatic Strikethrough on Completed Tasks: When you mark a task as complete (- [x]), the plugin automatically applies strikethrough (~~) to the task text.
  • Automatic Removal of Strikethrough on Incomplete Tasks: If you uncheck a task (- [ ]) that has strikethrough, the plugin will automatically remove the strikethrough.

Installation

  1. Download the plugin files or clone this repository into your Obsidian plugins folder.
  2. Open Obsidian and navigate to Settings > Community Plugins > Installed Plugins.
  3. Find the AutoStrikethroughTasksPlugin in the list and toggle it on.

Usage

Once the plugin is enabled:

  1. Write tasks using standard Markdown task list syntax.

    • Example:
      - [ ] Task to do
      - [x] Task completed
  2. The plugin will automatically:

    • Add strikethrough to completed tasks:
      - [x] ~~Task completed~~
    • Remove strikethrough from unchecked tasks:
      - [ ] Task to do

Development

Building the Plugin

To build this plugin, ensure you have Node.js installed, then:

  1. Run npm install to install dependencies.
  2. Run npm run build to compile the plugin.

Development Notes

  • The plugin listens for changes in the editor and updates task formatting in real-time.
  • The onload() method registers the event listener, and the onunload() method cleans up when the plugin is disabled.

Contributing

Feel free to contribute by submitting issues or pull requests. For significant changes, please open an issue first to discuss the changes you intend to make.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Automatically adds strikethrough to completed tasks.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published