Add 'dots/' from commit '357b97a7692c8d5ec9666d8d7d7c98d81cb51cf0'
git-subtree-dir: dots git-subtree-mainline:2ad98cde17git-subtree-split:357b97a769
This commit is contained in:
15
dots/.config/nvim/ftplugin/pandoc.lua
Normal file
15
dots/.config/nvim/ftplugin/pandoc.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
-- NOTE: May want to move this, as it is more specific to wiki than to pandoc
|
||||
vim.api.nvim_create_user_command("AnkiDeck", function()
|
||||
local handle = io.popen("get-anki-decks")
|
||||
local decks = {}
|
||||
for line in handle:lines() do
|
||||
table.insert(decks, line)
|
||||
end
|
||||
handle:close()
|
||||
|
||||
vim.ui.select(decks, { prompt = "Select Anki deck" }, function(choice)
|
||||
if choice then
|
||||
vim.api.nvim_put({ choice }, "", true, true)
|
||||
end
|
||||
end)
|
||||
end, {})
|
||||
Reference in New Issue
Block a user