Xcodeã®ãã¼ãã¤ã³ãã»ããã¯ãç°å¢è¨å®ãã®ä¸ããå¤æ´ããäºãã§ãã¾ããç¬èªã®ã«ã¹ã¿ãã¤ãºãããå ´åã¯æ¢åã®ãã¼ãã¤ã³ãã»ãããè¤è£½ãã¦ãè¤è£½ããå®ç¾©ãã¡ã¤ã«ã«æãå ãã¦ãããã¨ã«ãªãã¾ãã
xcode_emacsã¨ãããã¼ãã¤ã³ãã»ãããè¤è£½ããå ´åã
~/Library/Application\ Support/Xcode/Key\ Bindings/xcode_emacs.pbxkeys
ã«ãã¼ãã¤ã³ããå®ç¾©ããXMLãã³ãã¼ããã¦ãã¾ãã(ç°å¢: Xcode3.0)
Xcodeã®ãç°å¢è¨å®ãã§ããããªãã®ã«ã¹ã¿ãã¤ãºãã§ãã¾ããããXMLãã¡ã¤ã«ãç´æ¥ããããã¨ã§ãç°å¢è¨å®ãã ãã§ã¯ã§ããªãã«ã¹ãã¤ãºãå¯è½ã«ãªãã¾ããEmacså¨ãªäººã¯ãã®ã¨ã³ããªã®ç¶ããåèã«ãªãã¨æãã¾ãã
*.pbxkeysã®ä¸èº«
è¤è£½ãããã¼ãã¤ã³ãå®ç¾©ã®ãã¡ã¤ã«ãããããã£ãªã¹ãã¨ãã£ã¿(/Developer/Applications/Utilities/Property\ List\ Editor.app/)ã§éãã¾ãã(viãªããã§ãokã ãã©éå°åæåãå ¥ã£ã¦ã¦æ±ãã«ãããã)
ä¸èº«ã¯Root以ä¸ã«ãmenuãã¨ãtextãã¨ããè¦ç´ ãã¶ãä¸ãã£ã¦ããæ§é ã«ãªã£ã¦ãã¾ããããã«
- ãmenuã以ä¸ã«ã¯Xcodeã®ã¡ãã¥ã¼æ¬ã§ä½¿ããæ©è½ã®ãã¼ãã¤ã³ã
- ãkeyã以ä¸ã«ã¯ã¨ãã£ã¿ã§ç·¨éãã¦ããéã«ä½¿ããã¼ãã¤ã³ã
ãå®ç¾©ããã¦ãã¾ãã
ä¾ã¨ãã¦ãCtrl + bãã§ãã«ã¼ã½ã«ãä¸ååã«ç§»åãã¯ä¸è¨ã®ããã«Key/Stringåã®ã»ããã§å®ç¾©ããã¦ãã¾ããStringåã®å¤ã¯ã»ã¬ã¯ã¿ã«ãªãã¾ãã
<key>^b</key> <string>moveBackward:</string>
Emacsã®ãC-xãã¿ãããªããã¬ãã£ãã¯ã¹ããã¤ãã¼ãã¤ã³ãã追å ãã
Xcodeã¯ããã©ã«ã㧠Emacsã§ãã使ãããã C-x ãããã¬ãã£ãã¯ã¹ã«æã¤ãã¼ãã¤ã³ããå®ç¾©ã§ããããã«ãªã£ã¦ãã¾ããï¼C-x C-f ã¿ãããªã®ãããã ï¼
ããEmacs風ã«ããããã«ãC-cãããã¬ãã£ãã¯ã¹ã«ãããã¼ãã¤ã³ããå ããã«ã¯ããtextãè¦ç´ ã®åè¦ç´ ã«Dictionaryå(dict)ã追å ãã¾ãã
<key>^c</key> <dict> <key>^c</key> <string>switchToCounterpartOfCurrentFile:</string> </dict>
ï¼ãµã³ãã«ã¯ããC-c C-c ãã§ãããã¨ã½ã¼ã¹ã交äºã«åãæ¿ãããã¼ãã¤ã³ãã®å®ç¾© )
( * Xcodeã®ç°å¢è¨å®ã§ã¯ãã¬ãã£ãã¯ã¹ã追å ããäºã¯ã§ããªãããã§ãã)
( * Cocoaã«ã¯ç²¾éãã¦ãªãã®ã§ç´°ããçç±ãããåãããªããã§ããããmenuãã®ä¸ã«ã¯ ãã¼ã¹ããã¼ã¯ã®ãã¼ãã¤ã³ãã¯å®ç¾©ã§ããªãã¿ããã )
ããã¹ããã¯ãã®ãã¼ãã¤ã³ããå ãã
ããã¹ããã¯ãã®ãã¼ãã¤ã³ããå ãããå ´åã¯ä»¥ä¸ã®ããã«ãªãã¾ãããã¤ã³ãã¯Identifierã§ãã
- Identifierãobc.log.extendã¨ãããã¯ãã¯
- textMacro_obj_log_extend ã»ã¬ã¯ã¿ã¨ãã¦æ±ããã
ãµã³ãã«ã¨ãã¦
{ Identifier = objc.log.extend; BasedOn = objc; IsMenuItem = YES; Name = "NSLog() Call"; TextString = "NSLog$(PreFunctionArgsSpacing)($(InFunctionArgsSpacing)@\"%s <#message#>\"$(InFunctionArgsSpacing),__FUNCTION__,<#!args!#>);"; CompletionPrefix = log; IncludeContexts = ( "xcode.lang.objc.block" ); },
ä¸è¨ã®ãããªãã¯ããå®ç¾©ããå ´åãããããã£ãªã¹ãã¨ãã£ã¿ã§ã¯ä»¥ä¸ã®ããã«è¨å®ããã¨okã§ã
<key>l</key> <string>textMacro_objc_log_extend</string>