Skip to content

Commit

Permalink
Merge 'dev' branch; Release 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FichteFoll committed Sep 19, 2014
2 parents 815369f + 8e3bc25 commit 1c607d8
Show file tree
Hide file tree
Showing 6 changed files with 320 additions and 138 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
File History Changelog
======================

v1.6.0 (2014-09-19)
-------------------

- Adapt to changes made to the `FileHistory.sublime-settings` file (#25)
- Don't update the settings file when values are missing, just silently use the
defaults (#25)
- Support `path_exclude_patterns` setting to exclude files from being tracked
in the history (basically a filename pattern blacklist) (#22)
- Support `path_reinclude_patterns` setting to re-include files that were
excluded before (basically a filename pattern whitelist) (#22)
- Deleting from quickpanel should reopen with an updated list and the next
entry selected (#24)
- Catch exception when loading history file fails (#27)
- Support for storing daily backups of the history file. See `max_backup_count`
setting (#27)
- Bug fix: Cannot open multiple files within the same palette if the file is
opened in a different group (#23)
- Buf fix: Panel didn't show on ST2
- Some refactoring


v1.5.2 (2014-07-22)
-------------------

Expand Down Expand Up @@ -74,12 +95,14 @@ v1.4.1 (2014-01-10)

- Updated the version number in messages.json


v1.4.0 (2014-01-10)
-------------------

- Fixed some issues in the README and added a settings section
- Updated the version number to reflect significance of the added functionality


v1.3.5 (2014-01-09)
-------------------

Expand Down
46 changes: 34 additions & 12 deletions FileHistory.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
// Path to store the history entries in (relative to the sublime packages path)
// Default value is: "User/FileHistory.json"
"history_file": "User/FileHistory.json",

// Maximum number of history entries we should keep (older entries truncated)
Expand All @@ -13,7 +12,8 @@
"use_saved_position": true,

// Which position to open a file at when the saved index in no longer valid
// "next", "first", "last"
//
// Options: "next", "first", "last"
"new_tab_position": "next",

// Should we show a preview of the history entries?
Expand All @@ -25,25 +25,27 @@
// If a cleanup of the history should be run on startup
"cleanup_on_startup": true,

// Should the history be reset on startup
// Should the history be reset on startup?
//
// BE CAREFUL, this will DELETE ALL of your history entries
"delete_all_on_startup": false,
// Should a monospace be used in the quick panel?

// Should a monospace font be used in the quick panel?
"monospace_font": false,

// Should the last accessed timestamp be shown in the quick panel?
"display_timestamps": true,

// Format the timestamp should be added to the history entry
"timestamp_format": "%Y-%m-%d @ %H:%M:%S",

// How to display the timestamp:
// "relative": how long since the access, e.g. 2 days, 5 hours, 7 seconds
// "relative": how long since the access, e.g. '2 days, 5 hours'
// "absolute": the date and time of the last access
// Please note that the "relative" option can cause a delay in the quick panel popping up
//
// Please note that the "relative" option can cause a delay in the quick panel popping up.
"timestamp_display_type": "relative",

// Format of the absolute timestamp that should be added to the history entry
"timestamp_format": "%Y-%m-%d @ %H:%M:%S",

// Which timestamp to display?
// "history_access" - last opened/closed timestamp
// "filesystem" - the file's last modified timestamp
Expand All @@ -52,6 +54,26 @@
// Should the history file be nicely formatted?
"prettify_history": false,

// Print out the debug text?
// List of path regexs to exclude from the history tracking
// Can be extended in project settings (in a "file_histoy" dict).
//
// Note: You must use forward slashes for the path separator (regardless of platform)
// and escape backslashes properly.
// e.g. ["/temp/", "C:/Program Files/Internet Explorer/", "\\.bak$"]
"path_exclude_patterns": [],

// List of path regexs that will re-include files that were excluded before
// Can be extended in project settings (in a "file_histoy" dict).
//
// Note: You must use forward slashes for the path separator (regardless of platform)
// and escape backslashes properly.
// e.g. ["/temp/", "C:/Program Files/Internet Explorer/", "\\.my\\.bak$"]
"path_reinclude_patterns": [],

// The number of daily backups to keep (backup is saved the first time the history is modified)
// To turn off backups, change this setting to 0 (zero).
"max_backup_count": 3,

// Print out debug text?
"debug": false
}
91 changes: 37 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# 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 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).

![Example Image][img2]


## 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.
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:
* [Settings][settings] file to customize the 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

* [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)
* Optionally clean up the history on start-up
* Optionally display the quick panel entries with a monospaced font
* Open multiple history entries from the quick panel with the ```right``` key

Originally obtained from a [gist][gist] by Josh Bjornson.
* 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


## Installation ##
Expand All @@ -32,7 +34,7 @@ When you opened a panel you can use the <kbd>right</kbd> key to open the file an

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

For the available and default settings, see [Settings](#settings).
For the available and default settings, see [FileHistory.sublime-settings][].

### Images ###

Expand All @@ -42,6 +44,28 @@ For the available and default settings, see [Settings](#settings).
*The popup for the global history with text*
![example1][img2]

### 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:

```json
{
"folders": [
{
"path": "."
}
],
"settings": {
"file_history": {
"path_exclude_patterns": ["/bin/"],
"path_reinclude_patterns": ["\\.compiled$"]
}
}
}
```

### Commands ###

**open_recently_closed_file** (Window)
Expand All @@ -66,55 +90,14 @@ Checks the current project or the whole history for non-existent files and remov

Removes all file history data.

### Customization via settings file ###

**Important**: At the moment you need to restart Sublime Text after editing the [settings][settings] file (because the settings are cached by the Sublime Text API).

The following functionality can be customized in the [settings][settings] file:

* `history_file` - Path to store the history entries in (relative to the sublime packages path)
- default value is `"User/FileHistory.json"`
* `global_max_entries` - Maximum number of history entries we should keep (older entries truncated)
- default value is `100`
* `project_max_entries` - Maximum number of history entries we should keep (older entries truncated)
- default value is `50`
* `use_saved_position` - If we should try to use the saved position of the file
- default value is `true`
* `new_tab_position` - Which position to open a file at when the saved index is no longer valid (or `use_saved_position` is set to `false`)
- default value is `"next"`
- available options are `"next"`, `"first"` and `"last"`
* `show_file_preview` - Should we show a preview of the history entries?
- default value is `true` *(not available on ST2)*
* `remove_non_existent_files_on_preview` - Remove any non-existent files from the history (when previewed or opened)
- default value is `false`
* `cleanup_on_startup` - Remove any non-existent files on startup
- default value is `true`
* `monospace_font` - Should a monospace be used in the quick panel?
- default value is `false`
* `timestamp_show` - Should the last access's timestamp be shown in the quick panel?
- default value is `true`
* `timestamp_relative` - Show a relative time value instead of absolute
- default value is `true`
* `timestamp_format` - The format of the timestamp
- default value is `%Y-%m-%d @ %H:%M:%S`
* `timestamp_mode` - Which timestamp to display? ("history_access" - last opened/closed timestamp, "filesystem" - the file's last modified timestamp)
- default value is `filesystem`
* `prettify_history` - Should the file history be saved as nicely formatted json?
- default value is `false`
* `debug` - Print out the debug text to the console?
- default value is `false`


[gist]: https://gist.github.com/1133602

[github]: https://github.com/FichteFoll/sublimetext-filehistory "Github.com: FichteFoll/sublime-filehistory"
[zipball]: https://github.com/FichteFoll/sublimetext-filehistory/zipball/master
[pck-ctrl]: http://wbond.net/sublime_packages/package_control "Sublime Package Control by wbond"

[settings]: FileHistory.sublime-settings "FileHistory.sublime-settings"
[FileHistory.sublime-settings]: FileHistory.sublime-settings

[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

Loading

0 comments on commit 1c607d8

Please sign in to comment.