-
Notifications
You must be signed in to change notification settings - Fork 0
Optimizing Novel Word Count Plugin for Git Users
Jorge Castro edited this page Nov 11, 2025
·
2 revisions
Novel Word Count is a useful Obsidian plugin that displays file information directly in the file explorer. I primarily use it to monitor image file sizes, allowing me to identify large files without opening Windows Explorer or macOS Finder.
The plugin stores file metadata alongside settings in a single JSON file, with each file adding approximately 27 lines of data. This quickly becomes problematic:
- 500 files = 13,500 extra lines
- Creates disk space issues, especially for Git and Obsidian Sync users
- Can cause unnecessary merge conflicts in multi-device workflows
The developer has confirmed no plans to separate settings from cache or disable caching, so we need alternative solutions.
For Git users, add the plugin's data file to your .gitignore:
.obsidian/plugins/novel-word-count/data.json
Considerations:
- When setting up a new device, you'll need to reconfigure plugin settings
- Keep notes on your preferred settings for easy restoration
- This approach works well for most users
Once Novel Word Count is installed:
- In your Obsidian vault, create a new JavaScript file inside the
.obsidianfolder. For this guide, let’s name it:.obsidian/scripts/setNovelWordCountSettings.js - Open setNovelWordCountSettings.js and copy its entire content into the new file you just created.
This script includes my preferred plugin settings, feel free to adjust yours by editing the
settingsconstant. - Open Obsidian, then show the Developer Tools by pressing
Ctrl/Cmd + Shift + I. - Go to the Console tab and run the following command:
eval(await app.vault.adapter.read('.obsidian/scripts/setNovelWordCountSettings.js'))
- A confirmation modal will appear, and some messages will be logged in the console.
- Warnings may appear if your script includes settings that don’t exist.
- If no warnings or errors appear, click OK to apply the settings.
That’s it! You should now see the updated file details in the file explorer.
- Sync-Obsidian-with-GitHub-on-iOS
- Obsidian-community-plugins
- Optimizing-Novel-Word-Count-Plugin-for-Git-Users
- What is TypeScript, and why you should use it
- Quick setup
- Inference and type annotations
- Fundamental Types
- Object Types
- Union Types
- Type Aliases and Interfaces
- Type Assertions
- Literal Types
- null and undefined
- Narrowing
- Creating Types from Types
- Common Built‐in and Utility Types
- tsc CLI ‐ (The Compiler)
- Avoid using Object or {}
- Ignoring TypeScript errors
- TypeScript resources