On 2016-05-16 03:55 PM, Tobias Rzepka wrote:
...
> Hello Mike,
>> I wasn't aware of the CTRL-ALT-F dialog. Typically I use CTRL-SHIFT-F,
> but that's for finding something in files. So you are right, that
> adding a line number would make no sense and the CTRL-G isn't the
> right place...
> But that is what I had in mind:
> If it's a line number goto to that line (current file),
> if it's a method, function or class, open the file if not already open
> and jump to the definition and
> if it's a filename just open the file (maybe with line number jump to
> it ;-)
>> So it would be a powerful goto dialog and your solution is relative
> near I think.
>> I like your solution for finding files in the project. But I think to
> find files not in the project (maybe e.g. in sys.path) would be a
> useful feature. Maybe a choice to os.walk a path instead of
> "self.project.pdata.get" would do the trick...
You'll note that the original dialog did have the "search sys.path"
behaviour. I left that out of the revised dialog because my focus is on
being to able to jump around quickly in large projects. Doing a
file-system walk on the entirety of sys.path is likely to cause issues
for users with lots of very big projects.
My (new) laptop (with a fast SSD) does a sys.path walk in around .2s,
because it doesn't have much software installed (but that is still
pretty slow for something you want to do between keystrokes). For
comparison, my (powerful, but older, and using a spinning disk)
workstation takes close to a minute just to walk sys.path and winds up
with 365,000+ files in the search set. That's just kind of pointless as
a search set probably 99% of the time (on Debian systems you wind up
with an enormous amount of system software on sys.path). You could cache
that, of course, but a minute of searching/indexing is... heavy, and the
index would need to be re-scanned periodically.
If you wanted to "find a class of name X" you'd have to have a
source-code-content index and use that in the goto dialog. I don't
*believe* we have a generic indexing mechanism in Eric yet to make that
work cleanly.
You could easily do heuristics such as looking for imports in the files
and figuring out the most likely modules/packages in which to search,
basically "adding to the search set" for just those packages your code
actually imports.
You could lean on the existing completion implementations to do some
contextualized jumping (though I think most of them will only index code
in your project), but my focus so far has been on getting the "jump to a
known file" working cleanly. If you'd like to work on something more
advanced, I'm guessing Detlev might be interested :D
BTW, if you *do* want to work on it, cloning off of Detlev's machine is
rather slow (at least from Canada), feel free to use the Bitbucket
mirror I've set up.
> Filename and path has to be exchanged in the UI and the ESC doesn't
> work if you leave the input box (e.g. if you select with the mouse but
> want to close the dialog with ESC).
Thanks. Both fixed on the version now up on bitbucket.
https://bitbucket.org/mcfletch/eric
I also make the search box re-focus when you hit the <ctrl-alt-f>
keybinding so that you can immediately start typing without worrying
about whether you selected something else in the dialog previously.
Other than possibly adding code to auto-populate the search with
current-line-of-code content I'm relatively happy with the dialog for
jumping around my large projects. I still wind up using the project tree
here and there when I've forgotten what the name of a module or file
was, but for the most part I now simply direct-jump with a file-search.
Take care,
Mike
>>>> Mike C. Fletcher schrieb am 16.05.2016 um 04:07:
>>>> On 2016-05-14 06:06 AM, Detlev Offenbach wrote:
>>>>>>>>>> Hi Mike,
>>>>>>>>>> thanks for letting us know. Please make sure you base your work on
>>>>> the default branch because the 6_1_x brand (aka eric 6.1) is
>>>>> feature frozen. It just receives bug fixes.
>>>>>>>>>>>>> Okay, so I've got it working to the level where I'm pretty
>>>> satisfied with the speed/utility of the find-file operation (note:
>>>> haven't done any heavy hacking with it yet, so it could be I'll
>>>> find other bits that would be useful).
>>>>>>>> I've hooked it up for now to replace the FindFileNameDialog, as I
>>>> only ever use the "Find in Project" version. It may be that it
>>>> should be hooked up under a different key-binding/menu-item if you
>>>> decide to pull it into the project. I built this dialog as a
>>>> separate module/form (though it's just based on the
>>>> FindFileNameDialog), as the functionality is somewhat different
>>>> than the original dialog.
>>>>>>>> Basic functionality:
>>>>>>>> * space-separated search terms
>>>> * finds that subset of items which have the most matches for the
>>>> search terms
>>>> * sorts the subset based on the terms matching in-order, then on
>>>> the most-recent modification time (this actually hits the file
>>>> system with a stat-per-file, but even on huge projects this doesn't
>>>> seem to cause a noticeable delay)
>>>> * provides key-bindings for enter (select current), escape (cancel
>>>> navigation) and up/down (select previous/next match in the list)
>>>>>>>> I've pushed the code up on BitBucket so you can pull from there if
>>>> you're interested in the functionality.
>>>>>>>> https://bitbucket.org/mcfletch/eric/overview
>>>>>>>> Take care, and thanks,
>>>> Mike
>>>>>>>>> Am 13.05.2016 um 22:26 schrieb Mike C. Fletcher:
>>>>>> On 2016-05-06 12:26 PM, Detlev Offenbach wrote:
>>>>>>>>>>>>>> Hi Mike,
>>>>>>>>>>>>>> sounds like a great idea. How about contributing the suggested
>>>>>>> modifications?
>>>>>>>>>>>>>> Maybe somebody else is interested, in case Mike can't do it?
>>>>>>>>>>>>>>>>>>> I've started into work on it... I've got a hacked-up proof of
>>>>>> concept dialog that does the basics but still needs work to get
>>>>>> key-bindings and the like worked out.
>>>>>>>>>>>> Anyway, just wanted to avoid someone duplicating the work. Take care,
>>>>>> Mike
>>>>>>>>>>>>> Detlev
>>>>>>>>>>>>>> On Friday 06 May 2016, 12:07:44 Mike C. Fletcher wrote:
>>>>>>>>>>>>>> > Hi Detlev (and everyone else),
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > There's a feature I keep seeing in Atom and other IDEs that is
>>>>>>> *really*
>>>>>>>>>>>>>> > helpful for jumping around in larger (10,000+ file) projects.
>>>>>>> It's a
>>>>>>>>>>>>>> > quick-file-search-and-open dialog. Basically it's the
>>>>>>> functionality in
>>>>>>>>>>>>>> > File | Search File, but modelled as a speed-optimized
>>>>>>> keyboard-centric
>>>>>>>>>>>>>> > searching/winnowing process.
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > That is, you pop up the dialog with a key-sequence and start
>>>>>>> typing
>>>>>>>>>>>>>> > (fragments from) the name of the file, so, for instance, if I
>>>>>>> wanted to
>>>>>>>>>>>>>> > find "subproject/subproject/moo/models.py" I would type
>>>>>>> something like this:
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > ctrl-alt-f
>>>>>>>>>>>>>> > moo models subp
>>>>>>>>>>>>>> > <down> (to select the second match)
>>>>>>>>>>>>>> > <enter>
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > The search results would update as I typed "moo" to have all
>>>>>>> files with
>>>>>>>>>>>>>> > the substring "moo" in their paths (with those that have moo
>>>>>>> as a full
>>>>>>>>>>>>>> > path component sorted first, hopefully), then when I start typing
>>>>>>>>>>>>>> > "models" would further restrict the set to those items that
>>>>>>> contain both
>>>>>>>>>>>>>> > moo and models, and when I start typing subp(roject) the
>>>>>>> search set gets
>>>>>>>>>>>>>> > down to 1-2 entries and I just select the entry with the
>>>>>>> arrows and hit
>>>>>>>>>>>>>> > enter (again, without leaving the search box or using the mouse).
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > When results are displayed, the first item is always selected, and
>>>>>>>>>>>>>> > hitting <enter> opens it, while up/down arrows select other
>>>>>>> entries
>>>>>>>>>>>>>> > (again, without needing to switch focus from the search box).
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > The changes from current File Search suggested are:
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > * don't require file extension filtering
>>>>>>>>>>>>>> > o particularly when you have a *lot* of no-file-extension files
>>>>>>>>>>>>>> > that restriction isn't all that useful
>>>>>>>>>>>>>> > o if the file-extension widget is empty, ignore it
>>>>>>>>>>>>>> > * do simple sub-string matching on the set of file-paths known
>>>>>>> to the
>>>>>>>>>>>>>> > project
>>>>>>>>>>>>>> > o do *not* require a full-name match on the terms, but *rank*
>>>>>>>>>>>>>> > those result higher
>>>>>>>>>>>>>> > + allow e.g. "subproject/moo" to find everything that has that
>>>>>>>>>>>>>> > sequence of characters in its path
>>>>>>>>>>>>>> > o this should likely be done on in-memory structures only, *not*
>>>>>>>>>>>>>> > on the file system
>>>>>>>>>>>>>> > * treat space-delimited fragments as AND'd search terms
>>>>>>>>>>>>>> > o again, ease of typing being the rationale here, not something
>>>>>>>>>>>>>> > involved
>>>>>>>>>>>>>> > * allow hitting <up> and <down> to change the selected item
>>>>>>> from the
>>>>>>>>>>>>>> > search box
>>>>>>>>>>>>>> > * allow hitting <enter> in the search box to open the
>>>>>>>>>>>>>> > currently-selected file
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > Nice enhancements:
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > * sort results based on relevance ranking (optional) so e.g.
>>>>>>> having a
>>>>>>>>>>>>>> > full path-unit == to a search term sorts before having it as a
>>>>>>>>>>>>>> > sub-string of a path unit
>>>>>>>>>>>>>> > * if there are no matches (or less than a threshold, such as a
>>>>>>> full
>>>>>>>>>>>>>> > screen of results), use fuzzy-matching (soundex, ledit distance,
>>>>>>>>>>>>>> > etc) to try to find other possible matches (always sorted below
>>>>>>>>>>>>>> > absolute matches)
>>>>>>>>>>>>>> > * as you type, do autocomplete on the path fragments we know,
>>>>>>> so "sub"
>>>>>>>>>>>>>> > would autocomplete to the longest common fragment that starts with
>>>>>>>>>>>>>> > "sub" (a-la bash or similar shell)
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > With that done, we could also do the following:
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > * on an import statement, launching file-search could pre-populate
>>>>>>>>>>>>>> > with the import name (and with "from" imports, the upper level
>>>>>>>>>>>>>> > module, with . translated to /)
>>>>>>>>>>>>>> > * on other fragments of code, launching file-search could
>>>>>>> pre-populate
>>>>>>>>>>>>>> > with the current token
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > Anyway, this is just a suggestion, and feel free to say no.
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> > Thanks for all the great work on Eric,
>>>>>>>>>>>>>> > Mike --
>>>>>>>>>>>>>> Detlev Offenbach
>>>>>>>>>>>>>>detlev at die-offenbachs.de>>>>>>>>>>>>>>>>>>>>>>> --
>>>>> --
>>>>> Detlev Offenbach
>>>>>detlev at die-offenbachs.de>>>>>>>>>>>>>>>> _______________________________________________
>>>> Eric mailing list
>>>>Eric at riverbankcomputing.com>>>>/mailman/listinfo/eric>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/eric/attachments/20160520/629df75d/attachment-0001.html>
More information about the Eric
mailing list
‘She has never mentioned her father to me. Was he—well, the sort of man whom the County Club would not have blackballed?’ "We walked by the side of our teams or behind the wagons, we slept on the ground at night, we did our own cooking, we washed our knives by sticking them into the ground rapidly a few times, and we washed our plates with sand and wisps of grass. When we stopped, we arranged our wagons in a circle, and thus formed a 'corral,' or yard, where we drove our oxen to yoke them up. And the corral was often very useful as a fort, or camp, for defending ourselves against the Indians. Do you see that little hollow down there?" he asked, pointing to a depression in the ground a short distance to the right of the train. "Well, in that hollow our wagon-train was kept three days and nights by the Indians. Three days and nights they stayed around, and made several attacks. Two of our men were killed and three were wounded by their arrows, and others had narrow escapes. One arrow hit me on the throat, but I was saved by the knot of my neckerchief, and the point only tore the skin a little. Since that time I have always had a fondness for large neckties. I don't know how many of the Indians we killed, as they carried off their dead and wounded, to save them from being scalped. Next to getting the scalps of their enemies, the most important thing with the Indians is to save their own. We had several fights during our journey, but that one was the worst. Once a little party of us were surrounded in a small 'wallow,' and had a tough time to defend ourselves successfully. Luckily for us, the Indians had no fire-arms then, and their bows and arrows were no match for our rifles. Nowadays they are well armed, but there are[Pg 41] not so many of them, and they are not inclined to trouble the railway trains. They used to do a great deal of mischief in the old times, and many a poor fellow has been killed by them." As dusk came on nearly the whole population of Maastricht, with all their temporary guests, formed an endless procession and went to invoke God's mercy by the Virgin Mary's intercession. They went to Our Lady's Church, in which stands the miraculous statue of Sancta Maria Stella Maris. The procession filled all the principal streets and squares of the town. I took my stand at the corner of the Vrijthof, where all marched past me, men, women, and children, all praying aloud, with loud voices beseeching: "Our Lady, Star of the Sea, pray for us ... pray for us ... pray for us ...!" It had not occurred to her for some hours after Mrs. Campbell had told her of Landor's death that she was free now to give herself to Cairness. She had gasped, indeed, when she did remember it, and had put the thought away, angrily and self-reproachfully. But it returned now, and she felt that she might cling to it. She had been grateful, and she had been faithful, too.[Pg 286] She remembered only that Landor had been kind to her, and forgot that for the last two years she had borne with much harsh coldness, and with a sort of contempt which she felt in her unanalyzing mind to have been entirely unmerited. Gradually she raised herself until she sat quite erect by the side of the mound, the old exultation of her half-wild girlhood shining in her face as she planned the future, which only a few minutes before had seemed so hopeless. After he had gloated over Sergeant Ramsey, Shorty got his men into the road ready to start. Si placed himself in front of the squad and deliberately loaded his musket in their sight. Shorty took his place in the rear, and gave out: The groups about each gun thinned out, as the shrieking fragments of shell mowed down man after man, but the rapidity of the fire did not slacken in the least. One of the Lieutenants turned and motioned with his saber to the riders seated on their horses in the line of limbers under the cover of the slope. One rider sprang from each team and ran up to take the place of men who had fallen. "As long as there's men and women in the world, the men 'ull be top and the women bottom." Then, in the house, the little girls were useful. Mrs. Backfield was not so energetic as she used to be. She had never been a robust woman, and though her husband's care had kept her well and strong, her frame was not equal to Reuben's demands; after fourteen years' hard labour, she suffered from rheumatism, which though seldom acute, was inclined to make her stiff and slow. It was here that Caro and Tilly came in, and Reuben began to appreciate his girls. After all, girls were needed in a house—and as for young men and marriage, their father could easily see that such follies did not spoil their usefulness or take them from him. Caro and Tilly helped their grandmother in all sorts of ways—they dusted, they watched pots, they shelled peas and peeled potatoes, they darned house-linen, they could even make a bed between them. HoME一级毛片视频免费公开
ENTER NUMBET 0018100server.com.cn www.baiaogoo.org.cn richtiger.com.cn sh83hu19.com.cn mcnkol.com.cn barosin.com.cn www.miasole.com.cn www.vygp.com.cn bjyzly.com.cn www.mqipr.com.cn