Hi,
Jumping in as a smalltalk beginner I am, as one would expect, feeling frustrated by not knowing my way around. Can see lots of cool stuff but all the mouse action is killing me. I'm a vim(+tmux) guy by background so the contrast is vast, I usually never need to touch my mouse when programming.
I was trying to find some keyboard shortcuts to do things like "jump to method within class with fuzzy search logic" (type a few characters and get list etc) or "jump to the method/class under which the cursor is located". The jump to selected needs text selection which seems really awkward (even when selecting with keyboard), my 90% case is to jump to what's under the cursor. The global find class and find methods are good, but most of the time I'm interested in "local" navigation in the current class while jumping back and forth between methods in same class.
I find more things in Nautilus since I can list the shortcuts there, but quite a few doesn't seem to work and I'm not having much luck using nautilus in 1.4 (and 2.0 too edgy for me right now, need metacello to load things cleanly etc at least). In OB in 1.4 I'm not able to figure out how to get a list of shortcuts apart from what's annotated in menus
Guess my question is - how does a keyboard centric person like me learn keyboard shortcuts and get productive in the image, more specifically 1.4 and OB? How can I work out what keyboard shortcuts exist?
Thanks! |
Hi Patrik, have you had a look at book.pharo-project.org/book/Tidbits/KeyboardShortcuts ? Does it answer your question? If not, it would be good to have that page updated. On 31 Jul 2012, at 13:07, Patrik Sundberg wrote: Hi, ---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile |
Patrik,
For me the CTL-m, CTL-n, and CTL-b are your greatest friends: - CTL-m gives you _implementors_ of the selected message (can select message in method in browser and args are ignored) - CTL-n gives you _senders_ - CTL-b looks up and browses the class 'find class' is the other menu item that I use often as you can type in a partial name (doesn't use regex) and prompts you with list of class names ... Finally I use 'search method source with it' where I select a substring and then get a list of all the methods with the substring. Depending upon which version of Pharo you are using, this menu item is hidden ... (I've found that the Transcript consistently has this menu item...WTF). I'm pretty sure that there are other ways, but I bounce around in some many dialects and so many versions of the dialects, that I can't keep track of the "coolest new way for doing things"... Dale ----- Original Message ----- | From: "Johan Fabry" <[hidden email]> | To: "A friendly place where any question about pharo is welcome" <[hidden email]> | Sent: Tuesday, July 31, 2012 10:31:09 AM | Subject: Re: [Pharo-users] How do you guys navigate while editing code? | | | Hi Patrik, | | | have you had a look at | book.pharo-project.org/book/Tidbits/KeyboardShortcuts ? Does it | answer your question? If not, it would be good to have that page | updated. | | | | On 31 Jul 2012, at 13:07, Patrik Sundberg wrote: | | | Hi, | | | Jumping in as a smalltalk beginner I am, as one would expect, feeling | frustrated by not knowing my way around. Can see lots of cool stuff | but all the mouse action is killing me. I'm a vim(+tmux) guy by | background so the contrast is vast, I usually never need to touch my | mouse when programming. | | | I was trying to find some keyboard shortcuts to do things like "jump | to method within class with fuzzy search logic" (type a few | characters and get list etc) or "jump to the method/class under | which the cursor is located". The jump to selected needs text | selection which seems really awkward (even when selecting with | keyboard), my 90% case is to jump to what's under the cursor. The | global find class and find methods are good, but most of the time | I'm interested in "local" navigation in the current class while | jumping back and forth between methods in same class. | | | I find more things in Nautilus since I can list the shortcuts there, | but quite a few doesn't seem to work and I'm not having much luck | using nautilus in 1.4 (and 2.0 too edgy for me right now, need | metacello to load things cleanly etc at least). In OB in 1.4 I'm not | able to figure out how to get a list of shortcuts apart from what's | annotated in menus | | | Guess my question is - how does a keyboard centric person like me | learn keyboard shortcuts and get productive in the image, more | specifically 1.4 and OB? How can I work out what keyboard shortcuts | exist? | | | Thanks! | | | | | | | ---> Save our in-boxes! http://emailcharter.org <--- | | | Johan Fabry | [hidden email] - http://www.dcc.uchile.cl/~jfabry | PLEIAD Lab - Computer Science Department (DCC) - University of Chile | | | | | |
In reply to this post by jfabry
Thanks for that list. That should hopefully teach me some tricks - my right hand is dying using the mouse as much as I am right now :)
On Tue, Jul 31, 2012 at 6:31 PM, Johan Fabry <[hidden email]> wrote:
|
In reply to this post by Dale Henrichs
On Tue, Jul 31, 2012 at 6:46 PM, Dale Henrichs <[hidden email]> wrote: Patrik, Is it just me or do you really have to SELECT the text and then use the keyboard shortcut? I.e. if I just leave the cursor on a message and hit the shortcut I'd have thought it'd would use the closest message, i.e. the message that the position of the cursor is part of. Seems to do nothing for me. I have to go and select the text first and then hit it. That doesn't seem workable to me for some reason.
Cmd-m give a list of implementors - my majority case (or common enough that I need a key) is I want the implementor in the current class. Anyone know if such a shortcut exist? Not finding it. Finally I use 'search method source with it' where I select a substring and then get a list of all the methods with the substring. Depending upon which version of Pharo you are using, this menu item is hidden ... (I've found that the Transcript consistently has this menu item...WTF). |
In reply to this post by Dale Henrichs
On Jul 31, 2012, at 7:46 PM, Dale Henrichs wrote: > Patrik, > > For me the CTL-m, CTL-n, and CTL-b are your greatest friends: > > - CTL-m gives you _implementors_ of the selected message > (can select message in method in browser and args are ignored) > - CTL-n gives you _senders_ > - CTL-b looks up and browses the class > > 'find class' is the other menu item that I use often as you can type in a partial name (doesn't use regex) and prompts you with list of class names ... > > > Finally I use 'search method source with it' where I select a substring and then get a list of all the methods with the substring. Depending upon which version of Pharo you are using, this menu item is hidden ... (I've found that the Transcript consistently has this menu item...WTF). > Ben > I'm pretty sure that there are other ways, but I bounce around in some many dialects and so many versions of the dialects, that I can't keep track of the "coolest new way for doing things"... > > Dale > > ----- Original Message ----- > | From: "Johan Fabry" <[hidden email]> > | To: "A friendly place where any question about pharo is welcome" <[hidden email]> > | Sent: Tuesday, July 31, 2012 10:31:09 AM > | Subject: Re: [Pharo-users] How do you guys navigate while editing code? > | > | > | Hi Patrik, > | > | > | have you had a look at > | book.pharo-project.org/book/Tidbits/KeyboardShortcuts ? Does it > | answer your question? If not, it would be good to have that page > | updated. > | > | > | > | On 31 Jul 2012, at 13:07, Patrik Sundberg wrote: > | > | > | Hi, > | > | > | Jumping in as a smalltalk beginner I am, as one would expect, feeling > | frustrated by not knowing my way around. Can see lots of cool stuff > | but all the mouse action is killing me. I'm a vim(+tmux) guy by > | background so the contrast is vast, I usually never need to touch my > | mouse when programming. > | > | > | I was trying to find some keyboard shortcuts to do things like "jump > | to method within class with fuzzy search logic" (type a few > | characters and get list etc) or "jump to the method/class under > | which the cursor is located". The jump to selected needs text > | selection which seems really awkward (even when selecting with > | keyboard), my 90% case is to jump to what's under the cursor. The > | global find class and find methods are good, but most of the time > | I'm interested in "local" navigation in the current class while > | jumping back and forth between methods in same class. > | > | > | I find more things in Nautilus since I can list the shortcuts there, > | but quite a few doesn't seem to work and I'm not having much luck > | using nautilus in 1.4 (and 2.0 too edgy for me right now, need > | metacello to load things cleanly etc at least). In OB in 1.4 I'm not > | able to figure out how to get a list of shortcuts apart from what's > | annotated in menus > | > | > | Guess my question is - how does a keyboard centric person like me > | learn keyboard shortcuts and get productive in the image, more > | specifically 1.4 and OB? How can I work out what keyboard shortcuts > | exist? > | > | > | Thanks! > | > | > | > | > | > | > | ---> Save our in-boxes! http://emailcharter.org <--- > | > | > | Johan Fabry > | [hidden email] - http://www.dcc.uchile.cl/~jfabry > | PLEIAD Lab - Computer Science Department (DCC) - University of Chile > | > | > | > | > | > |
In reply to this post by Patrik Sundberg
do not select code
just put the cursor on the line and doit get the complete line then you can click once and it will select the complete expression. but as dale said first get used to cmd-m cmd-n cmd-N cmd-b Then the good news is that in pharo 2.0 we will have much more and better shortcuts many of us do not like mouse either :) Stef On Jul 31, 2012, at 8:31 PM, Patrik Sundberg wrote: > Thanks for that list. That should hopefully teach me some tricks - my right hand is dying using the mouse as much as I am right now :) > > On Tue, Jul 31, 2012 at 6:31 PM, Johan Fabry <[hidden email]> wrote: > Hi Patrik, > > have you had a look at book.pharo-project.org/book/Tidbits/KeyboardShortcuts ? Does it answer your question? If not, it would be good to have that page updated. > > On 31 Jul 2012, at 13:07, Patrik Sundberg wrote: > >> Hi, >> >> Jumping in as a smalltalk beginner I am, as one would expect, feeling frustrated by not knowing my way around. Can see lots of cool stuff but all the mouse action is killing me. I'm a vim(+tmux) guy by background so the contrast is vast, I usually never need to touch my mouse when programming. >> >> I was trying to find some keyboard shortcuts to do things like "jump to method within class with fuzzy search logic" (type a few characters and get list etc) or "jump to the method/class under which the cursor is located". The jump to selected needs text selection which seems really awkward (even when selecting with keyboard), my 90% case is to jump to what's under the cursor. The global find class and find methods are good, but most of the time I'm interested in "local" navigation in the current class while jumping back and forth between methods in same class. >> >> I find more things in Nautilus since I can list the shortcuts there, but quite a few doesn't seem to work and I'm not having much luck using nautilus in 1.4 (and 2.0 too edgy for me right now, need metacello to load things cleanly etc at least). In OB in 1.4 I'm not able to figure out how to get a list of shortcuts apart from what's annotated in menus >> >> Guess my question is - how does a keyboard centric person like me learn keyboard shortcuts and get productive in the image, more specifically 1.4 and OB? How can I work out what keyboard shortcuts exist? >> >> Thanks! >> > > > ---> Save our in-boxes! http://emailcharter.org <--- > > Johan Fabry > [hidden email] - http://www.dcc.uchile.cl/~jfabry > PLEIAD Lab - Computer Science Department (DCC) - University of Chile > > > > > |
In reply to this post by Benjamin Van Ryseghem (Pharo)
----- Original Message ----- | From: "Benjamin" <[hidden email]> | To: "A friendly place where any question about pharo is welcome" <[hidden email]> | Sent: Tuesday, July 31, 2012 12:22:35 PM | Subject: Re: [Pharo-users] How do you guys navigate while editing code? | | On Jul 31, 2012, at 7:46 PM, Dale Henrichs wrote: | | > Finally I use 'search method source with it' where I select a | > substring and then get a list of all the methods with the | > substring. Depending upon which version of Pharo you are using, | > this menu item is hidden ... (I've found that the Transcript | > consistently has this menu item...WTF). | > | cmd+shift+e ? that sequence finds string literal matches (I think: method strings vs. method source) which is more restrictive than the source search, since it will find patrial strings, class names, chunks of a selector ... the common use case is that some reports an error message in a bug report mail message and I want to find the method where the error is thrown (or where the message is constructed) and I usually don't know which part of the message is constant and which part is generated, so I pick a likely chunk and see what I end up finding ... usually my first guess is good enough to find the method I am looking for ... Dale |
In reply to this post by Stéphane Ducasse
----- Original Message ----- | From: "Stéphane Ducasse" <[hidden email]> | To: "A friendly place where any question about pharo is welcome" <[hidden email]> | Sent: Tuesday, July 31, 2012 12:23:52 PM | Subject: Re: [Pharo-users] How do you guys navigate while editing code? | | do not select code | just put the cursor on the line and doit get the complete line | | then you can click once and it will select the complete expression. | Stef, I think this only works for doits ... for the implementors/sendors shortcuts you have to select the whole message pattern you are interested in... | but as dale said first get used to | cmd-m | cmd-n | cmd-N | cmd-b | | Then the good news is that in pharo 2.0 we will have much more and | better shortcuts | many of us do not like mouse either :) | | Stef |
In reply to this post by Stéphane Ducasse
On Tue, Jul 31, 2012 at 8:23 PM, Stéphane Ducasse <[hidden email]> wrote: do not select code But I don't want the full line :) I just want the expression under the cursor. What I'm asking after is Ctrl+] and Ctrl+t in vim terms. then you can click once and it will select the complete expression. Great! :)
|
In reply to this post by Dale Henrichs
On Tue, Jul 31, 2012 at 8:31 PM, Dale Henrichs <[hidden email]> wrote:
yeah, no cigar for me at least trying this. I have to select text. and it doesn't agree with me :) seems like a possible shortcut to implement though - take the current method and work out which message the cursor is sitting on (possibly via AST or similar), jump to it. then another shortcut to "return to previous position" (before the jump). that'd be one of the most common things I do - jump and take a peek at a method and come back.
I'm having vim withdrawal symptoms :)
|
Administrator
|
Ha ha. I know the feeling. Now that we have Keymapping, I finally started vim bindings for Pharo tools. The project is at http://ss3.gemstone.com/ss/VimPharo.html ( until I move it to github ;-) ). I'm very close to having most of the basic navigation shortcuts in normal mode implemented. In the long term, I think what would be the most powerful for Pharo is to reimagine what the vim shortcuts would be if they operated on live objects (AST) instead of text snippets... HTH, Sean
Cheers,
Sean |
indeed, I've noted the project and I'm following it :) all the prerequisites to do something very powerful is there. I can even imagine something as controversial as an input/edit/refactoring service run by image and connected to (even remotely) by vim/emacs/whatever same way that slime works for lisp and emacs. > |
On Wed, 01 Aug 2012 08:31:53 +0100, Patrik Sundberg
<[hidden email]> wrote: > On Aug 1, 2012 2:47 AM, "Sean P. DeNigris" <[hidden email]> wrote: >> >> >> Patrik Sundberg wrote >> > >> > I'm having vim withdrawal symptoms :) >> > >> >> Ha ha. I know the feeling. Now that we have Keymapping, I finally >> started >> vim bindings for Pharo tools. The project is at >> http://ss3.gemstone.com/ss/VimPharo.html ( until I move it to github ;-) > ). >> I'm very close to having most of the basic navigation shortcuts in >> normal >> mode implemented. >> >> In the long term, I think what would be the most powerful for Pharo is >> to >> reimagine what the vim shortcuts would be if they operated on live >> objects >> (AST) instead of text snippets... >> >> HTH, Sean > > indeed, I've noted the project and I'm following it :) > > all the prerequisites to do something very powerful is there. I can even > imagine something as controversial as an input/edit/refactoring service > run > by image and connected to (even remotely) by vim/emacs/whatever same way > that slime works for lisp and emacs. While this sounds nice I do wonder if there is some simpler solution to common issues. When I create a top level category, for example, the logical thing would be for focus to go to the Class template. Similarly, when I click on the class category and the system presents the method template it seems fairly logical to put the focus on the text there. As it is, unless I've missed something, when a method template is automatically created in the source panel it is highlighted as if for editing but focus has to be switched to start editing, which removes the highlighting and so I have to re-create it with ctl-a! All this involves a lot of moving from keyboard to mouse and back again. Is there some shortcut for simply changing focus from panel to panel in the browser? Thomas Worthington |
Free forum by Nabble | Edit this page |