-- ┌──────────────────────────┐ -- │▗▀▖ ▐ ▗ │ -- │▐ ▌ ▌▛▀▖▞▀▖▜▀ ▄ ▞▀▖▛▀▖▞▀▘│ -- │▜▀ ▌ ▌▌ ▌▌ ▖▐ ▖▐ ▌ ▌▌ ▌▝▀▖│ -- │▐ ▝▀▘▘ ▘▝▀ ▀ ▀▘▝▀ ▘ ▘▀▀ │ -- └──────────────────────────┘ -- 2021-10-10 21:50 WIP, I don't know how to integrate these functions to init.lua and honestly, everything is a nvim_command or something anyway local random = math.random local function random_filename() uuid = '' for i=0,6 do uuid = uuid .. (string.format('%x', random(0, 0xf))) end return uuid end function create_note() nvim_command("e! " .. nvim_call_function('fnameescape', '~/nextcloud/personal_wiki/text/box/' .. random_filename() .. ".wiki")) local text = "= up =\n\n= down =\n\n= keywords =\n\n" nvim_command("put! " .. text) nvim_command("normal gg") end