.emacs.d/snippets/python-mode/file-write

7 lines
161 B
Plaintext
Raw Normal View History

# -*- mode: python -*-
# name: file-write
# key: fw
# --
f_name = ${1:name}
with open(f'~/Documents/$0/{f_name}.txt', 'w') as file:
file.write(${2:content})