You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am a competitive programmer and I like to reuse parts of the code but I find adding snippets in snippets.conf to be a bit tedious. Does a simple way exist?
The text was updated successfully, but these errors were encountered:
😢
i have found a way i.e type my custom code like this
print(repr('''ll pow(int a, int b){ ll res = 1; a %= mod; while(b){ if(b & 1){ res = res * a; res %= mod; } a = a * a; b >>= 1; } return res % mod}'''))
output : 'll pow(int a, int b){\n ll res = 1;\n a %= mod;\n while(b){\n if(b & 1){\n res = res * a;\n res %= mod;\n }\n a = a * a;\n b >>= 1;\n }\n return res % mod\n}'
For some one looking for the solution just copy your code and paste in the python code format mentioned by @gpk2000
and paste the output under the section of the language in the conf file which is at /usr/share/geany/snippets.conf.
like this may be
hi=the op you got from the python
now when you use the word hi in geany type hi and then press tab to autocomplete the snippet
Hi I am a competitive programmer and I like to reuse parts of the code but I find adding snippets in snippets.conf to be a bit tedious. Does a simple way exist?
The text was updated successfully, but these errors were encountered: