Migrate '.vim/ftplugin' to neovim
parent
05bc2ec59e
commit
05986a30bb
|
|
@ -0,0 +1 @@
|
|||
vim.opt.matchpairs:append("=:;")
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
-- 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, {})
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
vim.cmd([[
|
||||
" Anki helper functions
|
||||
|
||||
" Convert cloze note to regular text
|
||||
|
|
@ -20,3 +21,4 @@
|
|||
|
||||
au FileType pandoc com! -range AnkiRemoveAllClozes :%s/\%V{{c\d\+:://ge | :%s/\%V}}//ge | :%s/\%VSTART\nCloze\n//ge | :%s/\%VEND\n//ge
|
||||
au FileType pandoc com! -range AnkiRemoveSelectedClozes :%s/\%V{{c\d\+:://ge | :%s/\%V}}//ge | :%s/\%VSTART\nCloze\n//ge | :%s/\%VEND\n//ge
|
||||
]])
|
||||
|
|
@ -1,3 +1,20 @@
|
|||
-- 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, {})
|
||||
|
||||
vim.cmd([[
|
||||
set cc=81
|
||||
set cocu=""
|
||||
func! GetContext()
|
||||
|
|
@ -17,3 +34,4 @@ func! GetContext()
|
|||
endif
|
||||
endfunc
|
||||
com! -nargs=0 GetContext :call GetContext()
|
||||
]])
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
vim.cmd([[
|
||||
"
|
||||
" Source: https://wiki.call-cc.org/vim / Jonathan Palardy
|
||||
"
|
||||
|
|
@ -23,3 +24,4 @@ fun! Scheme_eval_defun()
|
|||
call Scheme_send_sexp(@")
|
||||
call setpos('.', pos)
|
||||
endfun
|
||||
]])
|
||||
|
|
@ -1 +0,0 @@
|
|||
set mps+==:;
|
||||
Loading…
Reference in New Issue