I'm new to the vim customization/plugin ecosystem and couldn't figure out how to use todo.txt-vim with vim-gnupg for encrypted todo files. When decrypting a todo.txt.gpg file, the result wouldn't have the correct syntax highlighting.
I'm sharing this here because it seems the wiki isn't set up. Adding the following to .vimrc will turn on todo.txt syntax highlighting for decrypted todo.txt.gpg and *.todo.txt.gpg files:
autocmd BufRead,BufNewFile *todo.txt.gpg set filetype=todo
Maybe there's a better way to do this, but it works.
I'm new to the vim customization/plugin ecosystem and couldn't figure out how to use todo.txt-vim with vim-gnupg for encrypted todo files. When decrypting a
todo.txt.gpg
file, the result wouldn't have the correct syntax highlighting.I'm sharing this here because it seems the wiki isn't set up. Adding the following to
.vimrc
will turn on todo.txt syntax highlighting for decryptedtodo.txt.gpg
and*.todo.txt.gpg
files:autocmd BufRead,BufNewFile *todo.txt.gpg set filetype=todo
Maybe there's a better way to do this, but it works.