Markdown Note Refactor is a Visual Studio Code extension that aims to streamline the process of managing and organizing markdown files. This tool allows users to automatically split sections of a markdown file into separate files based on h2 headers and link them together for easy navigation. Inspired by the Obsidian community plugin note-refactor-obsidian, this extension brings similar functionality to VS Code, enhancing productivity for writers, developers, and note-takers working with markdown files.
- Automated Section Splitting: Splits the currently opened markdown file into sections based on h2 headers, each becoming its own separate file.
- Dynamic File Generation: Automatically generates new markdown files using the h2 header titles as filenames, placed in a specified directory.
- Content Duplication: Copies the text within the original file's sections into the corresponding new markdown files.
- Link Creation: Inserts wiki-style links in the original file that point to the newly created files, facilitating easy navigation between them.
Ensure you have the following installed before you start using Markdown Note Refactor:
- Visual Studio Code
To install Markdown Note Refactor:
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the square icon on the sidebar or pressing Ctrl+Shift+X.
- Search for "Markdown Note Refactor" and click on the install button.
- Clone or download this repository.
- In Visual Studio Code, open the Extensions view (Ctrl+Shift+X).
- Click on the ... menu at the top-right corner and select Install from VSIX....
- Locate and select the .vsix file that you downloaded or built.
To use Markdown Note Refactor:
- Open the markdown file you wish to refactor in VS Code.
- Press Ctrl+Shift+P to open the Command Palette.
- Type Markdown Note Refactor: Refactor and Link Sections and press Enter.
The extension will then process the current file, creating new markdown files for each h2 section and updating the original file with links to these new documents.
Your contributions make the open-source community a fantastic place for growth, inspiration, and creativity. If you have suggestions for improving Markdown Note Refactor, please fork the repo, create a pull request, or open an issue with the tag "enhancement". Contributions of all kinds are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.
Special thanks to note-refactor-obsidian for the inspiration behind this extension.