Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
huge update: use add_regions to remember locations
Browse files Browse the repository at this point in the history
  • Loading branch information
randybot committed Jun 4, 2013
1 parent d7ed7d1 commit 19f1f9e
Show file tree
Hide file tree
Showing 8 changed files with 246 additions and 221 deletions.
374 changes: 207 additions & 167 deletions ChangeList.py

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions Default (Linux).sublime-keymap

This file was deleted.

5 changes: 0 additions & 5 deletions Default (OSX).sublime-keymap

This file was deleted.

5 changes: 0 additions & 5 deletions Default (Windows).sublime-keymap

This file was deleted.

4 changes: 2 additions & 2 deletions Default.sublime-commands
@@ -1,7 +1,7 @@
[
{
"caption": "Change List: Clear",
"command": "clear_change_list"
"caption": "Change List: Manage",
"command": "manage_change_list"
},
{
"caption": "Change List: Show",
Expand Down
9 changes: 3 additions & 6 deletions Default.sublime-keymap
@@ -1,8 +1,5 @@
[
{ "keys": ["g",";"], "command": "jump_to_change", "args": {"move": 1},
"context": [{"key": "setting.command_mode"}]},
{ "keys": ["g",","], "command": "jump_to_change", "args": {"move": -1},
"context": [{"key": "setting.command_mode"}]},
{ "keys": ["g","."], "command": "jump_to_change", "args": {"index": 0},
"context": [{"key": "setting.command_mode"}]}
{ "keys": ["ctrl+;"], "command": "jump_to_change", "args": {"move": -1}},
{ "keys": ["ctrl+,"], "command": "jump_to_change", "args": {"move": 1}},
{ "keys": ["ctrl+."], "command": "jump_to_change", "args": {"index": -1}}
]
65 changes: 34 additions & 31 deletions README.md
@@ -1,42 +1,45 @@
Change List / History / Last Edit for Sublime Text 2/3
The missing Change List for Sublime Text 2/3 - History List, Last Edit ...
====================
It remembers where changes were made.
<img src="https://github.com/randy3k/ChangeList/raw/master/changelist.png">

Installation
------------
Via [Package Control](http://wbond.net/sublime_packages/package_control)
This is temporarily unavailable.
1. Via [Package Control](http://wbond.net/sublime_packages/package_control)

2. Install keymap

[
{ "keys": ["ctrl+;"], "command": "jump_to_change", "args": {"move": 1}},
{ "keys": ["ctrl+,"], "command": "jump_to_change", "args": {"move": -1}},
{ "keys": ["ctrl+."], "command": "jump_to_change", "args": {"index": 0}}
]
[Vintage](https://github.com/sublimehq/Vintage)

[
{ "keys": ["g",";"], "command": "jump_to_change", "args": {"move": 1}, "context": [{"key": "setting.command_mode"}]},
{ "keys": ["g",","], "command": "jump_to_change", "args": {"move": -1}, "context": [{"key": "setting.command_mode"}]},
{ "keys": ["g","."], "command": "jump_to_change", "args": {"index": -1}, "context": [{"key": "setting.command_mode"}]}
]
[Vintageous](https://github.com/guillermooo/Vintageous?source=c)

[
{ "keys": ["g",";"], "command": "jump_to_change", "args": {"move": 1}, "context": [{"key": "setting.command_mode"}]},
{ "keys": ["g",","], "command": "jump_to_change", "args": {"move": -1}, "context": [{"key": "setting.command_mode"}]},
{ "keys": ["g","."], "command": "jump_to_change", "args": {"index": -1}, "context": [{"key": "setting.command_mode"}]}
]


Introduction
------------

This plugin aims at recovering the full functionality of change list of VIM.
* Type ``Change List: Show`` in Command Palette to show Change List.
* Type ``Change List: Clear`` in Command Palette to clear Change List.
* ``super+;`` (Mac) or ``ctrl+;`` (Win/Linux) or ``g;`` (vintage command mode): go to previous edited location
* ``super+,`` or ``g,`` (vintage command mode): go to next edited location
* ``super+.`` or ``g.`` (vintage command mode): go to the last edited location

There are a few other "Last Edit" plugins . For examples:
* https://github.com/SamPeng87/sublime-last-edit
* https://github.com/khrizt/GotoLastEdit
* https://github.com/abrookins/GotoLastEdit
* https://github.com/Stuk/sublime-edit-history
* https://github.com/optilude/SublimeTextMisc/blob/master/navigationHistory.py
* https://gist.github.com/1993147

As far as I know, they do not keep history after the file is closed.<BR>
This plugin saves history to ``Packages/User/ChangeList.sublime-settings``.<BR>
For the moment, the last 50 history for each file will be saved.<BR>


Keymap
----------------------
It overwrites the default keymap ``super+,`` for consistency.<br>

Known issues
-----------------------
* Undo will update the change list. I have no idea on how to fix it at this moment.
* Multi cursor support is now limited, only the location of the first cursor will be saved.
However, most multi cursor editing preserves history.
* Launch ``Change List: Show`` in Command Palette to show Change List.
* Launch ``Change List: Manage`` in Command Palette to manage Change List.
* ``ctrl+;`` go to previous edited location
* ``ctrl+,`` go to next edited location
* ``ctrl+.`` go to the last edited location

Last 50 history for each file is saved.<BR>
This plugin saves history to ``Packages/User/ChangeList.json``.<BR>

Binary file modified changelist.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 19f1f9e

Please sign in to comment.