We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1a133aa + 9e19058 commit 68e932bCopy full SHA for 68e932b
generate_vscode_snippets.py
@@ -4,11 +4,18 @@
4
import platform
5
6
HOME = os.path.expanduser("~")
7
-PATH = HOME + '/.config/Code/User/snippets/cpp.json'
8
9
-if platform.system() in ['Windows', 'Win32']:
10
- # for windows
+OS = platform.system()
+
+if OS in ['Windows', 'Win32']: # for windows
11
PATH = HOME + '/AppData/Roaming/Code/User/snippets/cpp.json'
12
+elif OS == 'Linux': # for linux
13
+ PATH = HOME + '/.config/Code/User/snippets/cpp.json'
14
+elif OS == 'Darwin': # for mac os
15
+ PATH = HOME + '/Library/Application Support/Code/User/snippets/cpp.json'
16
+else:
17
+ print(OS)
18
+ sys.exit('unsupported operating system')
19
20
def add_snippets_to_vscode(root_path, filename, ext):
21
path = root_path + filename + '.' + ext
0 commit comments