Well, Iām getting ready to release something that should fit your requirements.
If everything goes according to plan, it should be available as an early beta sometime next week.
Well, Iām getting ready to release something that should fit your requirements.
If everything goes according to plan, it should be available as an early beta sometime next week.
Had a plugin like that for ST1. You can hook in the scope/block awareness into test runner too.
http://ndudfield.com/zencoding/old/PyNodesNose/PyNodesNose.gif
http://ndudfield.com/zencoding/old/PyNodesNoseContext/PyNodesNoseContext.gif
[quote=āwuubā]Well, Iām getting ready to release something that should fit your requirements.
If everything goes according to plan, it should be available as an early beta sometime next week.[/quote]
That looks sweet!!! Canāt wait! Where is the repo if you donāt mind me asking?
Itās not ready for general consumption yet. But if youāre still interested.
You need this:
git clone https://github.com/wuub/eyeball.git
cd eyeball
pip install --user .
and this:
github.com/wuub/dotfiles/blob/m ā¦ _plugin.py
and this:
github.com/wuub/dotfiles/blob/m ā¦ ime-keymap
Ctrl+Shit+C will change selection.
Tested in Stublime Text 3dev & linux only!!!
I only get a python window for a split-second and then nothing. Nothing in the console, as well.
(btw, on windows 7)
In that case youāll need to wait untill I pack it into a proper plugin and tune things a bit to work on windows. I said itās not ready yet
http://ndudfield.com/zencoding/old/search-in-area.gif
Blocks are good for rudimentary scoped
var renaming too
[quote=ācastles_made_of_sandā]
Blocks are good for rudimentary scoped
var renaming too
How did you find boundaries of current blocks? Also with ast or some other method?[/quote]
def find_block_starts(view, block_tokens):
regex = re.compile(block_tokens if block_tokens else BLOCKERS)
return [r for r in view.find_by_selector('keyword,storage') if
view.find(r'\S', view.line(r).begin()).begin() == r.begin() and
regex.match(view.substr(r)) ]
Basically by finding block starting tokens, bisecting the closest to each selection and then using some indentation comparing routines, to find extents of a block. Used a bit of scope awareness etc.
Things like that worked better in ST 1 & 2 when the api was faster and you could do a lot of pt
by pt
stuff.
Great!
Installation instructions:
Clone this repo into your Preferences -> Browse Packages
directory.
github.com/wuub/SublimeEyeball
make sure that at least one pythons have eyeball installed (pip install eyeball should work).
Pick the one you code for, or both if you use py2 and py3. Eyeball relies on ast module and it can only parse the same version of python as itself, so py27 might not be able to understand all of python3 and vice versa.
github.com/wuub/SublimeEyeball/ ā¦ 20(Windows.sublime-settings
Ctrl+Shift+C to select block of code, repeat to cycle up.
Notes:
I just saw this !! great!
butā¦ itās not working yet!
I get this error in the console:
SublimeEyeball c:\Python32\pythonw.exe No JSON object could be decoded
(I have python 3.2 installed, not python 3.3, so i just changed the line in your file)
c:\python32\python.exe -m eyeball
should wait for input.Edit: I did not check for py3.2 compatibility before, but it doesnāt seem to be a problem here travis-ci.org/wuub/eyeball
hmm that previous post i made was completely wrong, I m still looking into itā¦
eeer ok found the problem. It wasnāt syntactically correct
Works perfect now !! many thanks !!
It is very weird though, I have the following code:
def __init__(self):
super(PublishedItem,self).__init__()
# self.tree = ''
self.XML_publications_root = ''
# self.AuthorAddresses = "Ī/Ī"
self.Abstract = "unbounded"
self.ArticleNumber = "unbounded"
self.AuthorAddresses = ] # this contains the orig addresses coming in
self.Address_AuthorsDict = dict()
self.Authors = ]
self.AuthorFullName = ]
and it doesnāt work because of the fifth line. Why is that? itās commented anyway!