diff options
author | iurii plugatarov <[email protected]> | 2024-08-02 23:14:43 +0200 |
---|---|---|
committer | iurii plugatarov <[email protected]> | 2024-08-02 23:14:43 +0200 |
commit | d2f6073cb4e9c4026041288cd5cab2b2a0337c5a (patch) | |
tree | e56f52a63696410a3227e08577779a0a491a53bb /create_note.lua | |
parent | f4a1319352d466308cd85eb1263aef9fd2c54293 (diff) | |
download | sketchbook.nvim-d2f6073cb4e9c4026041288cd5cab2b2a0337c5a.tar.gz |
move to lua dir
Diffstat (limited to 'create_note.lua')
-rw-r--r-- | create_note.lua | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/create_note.lua b/create_note.lua deleted file mode 100644 index d85e267..0000000 --- a/create_note.lua +++ /dev/null @@ -1,20 +0,0 @@ -local M = {} - -function M.create_new_note() - local notes_dir = vim.g.notes_directory or "~/notes/" - local filename = os.date "%Y-%m-%d_%H-%M-%S" .. ".md" - local filepath = vim.fn.expand(notes_dir) .. filename - local title = "Title " .. os.date "%Y-%m-%d %H:%M:%S" - local template = { - "# " .. title, - "", - } - local file = io.open(filepath, "w") - for _, line in ipairs(template) do - file:write(line .. "\n") - end - file:close() - vim.cmd("edit " .. filepath) -end - -return M |