diff --git a/KeymapManager.py b/KeymapManager.py index 085d994..0a31565 100644 --- a/KeymapManager.py +++ b/KeymapManager.py @@ -31,6 +31,7 @@ def run(self, edit): dirs.sort(key=lambda x: x.lower()) plugins = [] ignored_packages = settings.get("ignored_packages") + single_max_nums = int(settings.get("single_max_nums")) for name in dirs: if name in ignored_packages: continue @@ -55,7 +56,7 @@ def run(self, edit): i = 0 for item in jsonData: #only show 3 items if num max than 3 - if i >= 3: + if single_max_nums > 0 and i >= single_max_nums : break if "keys" not in item or "command" not in item: continue diff --git a/KeymapManager.pyc b/KeymapManager.pyc index a1bfd55..84cddf4 100644 Binary files a/KeymapManager.pyc and b/KeymapManager.pyc differ diff --git a/KeymapManager.sublime-settings b/KeymapManager.sublime-settings index 62a4ae7..aa63c1b 100644 --- a/KeymapManager.sublime-settings +++ b/KeymapManager.sublime-settings @@ -1,3 +1,4 @@ { - "ignored_packages": ["CSS", "Vintage", "User", "Default", "KeymapManager"] + "ignored_packages": ["CSS", "Vintage", "User", "Default", "KeymapManager"], + "single_max_nums": 3 } \ No newline at end of file