mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
The file update info can be accessed from the file directly on the command line. We often forget to update the update field in the Python source file header, making this field rather useless. I have also set up the Neovim to show file update time on the title of terminal window. So there is no need to retain the update field in header comment.
27 lines
414 B
Plaintext
27 lines
414 B
Plaintext
snippet head "Python source file header" b
|
|
"""
|
|
Description: $1
|
|
Author: Jie-dong Hao
|
|
Created: `!v strftime("%Y-%m-%d %H:%M:%S%z")`
|
|
"""
|
|
$0
|
|
endsnippet
|
|
|
|
snippet print "Print value of some variable"
|
|
print("$1".format($2))
|
|
$0
|
|
endsnippet
|
|
|
|
snippet impa "import FOO as BAR" b
|
|
import ${1:FOO} as ${2:BAR}
|
|
endsnippet
|
|
|
|
snippet main "Main function boilerplate" b
|
|
def main():
|
|
$0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
endsnippet
|