From 74683ee2259e5eafc3960e4ba177f9c860026d1e Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 13 Nov 2021 12:53:52 +0900 Subject: .vim: rm filetype todolist --- .vim/my/indent/todolist.vim | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .vim/my/indent/todolist.vim (limited to '.vim/my/indent/todolist.vim') diff --git a/.vim/my/indent/todolist.vim b/.vim/my/indent/todolist.vim deleted file mode 100644 index 0640a93..0000000 --- a/.vim/my/indent/todolist.vim +++ /dev/null @@ -1,32 +0,0 @@ -if exists('b:did_indent') - finish -endif - - -setlocal indentexpr=TodolistIndent() - - -function! TodolistIndent() - if v:lnum == 0 - return 0 - endif - - let line = getline(v:lnum - 1) - if s:starts_with_checkbox(line) - return indent(v:lnum - 1) - else - return 0 - endif -endfunction - - -function! s:starts_with_checkbox(line) - if a:line =~# '^\s*\[[ x]\]' - return 1 - else - return 0 - endif -endfunction - - -let b:did_indent = 1 -- cgit v1.3.1-4-g156e