diff options
author | Tyler Szabo <tyler@szabomail.ca> | 2020-12-15 16:51:28 -0800 |
---|---|---|
committer | Tyler Szabo <tyler@szabomail.ca> | 2020-12-15 16:53:43 -0800 |
commit | 91cc663e8b51e59563272e31e6466b798b0dbb2a (patch) | |
tree | 7be6e4e21c1a73e599b6a78f40ac8641f49cd0b2 | |
parent | ae75dd6e6278ea2b8bbb4cc0c4ef7075b7e41198 (diff) | |
download | todo.txt-vim-91cc663e8b51e59563272e31e6466b798b0dbb2a.zip |
Wrap `normal!` when commands contain CR character
Git can become confused when a single line ends with a carriage return wrapping with `execute` and escaping control characters works around Git end-of-line nuances.
-rw-r--r-- | autoload/todo.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/todo.vim b/autoload/todo.vim index ff28af3..e53c941 100644 --- a/autoload/todo.vim +++ b/autoload/todo.vim @@ -62,7 +62,7 @@ function! todo#PrependDate() if (getline(".") =~ '\v^\(') execute "normal! 0f)a\<space>\<esc>l\"=strftime(\"%Y-%m-%d\")\<esc>P" else - normal! I=strftime("%Y-%m-%d ")
+ execute "normal! I\<c-r>=strftime(\"%Y-%m-%d \")\<cr>" endif endfunction |