aboutsummaryrefslogtreecommitdiff
path: root/vim.dot.link/plugin/lib.vim
blob: 0e4cafadc6cc9ab0b06671e698a6b09ad4c77181 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
" lib.vim - Miscelaneous functions
"
" Author: Silvio Rhatto <rhatto@riseup.net>
"

" Checkbox handling
"
" This is commented out because vitalk/vim-simple-todo is being used instead.
"
" 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