Skip to content

Commit e498e1d

Browse files
committed
Add recent files to command palette
1 parent 95dd55a commit e498e1d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

client/core/search/files.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,24 @@ define([
3131
}, this)));
3232
});
3333
});
34+
35+
// Search for recent opned files
36+
search.handler({
37+
'id': "recentfiles",
38+
'title': "Recent Files"
39+
}, function(query) {
40+
return files.recent.map(function(file) {
41+
return {
42+
"category": "Recent Files",
43+
"title": file.path(),
44+
"position": 0,
45+
"icons": {
46+
"search": "file-o"
47+
},
48+
"action": _.bind(function() {
49+
files.open(file);
50+
}, this)
51+
};
52+
});
53+
});
3454
});

0 commit comments

Comments
 (0)