Add 'dots/' from commit '357b97a7692c8d5ec9666d8d7d7c98d81cb51cf0'
git-subtree-dir: dots git-subtree-mainline:2ad98cde17git-subtree-split:357b97a769
This commit is contained in:
22
dots/.vim/ftplugin/pandoc/anki.vim
Normal file
22
dots/.vim/ftplugin/pandoc/anki.vim
Normal file
@@ -0,0 +1,22 @@
|
||||
" Anki helper functions
|
||||
|
||||
" Convert cloze note to regular text
|
||||
"
|
||||
" * `AnkiRemoveAllClozes` all cloze notes in file
|
||||
" * `AnkiRemoveSelectedClozes` all clozes in selected range
|
||||
"
|
||||
" E.g.
|
||||
"
|
||||
" ```markdown
|
||||
" START
|
||||
" Cloze
|
||||
" In this sentence {{c1::this word}} was closed.
|
||||
" END
|
||||
" ```
|
||||
"
|
||||
" ```markdown
|
||||
" In this sentence this word was closed.
|
||||
" ```
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user