-
Notifications
You must be signed in to change notification settings - Fork 1
/
Colonnade.py
41 lines (38 loc) · 1.7 KB
/
Colonnade.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import sublime
import sublime_plugin
class MakeTwoColumnsCommand(sublime_plugin.WindowCommand):
def run(self):
# load the settings to transfer
res = sublime.load_resource(
"Packages/Colonnade/TwoCol.sublime-settings")
my_settings = sublime.decode_value(res)
# transfer the settings to the user settings
user_settings = sublime.load_settings("Preferences.sublime-settings")
for k, v in my_settings.items():
user_settings.set(k, v)
# save the user settings
sublime.save_settings("Preferences.sublime-settings")
class MakeThreeColumnsCommand(sublime_plugin.WindowCommand):
def run(self):
# load the settings to transfer
res = sublime.load_resource(
"Packages/Colonnade/ThreeCol.sublime-settings")
my_settings = sublime.decode_value(res)
# transfer the settings to the user settings
user_settings = sublime.load_settings("Preferences.sublime-settings")
for k, v in my_settings.items():
user_settings.set(k, v)
# save the user settings
sublime.save_settings("Preferences.sublime-settings")
class MakeFourColumnsCommand(sublime_plugin.WindowCommand):
def run(self):
# load the settings to transfer
res = sublime.load_resource(
"Packages/Colonnade/FourCol.sublime-settings")
my_settings = sublime.decode_value(res)
# transfer the settings to the user settings
user_settings = sublime.load_settings("Preferences.sublime-settings")
for k, v in my_settings.items():
user_settings.set(k, v)
# save the user settings
sublime.save_settings("Preferences.sublime-settings")