├── .no-sublime-package
├── messages.json
├── BetterFindBuffer.sublime-settings
├── messages
├── install.txt
└── 1.0.0.txt
├── Find Results.sublime-settings
├── Symbol List - Find Results.tmPreferences
├── Symbol List - Find Results Header.tmPreferences
├── LICENSE
├── Main.sublime-menu
├── shortcuts.html
├── Default.sublime-keymap
├── README.md
├── Find Results.hidden-tmLanguage
├── FindResults.hidden-tmTheme
└── find_results.py
/.no-sublime-package:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/messages.json:
--------------------------------------------------------------------------------
1 | {
2 | "install": "messages/install.txt"
3 | }
--------------------------------------------------------------------------------
/BetterFindBuffer.sublime-settings:
--------------------------------------------------------------------------------
1 | {
2 | "readonly": true,
3 | "fold_path_prefix": true
4 | }
5 |
--------------------------------------------------------------------------------
/messages/install.txt:
--------------------------------------------------------------------------------
1 | Thank you for installing BetterFindBuffer.
2 |
3 | You need to *restart* your SublimeText for this plugin to work.
4 |
--------------------------------------------------------------------------------
/Find Results.sublime-settings:
--------------------------------------------------------------------------------
1 | {
2 | "color_scheme": "Packages/BetterFindBuffer/FindResults.hidden-tmTheme",
3 | "draw_indent_guides": false,
4 | "gutter": false,
5 | "margin": 8,
6 | "rulers": [],
7 | "spell_check": false,
8 | "word_wrap": true
9 | }
10 |
--------------------------------------------------------------------------------
/messages/1.0.0.txt:
--------------------------------------------------------------------------------
1 | BetterFindBuffer version 1.0.0
2 |
3 | You need to *restart* SublimeText.
4 |
5 | Changelog:
6 | ● Configurable readonly settings
7 | ● Open multiple files with multiple cursor
8 | ● Jump by match instead of by search result. a more reliable `j` and `k` movements
9 | ● Open all files in the result with `a`
10 | ● Fold a result with `f` and move to next file
11 | ● Show shortcuts with `?`
12 | ● Remove path prefix in filenames based on open sublime's project folders
13 |
--------------------------------------------------------------------------------
/Symbol List - Find Results.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Symbol List: File Heading
7 | scope
8 | entity.name.filename.find-in-files
9 | settings
10 |
11 | showInSymbolList
12 | 1
13 | showInIndexedSymbolList
14 | 0
15 |
16 | uuid
17 | f2640a36-68f2-42ee-bba6-d34296c15594
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Symbol List - Find Results Header.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Symbol List: Search Heading
7 | scope
8 | text.find-in-files header.find-in-files
9 | settings
10 |
11 | showInSymbolList
12 | 1
13 | symbolTransformation
14 |
15 | s/Searching \d+ files for "(.+?)"(.+)?$/Search: \1 —————————————————————————/g;
16 |
17 | showInIndexedSymbolList
18 | 0
19 |
20 | uuid
21 | f2640a36-68f2-42ee-bba6-d34296c15594
22 |
23 |
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 Allen Bargi (https://twitter.com/aziz)
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
--------------------------------------------------------------------------------
/Main.sublime-menu:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "preferences",
4 | "children": [{
5 | "caption": "Package Settings",
6 | "mnemonic": "P",
7 | "id": "package-settings",
8 | "children": [{
9 | "caption": "BetterFindBuffer",
10 | "children": [
11 | {
12 | "command": "open_file",
13 | "args": {
14 | "file": "${packages}/BetterFindBuffer/BetterFindBuffer.sublime-settings"
15 | },
16 | "caption": "Settings – Default"
17 | },
18 | {
19 | "command": "open_file",
20 | "args": {
21 | "file": "${packages}/User/BetterFindBuffer.sublime-settings"
22 | },
23 | "caption": "Settings – User"
24 | },
25 | {
26 | "caption": "-"
27 | },
28 | {
29 | "command": "open_file",
30 | "args": {
31 | "file": "${packages}/BetterFindBuffer/Find Results.sublime-settings"
32 | },
33 | "caption": "Find Results Settings – Default"
34 | },
35 | {
36 | "command": "open_file",
37 | "args": {
38 | "file": "${packages}/User/Find Results.sublime-settings"
39 | },
40 | "caption": "Find Results Settings – User"
41 | }
42 | ]
43 | }]
44 | }]
45 | }
46 | ]
47 |
--------------------------------------------------------------------------------
/shortcuts.html:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
23 |
24 | enter open the file under the cursor
25 | o open the file under the cursor
26 | a open all files
27 | j jump to next search result
28 | k jump to previous search result
29 | n scroll to next file
30 | p scroll to previous file
31 | f fold this file and move to the first match on next file
32 | ? show this shortcuts help
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/Default.sublime-keymap:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "keys": ["enter"],
4 | "command": "find_in_files_open_file",
5 | "context": [
6 | { "key": "selector", "operator": "equal", "operand": "text.find-in-files" }
7 | ]
8 | },
9 | {
10 | "keys": ["o"],
11 | "command": "find_in_files_open_file",
12 | "context": [
13 | { "key": "selector", "operator": "equal", "operand": "text.find-in-files" }
14 | ]
15 | },
16 | {
17 | "keys": ["a"],
18 | "command": "find_in_files_open_all_files",
19 | "context": [
20 | { "key": "selector", "operator": "equal", "operand": "text.find-in-files" }
21 | ]
22 | },
23 | {
24 | "keys": ["n"],
25 | "command": "find_in_files_jump_file",
26 | "context": [
27 | { "key": "selector", "operator": "equal", "operand": "text.find-in-files" }
28 | ]
29 | },
30 | {
31 | "keys": ["p"],
32 | "command": "find_in_files_jump_file",
33 | "args": { "forward": false },
34 | "context": [
35 | { "key": "selector", "operator": "equal", "operand": "text.find-in-files" }
36 | ]
37 | },
38 | {
39 | "keys": ["j"],
40 | "command": "find_in_files_jump_match",
41 | "context": [
42 | { "key": "selector", "operator": "equal", "operand": "text.find-in-files" }
43 | ]
44 | },
45 | {
46 | "keys": ["k"],
47 | "command": "find_in_files_jump_match",
48 | "args": { "forward": false },
49 | "context": [
50 | { "key": "selector", "operator": "equal", "operand": "text.find-in-files" }
51 | ]
52 | },
53 | {
54 | "keys": ["f"],
55 | "command": "bfb_fold_and_move_to_next_file",
56 | "context": [
57 | {"key": "selector", "operator": "equal", "operand": "text.find-in-files" }
58 | ]
59 | },
60 | {
61 | "keys": ["?"],
62 | "command": "bfb_toggle_popup_help",
63 | "context": [
64 | {"key": "selector", "operator": "equal", "operand": "text.find-in-files" }
65 | ]
66 | }
67 | ]
68 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # BetterFindBuffer for SublimeText 3
2 | Adds a couple of missing features to SublimeText Find Results buffer.
3 |
4 | **Note**: You need to *restart* your SublimeText after installing this plugin.
5 |
6 | ## Features
7 | - Open the the file and line under the cursor by pressing Enter or o
8 | - n and p to jump to next/previous file
9 | - j and k to jump to next/previous match
10 | - Open multiple files with multiple cursor at the same time by selecting lines and pressing Enter or o
11 | - Open all files in the result with a
12 | - Fold a result with f and move to next file
13 | - Show shortcuts with ?
14 | - Remove path prefix in filenames based on open sublime's project folders (can be disabled in settings)
15 | - Set find results as readonly (can be disabled in settings)
16 | - Adds search keyword and file names to the symbols list (use Super+R)
17 | - Cleaner UI (hides line numbers, gutter, indent guides)
18 | - Better Syntax highlighting for find results
19 | - Custom color scheme
20 |
21 | 
22 |
23 | 
24 |
25 | ## Installation
26 | You can install via [Sublime Package Control](http://wbond.net/sublime_packages/package_control)
27 | Or you can clone this repo into your Sublime Text Packages folder.
28 |
29 | ## Changing color scheme
30 | If you don't like colors used in the find results buffer just copy [this file](https://github.com/aziz/BetterFindBuffer/blob/master/FindResults.hidden-tmTheme) to your User folder, change colors and save it and then create a file called `Find Results.sublime-settings` in your User folder and paste the code below:
31 |
32 | ``` json
33 | {
34 | "color_scheme": "Path to your custom color scheme file. e.g. Packages/User/Custom_FindResults.hidden-tmTheme",
35 | }
36 | ```
37 |
38 | Alternatively, you can use [BetterFindBuffer-Designer](http://bobtherobot.github.io/BetterFindBuffer-Designer/) tool as GUI to easily customize the Find-Results color scheme.
39 |
40 | ### Credit
41 | `FindInFilesOpenFileCommand` is inspired by [this answer on StackOverflow](http://stackoverflow.com/a/16779397/78254)
42 |
43 | #### License
44 | See the LICENSE file
45 |
--------------------------------------------------------------------------------
/Find Results.hidden-tmLanguage:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Find Results
7 |
8 | patterns
9 |
10 |
11 |
12 | match
13 | ^([^ ].*:\n)$
14 | captures
15 |
16 | 1
17 |
18 | name
19 | entity.name.filename.find-in-files
20 |
21 |
22 |
23 |
24 |
25 | match
26 | ^( +[0-9]+)
27 | captures
28 |
29 | 1
30 |
31 | name
32 | constant.numeric.line-number.find-in-files
33 |
34 |
35 |
36 |
37 |
38 | match
39 | ^( +[0-9]+)(:)(.+\n)$
40 | captures
41 |
42 | 1
43 |
44 | name
45 | constant.numeric.line-number.match.find-in-files
46 |
47 | 2
48 |
49 | name
50 | punctuation.line-number.match.find-in-files
51 |
52 | 3
53 |
54 | name
55 | match.find-in-files
56 |
57 |
58 |
59 |
60 |
61 |
62 | match
63 | ^ +(\.{2,10}+)$
64 | captures
65 |
66 | 1
67 |
68 | name
69 | constant.numeric.line-number.find-in-files
70 |
71 |
72 |
73 |
74 |
75 | match
76 | ^Searching (\d+) file(?:s)? for (".+")(.+)?$
77 | name
78 | header.find-in-files
79 | captures
80 |
81 | 1
82 |
83 | name
84 | variable.total_files_count.find-in-files
85 |
86 | 2
87 |
88 | name
89 | string.query.find-in-files
90 |
91 |
92 |
93 |
94 |
95 | match
96 | ^(\d+) match(?:es)? (?:across|in) (\d+) file(?:s)?\n
97 | name
98 | footer.find-in-files
99 | captures
100 |
101 | 1
102 |
103 | name
104 | variable.matched_count.find-in-files
105 |
106 | 2
107 |
108 | name
109 | variable.matched_files_count.find-in-files
110 |
111 | 3
112 |
113 | name
114 | sep.find-in-files
115 |
116 |
117 |
118 |
119 |
120 | match
121 | ^(0) matches\n
122 | name
123 | footer.find-in-files
124 | captures
125 |
126 | 1
127 |
128 | name
129 | variable.no_matches.find-in-files
130 |
131 |
132 |
133 |
134 |
135 | match
136 | ^(0) matches
137 | captures
138 |
139 | 1
140 |
141 | name
142 | variable.no_matches.find-in-files
143 |
144 |
145 |
146 |
147 |
148 | scopeName
149 | text.find-in-files
150 |
151 |
152 |
--------------------------------------------------------------------------------
/FindResults.hidden-tmTheme:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Sublime Find Results
7 | settings
8 |
9 |
10 | settings
11 |
12 | background
13 | #f8f8f8
14 |
15 | foreground
16 | #444444
17 |
18 | caret
19 | #FF750F
20 |
21 | invisibles
22 | #44444466
23 |
24 | lineHighlight
25 | #00000022
26 |
27 | selection
28 | #FFDE25
29 |
30 | selectionBorder
31 | #FFDE25
32 |
33 | selectionForeground
34 | #444444
35 |
36 | findHighlightForeground
37 | #000000
38 |
39 |
40 |
41 |
42 |
43 | scope
44 | variable.total_files_count.find-in-files
45 | settings
46 |
47 | foreground
48 | #4078c0
49 | fontStyle
50 | bold
51 |
52 |
53 |
54 |
55 | scope
56 | string.query.find-in-files
57 | settings
58 |
59 | foreground
60 | #009121
61 | fontStyle
62 | bold
63 |
64 |
65 |
66 |
67 | scope
68 | variable.matched_count.find-in-files
69 | settings
70 |
71 | foreground
72 | #009121
73 | fontStyle
74 | bold
75 |
76 |
77 |
78 |
79 | scope
80 | variable.matched_files_count.find-in-files
81 | settings
82 |
83 | foreground
84 | #4078c0
85 | fontStyle
86 | bold
87 |
88 |
89 |
90 |
91 | scope
92 | variable.no_matches.find-in-files
93 | settings
94 |
95 | foreground
96 | #ff0000
97 | fontStyle
98 | bold
99 |
100 |
101 |
102 |
103 | scope
104 | constant.numeric.line-number.find-in-files
105 | settings
106 |
107 | foreground
108 | #44444433
109 |
110 |
111 |
112 |
113 | scope
114 | match.find-in-files
115 | settings
116 |
117 | background
118 | #FFD42033
119 |
120 |
121 |
122 |
123 |
124 | scope
125 | constant.numeric.line-number.match.find-in-files
126 | settings
127 |
128 | foreground
129 | #444444
130 | background
131 | #FFD42066
132 |
133 |
134 |
135 |
136 | scope
137 | punctuation.line-number.match.find-in-files
138 | settings
139 |
140 | foreground
141 | #FFD42044
142 | background
143 | #FFD42044
144 |
145 |
146 |
147 |
148 |
149 | scope
150 | entity.name.filename.find-in-files
151 | settings
152 |
153 | foreground
154 | #f8f8f8
155 | background
156 | #4078c0
157 | fontStyle
158 | bold
159 |
160 |
161 |
162 |
163 | scope
164 | footer.find-in-files
165 | settings
166 |
167 | background
168 | #33333322
169 |
170 |
171 |
172 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/find_results.py:
--------------------------------------------------------------------------------
1 | import sublime
2 | import sublime_plugin
3 | import re, os, shutil
4 |
5 | class FindInFilesOpenFileCommand(sublime_plugin.TextCommand):
6 | def run(self, edit):
7 | view = self.view
8 | for sel in view.sel():
9 | line_no = self.get_line_no(sel)
10 | file_name = self.get_file(sel)
11 | if line_no and file_name:
12 | file_loc = "%s:%s" % (file_name, line_no)
13 | view.window().open_file(file_loc, sublime.ENCODED_POSITION)
14 | elif file_name:
15 | view.window().open_file(file_name)
16 |
17 | def get_line_no(self, sel):
18 | view = self.view
19 | line_text = view.substr(view.line(sel))
20 | match = re.match(r"\s*(\d+).+", line_text)
21 | if match:
22 | return match.group(1)
23 | return None
24 |
25 | def get_file(self, sel):
26 | view = self.view
27 | line = view.line(sel)
28 | while line.begin() > 0:
29 | line_text = view.substr(line)
30 | match = re.match(r"(.+):$", line_text)
31 | if match:
32 | if os.path.exists(match.group(1)):
33 | return match.group(1)
34 | line = view.line(line.begin() - 1)
35 | return None
36 |
37 |
38 | class FindInFilesOpenAllFilesCommand(sublime_plugin.TextCommand):
39 | def run(self, edit):
40 | view = self.view
41 | if view.name() == "Find Results":
42 | for file_name in self.get_files():
43 | view.window().open_file(file_name, sublime.ENCODED_POSITION)
44 |
45 | def get_files(self):
46 | view = self.view
47 | content = view.substr(sublime.Region(0, view.size()))
48 | return [match.group(1) for match in re.finditer(r"^([^\s].+):$", content, re.MULTILINE)]
49 |
50 |
51 | class FindInFilesJumpFileCommand(sublime_plugin.TextCommand):
52 | def run(self, edit, forward=True):
53 | v = self.view
54 | files = v.find_by_selector("entity.name.filename.find-in-files")
55 | caret = v.sel()[0]
56 |
57 |
58 | class FindInFilesJumpCommand(sublime_plugin.TextCommand):
59 | def run(self, edit, forward=True, cycle=True):
60 | caret = self.view.sel()[0]
61 | matches = self.filter_matches(caret, self.find_matches())
62 | if forward:
63 | match = self.find_next_match(caret, matches, cycle)
64 | else:
65 | match = self.find_prev_match(caret, matches, cycle)
66 | if match:
67 | self.goto_match(match)
68 |
69 | def find_next_match(self, caret, matches, cycle):
70 | default = matches[0] if cycle and len(matches) else None
71 | return next((m for m in matches if caret.begin() < m.begin()), default)
72 |
73 | def filter_matches(self, caret, matches):
74 | footers = self.view.find_by_selector('footer.find-in-files')
75 | lower_bound = next((f.end() for f in reversed(footers) if f.end() < caret.begin()), 0)
76 | upper_bound = next((f.end() for f in footers if f.end() > caret.begin()), self.view.size())
77 | return [m for m in matches if m.begin() > lower_bound and m.begin() < upper_bound]
78 |
79 | def find_prev_match(self, caret, matches, cycle):
80 | default = matches[-1] if cycle and len(matches) else None
81 | return next((m for m in reversed(matches) if caret.begin() > m.begin()), default)
82 |
83 | def goto_match(self, match):
84 | self.view.sel().clear()
85 | self.view.sel().add(match)
86 | if self.view.is_folded(self.view.sel()[0]):
87 | self.view.unfold(self.view.sel()[0])
88 |
89 |
90 | class FindInFilesJumpFileCommand(FindInFilesJumpCommand):
91 | def find_matches(self):
92 | return self.view.find_by_selector('entity.name.filename.find-in-files')
93 |
94 | def goto_match(self, match):
95 | v = self.view
96 | region = sublime.Region(match.begin(), match.begin())
97 | super(FindInFilesJumpFileCommand, self).goto_match(region)
98 | top_offset = v.text_to_layout(region.begin())[1] - v.line_height()
99 | v.set_viewport_position((0, top_offset), True)
100 |
101 |
102 | class FindInFilesJumpMatchCommand(FindInFilesJumpCommand):
103 | def find_matches(self):
104 | return self.view.get_regions('match')
105 |
106 | def goto_match(self, match):
107 | v = self.view
108 | super(FindInFilesJumpMatchCommand, self).goto_match(match)
109 | vx, vy = v.viewport_position()
110 | vw, vh = v.viewport_extent()
111 | x, y = v.text_to_layout(match.begin())
112 | h = v.line_height()
113 | if y < vy or y + h > vy + vh:
114 | v.show_at_center(match)
115 |
116 |
117 | class BfbClearFilePathCommand(sublime_plugin.TextCommand):
118 | def run(self, edit):
119 | folders = sublime.active_window().folders()
120 | for folder in folders:
121 | path, folder_name = os.path.split(folder)
122 | regions = self.view.find_all(path)
123 | for r in reversed(regions):
124 | self.view.fold(sublime.Region(r.a, r.b+1))
125 |
126 |
127 | class BfbTogglePopupHelpCommand(sublime_plugin.TextCommand):
128 | def run(self, edit):
129 | popup_max_width = 800
130 | popup_max_height = 800
131 | html = sublime.load_resource("Packages/BetterFindBuffer/shortcuts.html")
132 | self.view.show_popup(html, 0, -1, popup_max_width, popup_max_height)
133 |
134 |
135 | class BfbFoldAndMoveToNextFileCommand(sublime_plugin.TextCommand):
136 | def run(self, edit):
137 | begin = self.get_begin()
138 | end = self.get_end()
139 | self.view.fold(sublime.Region(begin.b + 1, end.a - 1))
140 | sublime.set_timeout_async(self.move_to_next, 0)
141 |
142 | def move_to_next(self):
143 | self.view.run_command('find_in_files_jump_file')
144 | self.view.run_command('find_in_files_jump_match')
145 |
146 | def get_begin(self):
147 | view = self.view
148 | if len(view.sel()) == 1:
149 | line = view.line(view.sel()[0])
150 | while line.begin() > 0:
151 | line_text = view.substr(line)
152 | match = re.match(r"\S(.+):$", line_text)
153 | if match:
154 | return(line)
155 | line = view.line(line.begin() - 1)
156 | return None
157 |
158 | def get_end(self):
159 | view = self.view
160 | if len(view.sel()) == 1:
161 | line = view.line(view.sel()[0])
162 | while line.end() <= view.size():
163 | line_text = view.substr(line)
164 | if len(line_text) == 0:
165 | return(line)
166 | line = view.line(line.end() + 1)
167 | return None
168 |
169 |
170 | class FindInFilesSetReadOnly(sublime_plugin.EventListener):
171 | def is_find_results(self, view):
172 | syntax = view.settings().get('syntax', '')
173 | if syntax:
174 | return syntax.endswith("Find Results.hidden-tmLanguage")
175 |
176 | def on_activated_async(self, view):
177 | if self.is_find_results(view):
178 | settings = sublime.load_settings('BetterFindBuffer.sublime-settings')
179 | if settings.get('fold_path_prefix', True):
180 | view.run_command('bfb_clear_file_path')
181 | view.set_read_only(settings.get('readonly', True))
182 |
183 | def on_deactivated_async(self, view):
184 | if self.is_find_results(view):
185 | view.set_read_only(False)
186 |
187 |
188 | # Some plugins like **Color Highlighter** are forcing their color-scheme to the activated view
189 | # Although, it's something that should be fixed on their side, in the meantime, it's safe to force
190 | # the color shceme on `on_activated_async` event.
191 | class BFBForceColorSchemeCommand(sublime_plugin.EventListener):
192 | def on_activated_async(self, view):
193 | syntax = view.settings().get('syntax')
194 | if syntax and (syntax.endswith("Find Results.hidden-tmLanguage")):
195 | settings = sublime.load_settings('Find Results.sublime-settings')
196 | color_scheme = settings.get('color_scheme')
197 | if color_scheme:
198 | view.settings().set('color_scheme', color_scheme)
199 |
200 |
201 | def plugin_loaded():
202 | default_package_path = os.path.join(sublime.packages_path(), "Default")
203 |
204 | if not os.path.exists(default_package_path):
205 | os.makedirs(default_package_path)
206 |
207 | source_path = os.path.join(sublime.packages_path(), "BetterFindBuffer", "Find Results.hidden-tmLanguage")
208 | destination_path = os.path.join(default_package_path, "Find Results.hidden-tmLanguage")
209 |
210 | if os.path.isfile(destination_path):
211 | os.unlink(destination_path)
212 |
213 | shutil.copy(source_path, default_package_path)
214 |
215 |
216 | def plugin_unloaded():
217 | default_package_path = os.path.join(sublime.packages_path(), "Default")
218 | destination_path = os.path.join(default_package_path, "Find Results.hidden-tmLanguage")
219 | if os.path.exists(default_package_path) and os.path.isfile(destination_path):
220 | os.remove(destination_path)
221 |
--------------------------------------------------------------------------------