Insert Timestamp
Insert Timestamp is a lightweight VS Code extension that quickly inserts the current date and time at the cursor. It works in any editor, including Jupyter Notebook (.ipynb) cells, making it perfect for logging, note-taking, and documenting edits.
Features
- Insert the current timestamp in
YYYY-MM-DD HH:mm:ss format.
- Works in all editors, including
.py files and Jupyter Notebook cells.
- Assign a custom keyboard shortcut for fast insertion.
- Configure the timezone via extension settings (e.g.,
UTC, UTC+8, local).
Usage
Keyboard Shortcut (Recommended)
Default shortcut:
Ctrl+Shift+T
- Place your cursor where you want the timestamp.
- Press the shortcut — a timestamp like this will appear:
2025-09-08 20:45:12
⚠️ On Linux, Ctrl+Alt+T opens the terminal by default, so a different shortcut is recommended.
Command Palette
- Press
Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac).
- Search for
Insert Timestamp.
- Press
Enter to insert the timestamp at the cursor.
Here’s a refined version of your Installation section reflecting that users can install directly from VS Code, with a fallback to the Marketplace if needed:
Installation
Install Directly in VS Code
- Open VS Code.
- Go to the Extensions view (
Ctrl+Shift+X or Cmd+Shift+X).
- Search for Insert Timestamp.
- Click Install.
If you cannot access the Marketplace due to network restrictions, you can download the extension manually from the VS Code Marketplace.
Manual Installation via VSIX (Fallback)
- Download the
.vsix file from the Marketplace page.
- Install it using the command:
code --install-extension insert-timestamp-0.0.1.vsix
This ensures you can use the extension even if direct installation in VS Code isn’t accessible.
Customization
The timestamp will automatically adjust according to your selected timezone.
Contributing
Feel free to fork the repository and submit PRs. Suggestions for new formats, automatic logging, or other enhancements are welcome!
License
MIT License © ZelinYang21