Skip to content

Commit

Permalink
Merge branch 'dev'; Release 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FichteFoll committed Apr 5, 2016
2 parents d6e6f4d + 034f8de commit fbda0a6
Show file tree
Hide file tree
Showing 10 changed files with 324 additions and 187 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
File History Changelog
======================

v1.8.0 (2016-04-06)
-------------------

- Now properly handles situations where the to-be-previewed or -opened file
already existed in another group (#23)
- Added new setting `reopen_file_in_current_group` to control this behavior
- The parameter for instantly opening the most recently closed file has changed
(see README.md if you are affected)
- Fixed a bug where the panel closed the current file if all files in the panel
were currently open (#34) (@lastsecondsave)
- Fixed various edge cases including races in the preview involving quick-
opening or deleting the selected entry (@rahul-ramadas)
- Only quick-open the selected entry if the caret is at the end of text
- Don't print "reloading" message during initial load
- Don't clean anonymous projects on ST3 as long as they remain open

v1.7.1 (2015-01-29)
-------------------

Expand Down
17 changes: 10 additions & 7 deletions Default (Linux).sublime-keymap
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
[
{ "keys": ["ctrl+shift+t"], "command": "open_recently_closed_file", "args": {"show_quick_panel": false} },
{ "keys": ["ctrl+shift+t"], "command": "open_recently_closed_file", "args": {"action": "open_latest_closed"} },
{ "keys": ["ctrl+alt+t"], "command": "open_recently_closed_file" },
{ "keys": ["ctrl+alt+shift+t"], "command": "open_recently_closed_file", "args": {"current_project_only": false} },
{ "keys": ["right"], "command": "quick_open_file_history", "context": [
{ "key": "overlay_visible", "operator": "equal", "operand": true },
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
{ "keys": ["right"], "command": "open_recently_closed_file", "args": {"action": "quick_open_current_entry"},
"context": [
{ "key": "overlay_visible" },
{ "key": "file_history_overlay_visible" },
{ "key": "following_text", "operator": "regex_match", "operand": "^$" }
]},
{ "keys": ["ctrl+delete"], "command": "delete_file_history_entry", "context": [
{ "key": "overlay_visible", "operator": "equal", "operand": true },
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
{ "keys": ["ctrl+delete"], "command": "open_recently_closed_file", "args": {"action": "delete_current_entry"},
"context": [
{ "key": "overlay_visible" },
{ "key": "file_history_overlay_visible" }
]}
]
17 changes: 10 additions & 7 deletions Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
[
{ "keys": ["super+shift+t"], "command": "open_recently_closed_file", "args": {"show_quick_panel": false} },
{ "keys": ["super+shift+t"], "command": "open_recently_closed_file", "args": {"action": "open_latest_closed"} },
{ "keys": ["super+alt+t"], "command": "open_recently_closed_file" },
{ "keys": ["super+alt+shift+t"], "command": "open_recently_closed_file", "args": {"current_project_only": false} },
{ "keys": ["right"], "command": "quick_open_file_history", "context": [
{ "key": "overlay_visible", "operator": "equal", "operand": true },
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
{ "keys": ["right"], "command": "open_recently_closed_file", "args": {"action": "quick_open_current_entry"},
"context": [
{ "key": "overlay_visible" },
{ "key": "file_history_overlay_visible" },
{ "key": "following_text", "operator": "regex_match", "operand": "^$" }
]},
{ "keys": ["super+delete"], "command": "delete_file_history_entry", "context": [
{ "key": "overlay_visible", "operator": "equal", "operand": true },
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
{ "keys": ["super+delete"], "command": "open_recently_closed_file", "args": {"action": "delete_current_entry"},
"context": [
{ "key": "overlay_visible" },
{ "key": "file_history_overlay_visible" }
]}
]
17 changes: 10 additions & 7 deletions Default (Windows).sublime-keymap
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
[
{ "keys": ["ctrl+shift+t"], "command": "open_recently_closed_file", "args": {"show_quick_panel": false} },
{ "keys": ["ctrl+shift+t"], "command": "open_recently_closed_file", "args": {"action": "open_latest_closed"} },
{ "keys": ["ctrl+alt+t"], "command": "open_recently_closed_file" },
{ "keys": ["ctrl+alt+shift+t"], "command": "open_recently_closed_file", "args": {"current_project_only": false} },
{ "keys": ["right"], "command": "quick_open_file_history", "context": [
{ "key": "overlay_visible", "operator": "equal", "operand": true },
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
{ "keys": ["right"], "command": "open_recently_closed_file", "args": {"action": "quick_open_current_entry"},
"context": [
{ "key": "overlay_visible" },
{ "key": "file_history_overlay_visible" },
{ "key": "following_text", "operator": "regex_match", "operand": "^$" }
]},
{ "keys": ["ctrl+delete"], "command": "delete_file_history_entry", "context": [
{ "key": "overlay_visible", "operator": "equal", "operand": true },
{ "key": "file_history_overlay_visible", "operator": "equal", "operand": true }
{ "keys": ["ctrl+delete"], "command": "open_recently_closed_file", "args": {"action": "delete_current_entry"},
"context": [
{ "key": "overlay_visible" },
{ "key": "file_history_overlay_visible" }
]}
]
12 changes: 7 additions & 5 deletions Default.sublime-commands
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@

// File History commands
{
"caption": "File History: Open recently closed file (Current Project)",
"caption": "File History: Open most recently closed file",
"command": "open_recently_closed_file",
"args": {
"show_quick_panel": true,
"current_project_only": true
"action": "open_latest_closed"
}
},
{
"caption": "File History: Open recently closed file (All Projects)",
"caption": "File History: Open recently closed file… (Current Project)",
"command": "open_recently_closed_file"
},
{
"caption": "File History: Open recently closed file… (All Projects)",
"command": "open_recently_closed_file",
"args": {
"show_quick_panel": true,
"current_project_only": false
}
},
Expand Down
3 changes: 3 additions & 0 deletions FileHistory.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
// Should we show a preview of the history entries?
"show_file_preview": true,

// Re-open a file in the current group if it is already open in another one?
"reopen_file_in_current_group": false,

// Remove any non-existent files from the history (when previewed or
// opened).
"remove_non_existent_files_on_preview": false,
Expand Down
119 changes: 78 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,83 @@
# SublimeText - File History #

**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).
**Sublime Text 2 and 3** plugin
to provide access to the history of recently used files -
project-wise or globally.

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

![Preview Image][preview-img]

## Features ##

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.

Overview of features:
## Features ##

* [FileHistory.sublime-settings][] file to customize functionality
* 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
* Display a preview of the file while looking through the file history in the quick panel (only Sublime Text 3)
* Choose target location where the file history should be saved
* Optionally remove any non-existent files while looking through the file history (when previewed or opened) or on start-up
* Open multiple history entries from the quick panel with the <kbd>Right</kbd> key
* Delete history entries from the quick panel with <kbd>Ctrl+Del</kbd>
* Path exclude and re-include patterns (regex) that can be extended in project settings
* Reopen the most recently closed file
or open a quick panel of recently used files
to choose from
* Display a preview of the file
while browsing the quick panel
(only Sublime Text 3)
* Open multiple history entries
from the quick panel
with the <kbd>Right</kbd> key
* Delete history entries from the quick panel
with <kbd>Ctrl + Del</kbd>
* Optionally remove any non-existent files
while looking through the file history
(when previewed or opened)
or on start-up
* Creates backups
in case you lose your history
* Highly configurable through [FileHistory.sublime-settings][] file,
like excluding files with regex patterns


## Installation ##

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.


## Usage ##
1. Install [Package Control][pck-ctrl].
2. Once installed,
bring up the Command Palette
(`Command-Shift-P` on OS X, `Ctrl-Shift-P` on Linux/Windows).
3. Select `Package Control: Install Package`
and then select `File History` when the list appears.

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

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.

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

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

### Images ###
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 + Del</kbd>
to remove the selected file from the history.

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

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

### Project Settings ###

You can **extend** the `path_exclude_patterns` and `path_reinclude_patterns` lists in your project settings.
You can **extend**
the `path_exclude_patterns` and `path_reinclude_patterns` lists
in your project settings.

For this, add a `"file_history"` dictionary to your project's settings and then one or both of the settings to that. Example:
For this,
add a `"file_history"` dictionary
to your project's settings
and then one or both of the settings to that.
Example:

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

**open_recently_closed_file** (Window)

Opens a popup with recently closed files or reopens the lastly closed view if `show_quick_panel == False`.

> *Parameters*
Opens a popup with recently closed files
or reopens the lastly closed view
if `action == "open_latest_closed"`.

> - **show_quick_panel** (bool) - *Default*: `True`
> - **current_project_only** (bool) - *Default*: `True`
> *Parameters*
>
> - **action** (str) -
> *Default*: `"show_history"`,
> *Allowed values*: `"show_history"`, `"open_latest_closed"`
>
> - **current_project_only** (bool) -
> *Default*: `True`
**cleanup_file_history** (Window)

Checks the current project or the whole history for non-existent files and removes them from the history kept.
Checks the current project
or the whole history
for non-existent files
and removes them from the history.

> *Parameters*
> - **current_project_only** (bool) - *Default*: `True`
>
> - **current_project_only** (bool) -
> *Default*: `True`
**reset_file_history** (Window)

Removes all file history data.
Removes all history data.


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

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

0 comments on commit fbda0a6

Please sign in to comment.