Commit 5f5476fc authored by Bram Schoenmakers's avatar Bram Schoenmakers Committed by GitHub

End temporary file names with .todo.txt

That way the filetype detection of the todo.txt vim plugin is triggered and shows the appropriate syntax highlighting.

https://github.com/freitass/todo.txt-vim
parent 0817bb68
...@@ -55,7 +55,7 @@ class EditCommand(MultiCommand): ...@@ -55,7 +55,7 @@ class EditCommand(MultiCommand):
self.multi_mode = False self.multi_mode = False
def _todos_to_temp(self): def _todos_to_temp(self):
f = tempfile.NamedTemporaryFile(delete=False) f = tempfile.NamedTemporaryFile(delete=False, suffix='.todo.txt')
for todo in self.todos: for todo in self.todos:
f.write((todo.source() + "\n").encode('utf-8')) f.write((todo.source() + "\n").encode('utf-8'))
f.close() f.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment