khrizt / gotolastedit Goto Github PK
View Code? Open in Web Editor NEWSublime plugin to go to last edit position
Sublime plugin to go to last edit position
Using the functions:
sublime.windows()
window.views()
It could be possible to get view instances looping the results removing the need to store the references to the views
Will close issue when pull request merged
wbond/package_control_channel#1077
KeyError: 151
Traceback (most recent call last):
File "E:\work\Sublime Text Build\sublime_plugin.py", line 478, in run_callback
expr()
File "E:\work\Sublime Text Build\sublime_plugin.py", line 585, in <lambda>
run_callback('on_modified', callback, lambda: callback.on_modified(v))
File "E:\work\Sublime Text Build\Data\Installed Packages\GoToLastEdit.sublime-package\GotoLastEdit.py", line 31, in on_modified
if CE.prev_line[view.id()] == -1 or curr_line != CE.prev_line[view.id()]:
it doesnt work in the latest version of sublime text3 (3197)
and I set the user key binging : { "keys": ["ctrl+q"]},
, it works again, but there is an error in console:
Unable to parse binding {keys: [ctrl+q]}
can I bind the real command of gotoLastEdit?thx.
Am I doing something wrong?
Is there a way to make the history longer? (as in being able to access more edits)
I've taken a look into GotoLastEdit.py
but unfortunately I know nothing about Python...
The change should be done with the arrays that store the information of previous line changes.
All the info should be stored in a int-based key list that store all the changes for each view in the dict, we will create a new position in this array when a modification in a different view from the one that was last modified is done.
if view.substr(sublime.Region(0,curr_pos))[-1] != '\n' and abs(POSNS[vid][0] - curr_line) > 2:
This condition should avoid registering new editing positions when they are within 2 lines of last edit
I tested the plugin on Sublime Text 3 and it seems to work fine. Would be awesome if we could install it over package control for Sublime Text 3. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.