From e6d9fa9127c0c0e1d41e0ad02ed49e8e1fc0bf83 Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Mon, 23 Jan 2023 19:24:47 -0800 Subject: changed pattern for md checklist --- ftplugin/markdown_bujo.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ftplugin/markdown_bujo.vim b/ftplugin/markdown_bujo.vim index 2330b35..369983c 100644 --- a/ftplugin/markdown_bujo.vim +++ b/ftplugin/markdown_bujo.vim @@ -9,13 +9,13 @@ " " search() returns 0 if it the pattern was not found function SearchCheck() - return (search('\[\]', 'nc', line('.')) || search('\[\]', 'nbc', line('.'))) + return (search('\[ \]', 'nc', line('.')) || search('\[ \]', 'nbc', line('.'))) endfunction " Edit markdown lists " Add and remove bullets with ease " If we are already checked then we uncheck -nnoremap BujoChecknormal SearchCheck() ? ':.s/\[\]/\[x\]' : ':.s/\[x\]/\[\]' -nnoremap BujoAddnormal i-[] -inoremap BujoAddinsert -[] -inoremap BujoCheckinsert SearchCheck() ? ':.s/\[\]/\[x\]' : ':.s/\[x\]/\[\]' +nnoremap BujoChecknormal SearchCheck() ? ':.s/\[ \]/\[x\]' : ':.s/\[x\]/\[ \]' +nnoremap BujoAddnormal i- [ ] +inoremap BujoAddinsert - [ ] +inoremap BujoCheckinsert SearchCheck() ? ':.s/\[ \]/\[x\]' : ':.s/\[x\]/\[ \]' -- cgit v1.2.3