about summary refs log tree commit diff
path: root/lua/create_note.lua
diff options
context:
space:
mode:
authoriurii plugatarov <[email protected]>2024-08-02 23:19:11 +0200
committeriurii plugatarov <[email protected]>2024-08-02 23:19:11 +0200
commitf24a3ab9744a3f50eb8cacc06d4ef4c5f96875db (patch)
treee53c36d600f9ded45036d3489411cb82f26cb192 /lua/create_note.lua
parentdfee9611c0134def92d3c254ca4b067338ae7720 (diff)
downloadsketchbook.nvim-f24a3ab9744a3f50eb8cacc06d4ef4c5f96875db.tar.gz
fix
Diffstat (limited to 'lua/create_note.lua')
-rw-r--r--lua/create_note.lua20
1 files changed, 0 insertions, 20 deletions
diff --git a/lua/create_note.lua b/lua/create_note.lua
deleted file mode 100644
index d85e267..0000000
--- a/lua/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