Thanks to tUrG0n, vim-task won’t suffer from the pathogen issue anymore from now on, and we also have a new feature which will prepend a “-” for a non-task line when toggling the task status.
So by toggling the task status, we’re now actually toggling between 3 statuses of the task:
- blank: normal text
- pending: –
- completed: ✓
all with the same 1 keyboard shortcut as before, as always. So neat!
PS: Vim native regex i is pretty awkward to work with, unless you use some additional features ii, the regex will quickly become a mess, which maybe makes the person who reads your code thinks “wow, how complicated the regex is!”, but actually the truth is always: “well, it’s not, it’s just that ugly, man…”[Footnotes]
- to make the script portable, substitute() method will always use the ‘magic’ option in the regex match [↩]
- but we don’t want more dependencies though… [↩]