From 4f4730f09a08630c1c474caf1e5b2d94980aa1b9 Mon Sep 17 00:00:00 2001 From: moxie Date: Sun, 15 Mar 2026 10:49:19 +0200 Subject: chore: update readme/docs --- doc/muwiki.txt | 19 ++++++++----------- doc/tags | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/muwiki.txt b/doc/muwiki.txt index 9f672b6..e4d06de 100644 --- a/doc/muwiki.txt +++ b/doc/muwiki.txt @@ -7,7 +7,7 @@ CONTENTS *muwiki-contents* 2. Requirements ............................................ |muwiki-requirements| 3. Installation ............................................ |muwiki-installation| 4. Configuration ........................................... |muwiki-configuration| -5. Commands & Functions .................................... |muwiki-commands| +5. Keymaps ................................................. |muwiki-keymaps| 6. Lua API ................................................. |muwiki-api| 7. Autocommands & Recipes .................................. |muwiki-autocmd| 7.1 Auto-create directories ............................. |muwiki-autocmd-mkdir| @@ -87,7 +87,7 @@ Example Configuration~ < ============================================================================== -5. COMMANDS & FUNCTIONS *muwiki-commands* +5. KEYMAPS *muwiki-keymaps* Keymaps should be configured by the user. Here are recommended keymaps: > @@ -111,14 +111,6 @@ Keymaps should be configured by the user. Here are recommended keymaps: }) < -Link Format~ -> - [Wiki page](page.md) - [Website](https://example.com) - [Relative path](file://../document.pdf) - [Absolute path](file:///tmp/image.png) -< - ============================================================================== 6. LUA API *muwiki-api* @@ -196,7 +188,8 @@ Add template for new files~ *muwiki-au if not wiki_root then return end local filename = vim.fn.fnamemodify(args.file, ":t:r") - local template = string.format("# %%s\n\n", filename) + local date = os.date("%Y-%m-%d") + local template = string.format("# %s\n\nCreated: %s\n\n", filename, date) vim.api.nvim_buf_set_lines(args.buf, 0, 0, false, vim.split(template, "\n")) end, }) @@ -213,6 +206,10 @@ Open with menu example~ *muwiki-au { name = "Zathura", cmd = "zathura", exts = {"pdf"} }, { name = "swayimg", cmd = "swayimg", exts = {"png", "jpg", "jpeg", "gif", "webp"} }, { name = "mpv", cmd = "mpv", exts = {"mp4", "mkv", "avi", "mov", "webm"} }, + { name = "Copy URL", cmd = function(url) + vim.system({ 'wl-copy', url }, { detach = true }) + vim.notify('URL copied to clipboard', vim.log.levels.INFO) + end }, { name = "xdg-open", cmd = "xdg-open" }, }) end, { buffer = args.buf, desc = "Open with..." }) diff --git a/doc/tags b/doc/tags index 2038741..c41a69a 100644 --- a/doc/tags +++ b/doc/tags @@ -4,12 +4,12 @@ muwiki-autocmd muwiki.txt /*muwiki-autocmd* muwiki-autocmd-mkdir muwiki.txt /*muwiki-autocmd-mkdir* muwiki-autocmd-open-with muwiki.txt /*muwiki-autocmd-open-with* muwiki-autocmd-template muwiki.txt /*muwiki-autocmd-template* -muwiki-commands muwiki.txt /*muwiki-commands* muwiki-configuration muwiki.txt /*muwiki-configuration* muwiki-contents muwiki.txt /*muwiki-contents* muwiki-health muwiki.txt /*muwiki-health* muwiki-installation muwiki.txt /*muwiki-installation* muwiki-intro muwiki.txt /*muwiki-intro* +muwiki-keymaps muwiki.txt /*muwiki-keymaps* muwiki-opt-dirs muwiki.txt /*muwiki-opt-dirs* muwiki-opt-index_file muwiki.txt /*muwiki-opt-index_file* muwiki-requirements muwiki.txt /*muwiki-requirements* -- cgit v1.2.3