2e66965748bfd244edb080e4c1feaa43f8874550
README.md
Vimwiki Markdown Utilities
A collection of Lua keybindings and shell scripts for enhancing the functionality of Vimwiki in Neovim. This project focuses on providing seamless workflows for previewing, converting, and managing Markdown files directly from Neovim.
Features
-
Markdown Preview:
- Quickly preview your Vimwiki Markdown files using a simple keybinding.
- Leverages a custom shell script to index and render the wiki for better organization.
- Opens the preview directly in a browser.
-
Convert Markdown to HTML:
- Convert the current Markdown file to HTML and open it in Qutebrowser with one command.
- Automatically checks for file compatibility and script availability.
-
Neovim Integration:
- Preconfigured keybindings to streamline workflows.
- Error notifications for missing files or unsupported formats.
Installation
-
Clone the repository:
git clone https://github.com/<your-username>/vimwiki-markdown-utilities.git -
Add to Neovim:
- Include the
keybindings.luafile in your Neovim configuration.require('path-to-keybindings/keybindings') - Alternatively, source it from your
init.lua:dofile('~/.config/nvim/keybindings.lua')
- Include the
-
Place the Shell Script:
- Move
vimwiki-markdown-preview.shto~/.config/nvim/scripts/or update the path inkeybindings.lua.
- Move
-
Install Requirements:
- Ensure you have
bash,qutebrowser, and any additional dependencies needed by the shell script.
- Ensure you have
Usage
Keybindings:
-
Preview Markdown Wiki:
- Press
<leader>mipto render and index the Vimwiki Markdown files.
- Press
-
Convert and Open Markdown:
- Press
<leader>mpto convert the current Markdown file to HTML and open it in Qutebrowser.
- Press
Script Options:
- The shell script supports:
--index-wiki: Index and render the entire Vimwiki.--convert <file>: Convert a specific Markdown file to HTML.
Troubleshooting
- Script Not Found: Ensure the path to
vimwiki-markdown-preview.shis correct inkeybindings.lua. - Browser Not Opening: Verify that Qutebrowser is installed and accessible from the terminal.
- File Not Markdown: The
Convert and Opencommand only works for.mdfiles.
Contributions
Contributions are welcome! Feel free to submit issues or pull requests to improve functionality, add features, or fix bugs.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Languages
Shell
76.4%
CSS
14.7%
Lua
8.9%