README file from
GithubTXT Viewer
TXT Viewer is a read-only plugin for inspecting .txt files with line numbers, search navigation, filtering, line-ending warnings, and large-file guards.
It is not a text editor. It is built for quick inspection of plain text exports, AI output, notes from other systems, and generated files where opening a raw text file is not enough context.
Features
- Opens
.txtfiles in a dedicated view. - Shows stable line numbers.
- Supports soft wrap on/off.
- Searches within the file and navigates between matching lines.
- Offers a filter mode that shows only matching lines while preserving original line numbers.
- Shows line count, character count, byte count, line-ending type, wrap status, filter status, and render cap status.
- Reports mixed line endings and possible binary content.
- Refreshes the file after external changes.
- Renders large files with caps to keep the view responsive.
- Stays read-only by design: it never writes back to text files.
Large files
TXT Viewer renders the first 10,000 lines in normal text mode. Filter mode renders the first 1,000 matching lines. Additional lines are counted and reported in the status or warning area.
Privacy and security
TXT Viewer does not make network requests and does not send vault content to external services. It does not use the system clipboard. It reads files through the vault API and renders a local view.
Why read-only?
Plain text looks simple, but editing still creates risk around encodings, line endings, generated output, and accidental changes. TXT Viewer intentionally avoids writing to disk in v0.1.
Installation
Community plugin directory
TXT Viewer is prepared for Community plugin directory submission. Once accepted, it can be installed from Settings -> Community plugins -> Browse.
Manual installation
Until the community directory submission is accepted:
- Download
main.js,manifest.json, andstyles.cssfrom the latest release. - Create this folder in your vault:
.obsidian/plugins/txt-viewer/. - Put the downloaded files in that folder.
- Reload the app.
- Enable TXT Viewer in Settings -> Community plugins.
BRAT installation
For beta testing, install the plugin with BRAT using this repository URL:
https://github.com/viggomeesters/obsidian-txt-viewer
Usage
Open any .txt file in your vault. The file opens with TXT Viewer.
Use the toolbar to:
- search inside the file
- move to the previous or next matching line
- switch between full text and filtered lines
- toggle soft wrap
- refresh the file after external changes
Development
npm install
npm run build
npx tsc --noEmit
npm test
For local development, copy or symlink this repository into .obsidian/plugins/txt-viewer/ inside a test vault.
Release process
Community plugin files are installed from GitHub releases. For each release:
- Update
manifest.json,package.json, andversions.json. - Run
npm install,npm run build,npx tsc --noEmit, andnpm test. - Create a GitHub release whose tag exactly matches
manifest.json.version. - Attach
main.js,manifest.json, andstyles.cssas release assets.
The repository includes a GitHub Actions release workflow with artifact attestation support. If GitHub Actions is disabled for the owner account, manual releases are still usable, but automated review may show a recommendation about missing artifact attestations.
Community directory submission
The repository is prepared for Community plugin submission. The remaining submission step must be completed by the repository owner because it requires signing in, linking GitHub, and confirming the developer policies/support commitment.
Submit this repository URL:
https://github.com/viggomeesters/obsidian-txt-viewer
Steps:
- Sign in to community.obsidian.md.
- Link the GitHub account that owns this repository.
- Open Plugins -> New plugin.
- Enter the repository URL above.
- Confirm the developer policies and submit.
- Address any automated review feedback.
Official references: