3.8 KiB
Text Block Timer Plugin
A text block timing tool designed for Obsidian, allowing you to add a count-up stopwatch function to any text line in your notes.
Features
- Add timers to any text line, supporting multiple timers running simultaneously (stopwatch function).
- ▶️/⏸️ Start, pause, and resume timing for tasks.
- ⏳ Real-time display of cumulative time cost.
- 💾 Persistent storage of timing data.
- 🔄 Users can optionally choose whether to continue timing when files or Obsidian is closed (by default, closing a file will not cause failure of the real-time stopwatch).
Usage
1. Command Palette + Shortcut (Recommended⭐️)
- Configure a shortcut for the command "Text Block Timer: Toggle timer" for quick access.
- When the cursor is on a text block, press the shortcut key to start, pause, or resume.
- The timer will be displayed in the format
【⏳00:00:00 】at the beginning of the text line.
2. Mouse Operations
- Right-click on a text line.
- Select "Start Timer," "Pause Timer," or "Resume Timer."
Custom Settings
Users can customize the following options in the plugin Settings:
1. Whether to continue timing after the file or Obsidian closed
Users can freely choose whether to continue the timing after closing the file or disabling Obsidian.
1.1 never stops unless the user stops manually
After a user closes a file or exits Obsidian, the timer will still "time in the background". When the file is opened next time, the time spent during the closure period will be counted as the timer time and the timing will automatically resume.

1.2 auto-stop only when exiting Obsidian. Background timing continues when closing files (recommended, default option)
After the user closes a file, the timer will still "time in the background". When the file is opened next time, the time spent during the closing period will be counted as the timer time and the timing will automatically resume.
However, once the user exits Obsidian, all timers will stop immediately to prevent significant data errors caused by the user forgetting to manually close the timers.

1.3 auto-stop immediately when closing a file
After the user closes a file, all timers will stop immediately. However, if a file is closed by mistake, it may cause the timer to pause.

2. Timer insert position
Users can choose to insert a timer label either before or after the text block.

Version Log:
- V1.0.3
- ==Major Optimization==: Closing a file no longer causes the timer to fail. Users can freely choose whether to continue timing when the or Obsidian is closed (see custom settings).
- Added custom settings: Users can now choose the position to insert the timer (before or after texts).
- Improve compatibility with markdown, adding support for ordered checkboxes and headings.
- V1.0.2
- Added language support for Chinese, English, Japanese, and Korean.
- V1.0.1
- Improved display effects by adding a space before the time label.
- Fixed the issue where adding a timer to a task list caused the task checkbox to fail.
- V1.0.0
- Plugin release
Development Information
- Developer: frankthwang
- Version: 1.0.3


