diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2024-07-28 15:21:01 -0300 |
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2024-07-28 15:21:01 -0300 |
| commit | a3103720f129bac2a60943d4e5e882144e5bd604 (patch) | |
| tree | 04144ead383ac79717e20b167ee4425e11e8fbfc /vim.dot.link/plugin | |
| parent | fd271de3618194c264248e82c1441fd520e498fb (diff) | |
| download | vim-a3103720f129bac2a60943d4e5e882144e5bd604.tar.gz vim-a3103720f129bac2a60943d4e5e882144e5bd604.tar.bz2 | |
Feat: try preservim/vim-markdown
Diffstat (limited to 'vim.dot.link/plugin')
| -rw-r--r-- | vim.dot.link/plugin/lib.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vim.dot.link/plugin/lib.vim b/vim.dot.link/plugin/lib.vim new file mode 100644 index 0000000..7e71c6f --- /dev/null +++ b/vim.dot.link/plugin/lib.vim @@ -0,0 +1,21 @@ +" lib.vim - Miscelaneous functions +" +" Author: Silvio Rhatto <rhatto@riseup.net> +" + +" Checkbox handling +" +" Thanks https://www.reddit.com/r/vim/comments/slqsao/readymade_solution_for_handling_markdown/ +"function! ToggleCheckbox() +" let line = getline('.') +" +" if line =~ '- \[ \]' +" call setline('.', substitute(line, '- \[ \]', '- \[x\]', '')) +" elseif line =~ '- \[x\]' +" call setline('.', substitute(line, '- \[x\]', '- \[ \]', '')) +" elseif line =~ '- ' +" call setline('.', substitute(line, '- ', '- \[ \] ', '')) +" endif +"endf +" +"nnoremap <Leader>c :call ToggleCheckbox()<CR> |
