~/Library/KeyBindings/DefaultKeyBinding.dict

/*
        based on http://gnufoo.org/macosx/macosx.html
        place this at ~/Library/KeyBindings/DefaultKeyBinding.dict
        “^” for Control
        “~” for Option
        “$” for Shift
        “#” for numeric keypad http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/index.html
*/ 

{

        "^F"="moveWordForward:";
        "^B"="moveWordBackward:";
        "~f"="moveWordForward:";
        "~b"="moveWordBackward:"; 

        "^D"="deleteWordForward:";
        "^H"="deleteWordBackward:";
        "~d"="deleteWordForward:";
        "~h"="deleteWordBackward:"; 

        /* Escape should really be complete. */
        "\033"="complete:"; /* Escape */

}

what to do & install first for a new mac

install applications

system preference

  • keyboard > modifier key > change Caps Lock to Control
  • keyboard > keyboard shortcuts > add:
    app: "All Applications" / title: "System Preferences" / shortcut: Command + Shift + Comma
  • mouse > set Tracking faster, activate Secondary Button (ie. Right Click)
  • appearance > Click in the scroll bar to: > Jump to the spot that's clicked
  • appearance > check Double-click a window's title bar to minimize
  • expose & spaces > activate corner shortcut
  • (optional) sharing > File / Web / Screen Sharing, Remote Login
  • (optional) network > set fixed IP adress
  • (japanese) keyboard > keyboard shortcuts > set Spotlight to Command+Shift+Space
  • (japanese) language > input method > add Kotoeri Romaji / Kotoeri preference: Windows-like input style

other configuration

transfer from old environment

  • copy HOME>Library>Preferences and HOME>Library>Application Supports

better comment selection on xcode3

menu > script (a script icon) > edit user scripts… > comments > Un/Comment Selection

#! /usr/bin/perl -w
#
# un_commentLines.pl -  Comments or uncomments the selected lines
# Uses '# ' for Perl, Python, and shell scripts; '// ' otherwise

my $outputString = "";
my $perlCmt = "#";
my $cCmt = "//";

# get path to document
my $headerPath = <<'HEADERPATH';
%%%{PBXFilePath}%%%
HEADERPATH
chomp $headerPath;my $commentString;
if ($headerPath =~m/\.(sh|pl|py)$/) {
    $commentString = $perlCmt;
} else {
 $commentString = $cCmt;
}

my @selection = ;       # read the selection from standard input

# no chars in selection, so create an empty selection
if (!@selection) {
    push @selection, "";
};

# add or remove comment markers depending on the state of the first line of the selection
# if it is uncommented, comment all lines.  If it is commented, remove comment markers, if present
my $firstLineOfSelection = $selection[0]; #get first line
my $addingCommentsString = 1;
if ($firstLineOfSelection =~ /^\s*$commentString/) { #selection starts with comment
    $addingCommentsString = 0;
}

foreach my $line (@selection) {
    if ($addingCommentsString == 1) {
        $line =~ s/^(\s*)([^\s])/$1$commentString $2/;
        $outputString .= $line;
    } else {
        $line =~ s/^(\s*)$commentString\s?/$1/;
        $outputString .= $line;
    }
}

print "%%%{PBXSelection}%%%";
print $outputString;
print "%%%{PBXSelection}%%%";

contact: form / email / +33 6 49 52 84 01