Skip to content

Commit fbda0a6

Browse files
committed
Merge branch 'dev'; Release 1.8.0
2 parents d6e6f4d + 034f8de commit fbda0a6

10 files changed

Lines changed: 324 additions & 187 deletions

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
File History Changelog
22
======================
33

4+
v1.8.0 (2016-04-06)
5+
-------------------
6+
7+
- Now properly handles situations where the to-be-previewed or -opened file
8+
already existed in another group (#23)
9+
- Added new setting `reopen_file_in_current_group` to control this behavior
10+
- The parameter for instantly opening the most recently closed file has changed
11+
(see README.md if you are affected)
12+
- Fixed a bug where the panel closed the current file if all files in the panel
13+
were currently open (#34) (@lastsecondsave)
14+
- Fixed various edge cases including races in the preview involving quick-
15+
opening or deleting the selected entry (@rahul-ramadas)
16+
- Only quick-open the selected entry if the caret is at the end of text
17+
- Don't print "reloading" message during initial load
18+
- Don't clean anonymous projects on ST3 as long as they remain open
19+
420
v1.7.1 (2015-01-29)
521
-------------------
622

Default (Linux).sublime-keymap

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
[
2-
{ "keys": ["ctrl+shift+t"], "command": "open_recently_closed_file", "args": {"show_quick_panel": false} },
2+
{ "keys": ["ctrl+shift+t"], "command": "open_recently_closed_file", "args": {"action": "open_latest_closed"} },
33
{ "keys": ["ctrl+alt+t"], "command": "open_recently_closed_file" },
44
{ "keys": ["ctrl+alt+shift+t"], "command": "open_recently_closed_file", "args": {"current_project_only": false} },
5-
{ "keys": ["right"], "command": "quick_open_file_history", "context": [
6-
{ "key": "overlay_visible", "operator": "equal", "operand": true },
7-
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
5+
{ "keys": ["right"], "command": "open_recently_closed_file", "args": {"action": "quick_open_current_entry"},
6+
"context": [
7+
{ "key": "overlay_visible" },
8+
{ "key": "file_history_overlay_visible" },
9+
{ "key": "following_text", "operator": "regex_match", "operand": "^$" }
810
]},
9-
{ "keys": ["ctrl+delete"], "command": "delete_file_history_entry", "context": [
10-
{ "key": "overlay_visible", "operator": "equal", "operand": true },
11-
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
11+
{ "keys": ["ctrl+delete"], "command": "open_recently_closed_file", "args": {"action": "delete_current_entry"},
12+
"context": [
13+
{ "key": "overlay_visible" },
14+
{ "key": "file_history_overlay_visible" }
1215
]}
1316
]

Default (OSX).sublime-keymap

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
[
2-
{ "keys": ["super+shift+t"], "command": "open_recently_closed_file", "args": {"show_quick_panel": false} },
2+
{ "keys": ["super+shift+t"], "command": "open_recently_closed_file", "args": {"action": "open_latest_closed"} },
33
{ "keys": ["super+alt+t"], "command": "open_recently_closed_file" },
44
{ "keys": ["super+alt+shift+t"], "command": "open_recently_closed_file", "args": {"current_project_only": false} },
5-
{ "keys": ["right"], "command": "quick_open_file_history", "context": [
6-
{ "key": "overlay_visible", "operator": "equal", "operand": true },
7-
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
5+
{ "keys": ["right"], "command": "open_recently_closed_file", "args": {"action": "quick_open_current_entry"},
6+
"context": [
7+
{ "key": "overlay_visible" },
8+
{ "key": "file_history_overlay_visible" },
9+
{ "key": "following_text", "operator": "regex_match", "operand": "^$" }
810
]},
9-
{ "keys": ["super+delete"], "command": "delete_file_history_entry", "context": [
10-
{ "key": "overlay_visible", "operator": "equal", "operand": true },
11-
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
11+
{ "keys": ["super+delete"], "command": "open_recently_closed_file", "args": {"action": "delete_current_entry"},
12+
"context": [
13+
{ "key": "overlay_visible" },
14+
{ "key": "file_history_overlay_visible" }
1215
]}
1316
]

Default (Windows).sublime-keymap

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
[
2-
{ "keys": ["ctrl+shift+t"], "command": "open_recently_closed_file", "args": {"show_quick_panel": false} },
2+
{ "keys": ["ctrl+shift+t"], "command": "open_recently_closed_file", "args": {"action": "open_latest_closed"} },
33
{ "keys": ["ctrl+alt+t"], "command": "open_recently_closed_file" },
44
{ "keys": ["ctrl+alt+shift+t"], "command": "open_recently_closed_file", "args": {"current_project_only": false} },
5-
{ "keys": ["right"], "command": "quick_open_file_history", "context": [
6-
{ "key": "overlay_visible", "operator": "equal", "operand": true },
7-
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
5+
{ "keys": ["right"], "command": "open_recently_closed_file", "args": {"action": "quick_open_current_entry"},
6+
"context": [
7+
{ "key": "overlay_visible" },
8+
{ "key": "file_history_overlay_visible" },
9+
{ "key": "following_text", "operator": "regex_match", "operand": "^$" }
810
]},
9-
{ "keys": ["ctrl+delete"], "command": "delete_file_history_entry", "context": [
10-
{ "key": "overlay_visible", "operator": "equal", "operand": true },
11-
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
11+
{ "keys": ["ctrl+delete"], "command": "open_recently_closed_file", "args": {"action": "delete_current_entry"},
12+
"context": [
13+
{ "key": "overlay_visible" },
14+
{ "key": "file_history_overlay_visible" }
1215
]}
1316
]

Default.sublime-commands

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,20 @@
2525

2626
// File History commands
2727
{
28-
"caption": "File History: Open recently closed file (Current Project)",
28+
"caption": "File History: Open most recently closed file",
2929
"command": "open_recently_closed_file",
3030
"args": {
31-
"show_quick_panel": true,
32-
"current_project_only": true
31+
"action": "open_latest_closed"
3332
}
3433
},
3534
{
36-
"caption": "File History: Open recently closed file (All Projects)",
35+
"caption": "File History: Open recently closed file… (Current Project)",
36+
"command": "open_recently_closed_file"
37+
},
38+
{
39+
"caption": "File History: Open recently closed file… (All Projects)",
3740
"command": "open_recently_closed_file",
3841
"args": {
39-
"show_quick_panel": true,
4042
"current_project_only": false
4143
}
4244
},

FileHistory.sublime-settings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
// Should we show a preview of the history entries?
2525
"show_file_preview": true,
2626

27+
// Re-open a file in the current group if it is already open in another one?
28+
"reopen_file_in_current_group": false,
29+
2730
// Remove any non-existent files from the history (when previewed or
2831
// opened).
2932
"remove_non_existent_files_on_preview": false,

README.md

Lines changed: 78 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,83 @@
11
# SublimeText - File History #
22

3-
**Sublime Text 2 and 3** plugin to provide access to the history of accessed files - project-wise or globally. The most recently closed file can be instantly re-opened with a keyboard shortcut or the user can search through the entire file history within the quick panel (including file preview and the ability to open multiple files).
3+
**Sublime Text 2 and 3** plugin
4+
to provide access to the history of recently used files -
5+
project-wise or globally.
46

5-
![Example Image][img2]
7+
The most recently closed file
8+
can be instantly re-opened
9+
or the entire file history
10+
can be shown and filtered in a quick panel
11+
(including file preview
12+
and the ability to open multiple files).
613

14+
![Preview Image][preview-img]
715

8-
## Features ##
9-
10-
Keeps a history of the files that you have accessed in SublimeText (on both a per-project and global level). The most recently closed file can be instantly re-opened with a keyboard shortcut or the user can search through the entire file history in the quick panel.
1116

12-
Overview of features:
17+
## Features ##
1318

14-
* [FileHistory.sublime-settings][] file to customize functionality
15-
* When re-opening a file from the history, choose the position to open it in: the `first` tab, the `last` tab, the `next` tab or in the position that it was when it was closed
16-
* Display a preview of the file while looking through the file history in the quick panel (only Sublime Text 3)
17-
* Choose target location where the file history should be saved
18-
* Optionally remove any non-existent files while looking through the file history (when previewed or opened) or on start-up
19-
* Open multiple history entries from the quick panel with the <kbd>Right</kbd> key
20-
* Delete history entries from the quick panel with <kbd>Ctrl+Del</kbd>
21-
* Path exclude and re-include patterns (regex) that can be extended in project settings
19+
* Reopen the most recently closed file
20+
or open a quick panel of recently used files
21+
to choose from
22+
* Display a preview of the file
23+
while browsing the quick panel
24+
(only Sublime Text 3)
25+
* Open multiple history entries
26+
from the quick panel
27+
with the <kbd>Right</kbd> key
28+
* Delete history entries from the quick panel
29+
with <kbd>Ctrl + Del</kbd>
30+
* Optionally remove any non-existent files
31+
while looking through the file history
32+
(when previewed or opened)
33+
or on start-up
34+
* Creates backups
35+
in case you lose your history
36+
* Highly configurable through [FileHistory.sublime-settings][] file,
37+
like excluding files with regex patterns
2238

2339

2440
## Installation ##
2541

26-
Install [Package Control][pck-ctrl]. Once installed, bring up the Command Palette (`Command-Shift-P` on OS X, `Ctrl-Shift-P` on Linux/Windows). Select `Package Control: Install Package` and then select `File History` when the list appears. Package Control will automagically keep the plugin up to date with the latest version.
27-
28-
29-
## Usage ##
42+
1. Install [Package Control][pck-ctrl].
43+
2. Once installed,
44+
bring up the Command Palette
45+
(`Command-Shift-P` on OS X, `Ctrl-Shift-P` on Linux/Windows).
46+
3. Select `Package Control: Install Package`
47+
and then select `File History` when the list appears.
3048

31-
To use the plugin, open the Command Palette and search for `File History:`.
49+
Package Control will automagically keep the plugin up to date.
3250

33-
When you opened a panel you can use the <kbd>right</kbd> key to open the file and keep the panel open, or <kbd>Ctrl/Cmd</kbd> + <kbd>delete</kbd> to remove the selected file from the history.
3451

35-
For default keymap definitions, see [Default.sublime-keymap][keymap] ([OSX][keymap-osx]).
52+
## Usage ##
3653

37-
For the available and default settings, see [FileHistory.sublime-settings][].
54+
To use the plugin,
55+
open the Command Palette
56+
and search for `File History:`.
3857

39-
### Images ###
58+
When you opened a panel
59+
you can use the <kbd>Right</kbd> key
60+
to open the file and keep the panel open,
61+
or <kbd>Ctrl/Cmd + Del</kbd>
62+
to remove the selected file from the history.
4063

41-
*The popup for the current project only*
42-
![example1][img1]
64+
For default keymap definitions,
65+
see [Default.sublime-keymap][keymap] ([OSX][keymap-osx]).
4366

44-
*The popup for the global history with text*
45-
![example1][img2]
67+
For the available and default settings,
68+
see [FileHistory.sublime-settings][].
4669

4770
### Project Settings ###
4871

49-
You can **extend** the `path_exclude_patterns` and `path_reinclude_patterns` lists in your project settings.
72+
You can **extend**
73+
the `path_exclude_patterns` and `path_reinclude_patterns` lists
74+
in your project settings.
5075

51-
For this, add a `"file_history"` dictionary to your project's settings and then one or both of the settings to that. Example:
76+
For this,
77+
add a `"file_history"` dictionary
78+
to your project's settings
79+
and then one or both of the settings to that.
80+
Example:
5281

5382
```json
5483
{
@@ -70,25 +99,34 @@ For this, add a `"file_history"` dictionary to your project's settings and then
7099

71100
**open_recently_closed_file** (Window)
72101

73-
Opens a popup with recently closed files or reopens the lastly closed view if `show_quick_panel == False`.
74-
75-
> *Parameters*
102+
Opens a popup with recently closed files
103+
or reopens the lastly closed view
104+
if `action == "open_latest_closed"`.
76105

77-
> - **show_quick_panel** (bool) - *Default*: `True`
78-
79-
> - **current_project_only** (bool) - *Default*: `True`
106+
> *Parameters*
107+
>
108+
> - **action** (str) -
109+
> *Default*: `"show_history"`,
110+
> *Allowed values*: `"show_history"`, `"open_latest_closed"`
111+
>
112+
> - **current_project_only** (bool) -
113+
> *Default*: `True`
80114
81115
**cleanup_file_history** (Window)
82116

83-
Checks the current project or the whole history for non-existent files and removes them from the history kept.
117+
Checks the current project
118+
or the whole history
119+
for non-existent files
120+
and removes them from the history.
84121

85122
> *Parameters*
86-
87-
> - **current_project_only** (bool) - *Default*: `True`
123+
>
124+
> - **current_project_only** (bool) -
125+
> *Default*: `True`
88126
89127
**reset_file_history** (Window)
90128

91-
Removes all file history data.
129+
Removes all history data.
92130

93131

94132
[github]: https://github.com/FichteFoll/sublimetext-filehistory "Github.com: FichteFoll/sublime-filehistory"
@@ -99,5 +137,4 @@ Removes all file history data.
99137
[keymap]: Default.sublime-keymap "Default.sublime-keymap"
100138
[keymap-osx]: Default%20%28OSX%29.sublime-keymap "Default (OSX).sublime-keymap"
101139

102-
[img1]: http://i.imgur.com/B5ViHHv.png
103-
[img2]: http://i.imgur.com/y40CEFo.png
140+
[preview-img]: https://cloud.githubusercontent.com/assets/931051/14301433/2178c37c-fb98-11e5-8f70-f2e032d3479f.gif

0 commit comments

Comments
 (0)