Compare commits

...

3 Commits

Author SHA1 Message Date
tiago
e28cb1978f Use different colors for projects and contexts 2025-02-08 18:56:09 -07:00
Leandro Freitas
3bb5f9cf0d Merge pull request #80 from ramses0/patch-1 2024-03-27 09:53:44 -04:00
Robert Ames
f2354abaa0 Prefer: 0i instead of I for mechanical insertion
vim details: `I` inserts before the first character instead of `0i` which inserts at the beginning of the line.

Usually `I` inserts at the first character in the line, and usually the first character is on the far left.  However, `I` ignores leading spaces which conflicts a bit with the mechanical manipulation of the text.

While it's not great `todo.txt` practices, if you did "mark as done" while on a line like ` * ...etc...` (eg: an indented bullet), the `I...` would put the `x` away from the far left (not the first character on the line, but instead the first character before the first character).

Prefer: `0i` instead of `I` for mechanical insertion
2024-03-27 06:49:44 -07:00
2 changed files with 3 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ function! s:get_current_date()
endfunction
function! todo#txt#prepend_date()
execute 'normal! I' . s:get_current_date() . ' '
execute 'normal! 0i' . s:get_current_date() . ' '
endfunction
function! todo#txt#replace_date()
@@ -41,7 +41,7 @@ endfunction
function! todo#txt#mark_as_done()
call s:remove_priority()
call todo#txt#prepend_date()
execute 'normal! Ix '
execute 'normal! 0ix '
endfunction
function! todo#txt#mark_all_as_done()

View File

@@ -48,7 +48,7 @@ highlight default link TodoPriorityB Statement
highlight default link TodoPriorityC Identifier
highlight default link TodoDate PreProc
highlight default link TodoProject Special
highlight default link TodoContext Special
highlight default link TodoContext String
if exists('g:todo_load_python') && g:todo_load_python
if has('python')