diff options
Diffstat (limited to 'doc/muwiki.txt')
| -rw-r--r-- | doc/muwiki.txt | 19 |
1 files changed, 8 insertions, 11 deletions
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..." }) |
