mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nvim: stop using nix for nvim
I just wanna work, I don't wanna nix
This commit is contained in:
parent
157b568ab4
commit
3b08674586
30 changed files with 0 additions and 9 deletions
41
.config/nvim/snippets/python.json
Normal file
41
.config/nvim/snippets/python.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"Dict comprehension": {
|
||||
"prefix": "dc",
|
||||
"body": [
|
||||
"{",
|
||||
"\t${3:key}:${4:value}",
|
||||
"\tfor ${1:var} in ${2:iterated}",
|
||||
"}",
|
||||
""
|
||||
]
|
||||
},
|
||||
"List comprehension": {
|
||||
"prefix": "lc",
|
||||
"body": [
|
||||
"[",
|
||||
"\t${3:var}${4:transformation}",
|
||||
"\tfor ${1:var} in ${2:iterated}",
|
||||
"]",
|
||||
""
|
||||
]
|
||||
},
|
||||
"For": {
|
||||
"prefix": "for",
|
||||
"body": [
|
||||
"for ${1:var} in ${2:iterable}:",
|
||||
"\t"
|
||||
]
|
||||
},
|
||||
"Open, read and save file to variable": {
|
||||
"prefix": "open",
|
||||
"body": [
|
||||
"${1:var} = []",
|
||||
"with open(\"${2:file.txt}\") as f:",
|
||||
"\t${1:var} = [",
|
||||
"\t\tline.strip()",
|
||||
"\t\tfor line in f.readlines() if line != '\\n'",
|
||||
"\t]",
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue