[R-SIG-Mac] ?> as a valid help request

Berend Hasselman bhh at xs4all.nl
Wed May 25 18:50:29 CEST 2011


On 25-05-2011, at 18:32, Timothy Bates wrote:

>> just do
>> '?>'
> On 25 May 2011, at 5:20 PM, Marc Schwartz wrote:
>> ?>
>> Error: unexpected '>' in “?>”
> 
> 
> Thanks Mark and Ian,
> Glad it’s a straightforward and memorable workaround. And this is easy in the new GUI (which adds quotes around a selection. Still wish that the error told me that was a likely cause: I just assumed it was impossible to search on.
> 
> Followup GUI query: Is there a was to go to the beginning of the command line directly? My method is to cmd-right select the line, then use right arrow to fall off the end of the selection leaving the cursor at the start (ready to type a ?)
> 
> This fails: The right arrow just does nothing…

Command-left arrow
Ctrl-A

And you can create a DefaultKeyBinding.dict in the directory ~/Library/Keybindings with  a mapping of the Home to the Cocoa cursor command "moveToBeginningOfLine:".
See http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html

For example, if you have a DefaultKeyBinding.dict file containing

{
    /* home  Shift+home*/
    "\UF729"  = "moveToBeginningOfLine:";
    "$\UF729" = "moveToBeginningOfLineAndModifySelection:";

    /* end  Shift+end*/
    "\UF72B"  = "moveToEndOfLine:";
    "$\UF72B" = "moveToEndOfLineAndModifySelection:";
}

Home will move the cursor to the start of a line
End  will move the cursor to the end of a line

Combined with a  shift key, these will select from the current cursor position to the start/end of line.


Berend


More information about the R-SIG-Mac mailing list