PathMark – File Path Marker
It identifies each file's location within your project and keeps that path directly inside the file as a comment. PathMark helps developers maintain clear file identification without changing, rearranging, or reformatting the rest of their source code. With a safe check mode and an explicit apply mode, you remain in control of every modification. Features
Requirements
Getting Started1. Install PathMarkInstall PathMark – File Path Marker from the Visual Studio Code Marketplace. 2. Open your projectOpen the project or workspace you want PathMark to process in VS Code. 3. Open the Command PalettePress:
Search for:
You will find two commands:
4. Check your workspaceSelect:
PathMark analyzes supported files throughout your workspace and reports their marker status. No files are modified during this operation. 5. Apply changesAfter reviewing the proposed changes, select:
PathMark displays a confirmation before applying modifications. Only files requiring missing or invalid markers are modified. Check WorkspaceCheck Workspace is the safe analysis mode. It:
Example output: text
Apply ChangesApply Changes executes the planned modifications. Before proceeding, PathMark asks for confirmation because this operation modifies project files. Example output: text
If no modifications are required, PathMark reports: text
Recommended workflow: Run Check Workspace first, review the proposed changes, and then use Apply Changes when you are ready. The
|
| Pattern | Meaning |
|---|---|
.next |
Ignore directories named .next |
node_modules |
Ignore dependency directories |
docs/bkp |
Ignore a specific project-relative directory |
README.md |
Ignore files with that name |
*.log |
Ignore log files at any directory depth |
*.map |
Ignore source map files |
*.xxx |
Ignore files ending in .xxx |
src/*.test.ts |
Match files directly under src |
tsconfig.tsbuildinfo |
Ignore files with that name |
The * wildcard matches characters within a single path segment.
For example, *.map matches:
text
app.js.map
src/app.js.map
src/components/chart.js.map
When an excluded directory is encountered, PathMark skips that directory and does not scan its contents.
How PathMark Works
PathMark uses the file's path relative to the project root as the marker value.
For example, a Go file:
go
// internal/app/app.go
package app
A Python file:
python
# scripts/build.py
print("hello")
A Markdown file:
markdown
<!-- README.md -->
# My Project
Windows path separators are normalized to / inside markers.
For example, this file path:
text
internal\app\app.go
becomes:
go
// internal/app/app.go
Paths are always relative to the project root. Absolute filesystem paths are never used as marker values.
Marker Position Rules
PathMark follows a simple rule:
Only the first non-empty line of a normal file is considered the marker position.
Leading blank lines are ignored when determining where the marker belongs.
PathMark does not search the entire file for comments containing a path.
Existing comments outside the designated marker position are preserved and are not moved or modified.
Shebang Files
Executable scripts containing a shebang are handled specially.
The marker belongs immediately after the shebang.
For example:
python
#!/usr/bin/env python3
# scripts/example.py
print("hello")
The shebang remains untouched.
Existing comments following the shebang are preserved. PathMark does not treat every comment as a valid PathMark marker.
Missing Markers
A marker is considered missing when the designated marker position does not contain a recognizable PathMark marker.
For example, a Go file containing:
go
package app
May become:
go
// internal/app/app.go
package app
Existing comments farther down in the file are not searched for or moved.
Invalid Markers
A marker is invalid when a recognizable PathMark marker exists at the correct position, but its path does not match the actual project-relative path.
For example, if the actual file is:
text
special-cases/example.go
But its marker is:
go
// special-cases/wrong.go
PathMark identifies the marker as invalid and replaces it with:
go
// special-cases/example.go
Unrelated comments are not treated as invalid markers.
Supported File Types
PathMark supports comment styles appropriate for the following configured file types:
.cs.css.env.go.html.js.jsx.md.ps1.py.rs.scss.sh.sql.ts.tsx.vue.yaml.yml
Files without a supported comment style are skipped.
For example, JSON files are currently unsupported.
Unsupported files are never modified.
Newline Preservation
When PathMark modifies a file, it attempts to preserve its existing newline style.
- CRLF files continue using CRLF.
- LF files continue using LF.
- Files without a final newline are handled without requiring unrelated content changes.
Safety and File Preservation
PathMark separates analysis from modification.
Check Workspace
- Reads supported files.
- Analyzes markers.
- Reports missing and invalid markers.
- Shows proposed changes.
- Does not modify project files.
Apply Changes
- Reads supported files.
- Analyzes markers.
- Builds a change plan.
- Applies the planned changes after confirmation.
PathMark does not:
- Reformat source code.
- Move existing comments.
- Remove unrelated comments.
- Rearrange imports.
- Change indentation.
- Modify application logic.
- Search the entire file for markers.
- Modify unsupported file types.
- Traverse excluded directories.
Its responsibility is limited to maintaining the PathMark marker at its designated position.
Design Principle
PathMark follows one simple principle:
Maintain the file-path marker without interfering with the user's source code.
The marker is ours. Everything else belongs to the user.
🏢 About PathMark
PathMark – File Path Marker is developed and maintained by CXAGE.
PathMark is a free-to-use Visual Studio Code extension designed to help developers maintain consistent project-relative file-path markers across supported source files.
Developer
CXAGE
Website: https://cxage.com
Pricing
PathMark is free to use for both personal and commercial projects.
No subscription or payment is required.
License
PathMark is proprietary software. Users are permitted to use the extension under the terms specified in the accompanying LICENSE file.
Redistribution, resale, and unauthorized modification of the extension are not permitted.
Privacy
PathMark processes workspace files locally. It does not collect telemetry, analytics, or personal information.
See Privacy Policy for details.
Support
- Report a Bug
- Request a Feature
- GitHub Repository
Copyright © 2026 CXAGE. All rights reserved.