emacsã®ãã¼ãã¤ã³ãã表示ãããwhich-keyãå°å ¥ãã
ã¯ããã«
ãã®åãã¡ã¿ãã¼ãã©ã¹ä½ãã§ä½¿ãããã¼ãã¤ã³ãã調ã¹ãã
ããããè¤æ°ã®ãã¼ã使ããã¼ãã¤ã³ã(C-x C-cã¨ã)ãå«ããã¨ããã¼ãã¤ã³ãã¯ç¡æ°ã«ããããããã«scratchãããã¡ã§ãC-h bãã¦åºã¦ãããããã¡ã®è¡æ°ãã«ã¦ã³ããã¦ã¿ãã¨ã1282è¡ãã£ãã空ç½è¡çãã¼ãã¤ã³ãã§ã¯ãªãè¡ãããã«ãã¦ãã軽ã1000ã¯ãã¼ãã¤ã³ããå®ç¾©ããã¦ããã ãããã¡ã¸ã£ã¼ã¢ã¼ãã«ãã£ã¦ã¯ãã£ã¨ãã£ã¨å¤ãã¯ãã
ããã§ä¾¿å©ãªãã¤ãã¼ã¢ã¼ãã«guide-keyãããããã¼ãã¤ã³ãããã£ã¨è¦ããããã«ã«ã¹ã¿ãã¤ãºããªãã¨ãªãã¨æã£ã¦èª¿ã¹ã¦ãããããã³ãã¡ããã®ã¨ããã§ãwhich-keyã¨ããã®ãç´¹ä»ããã¦ããã®ã§å°å ¥ãã¦ã¿ãã
which-keyã¨ã¯
ä¸è¨ã«é ç½®ããã¦ãããpackage.elã§ç°¡åã«å°å ¥ã§ããã
which-key started as a rewrite of guide-key-mode, but the feature sets have diverged to a certain extent.
ã¨ãããã¨ãªã®ã§ãguide-keyããã¨ã«ä½ããããã®ãããã
ã²ã¨ã¾ã使ããªããpackage.elã§ã²ãããããã¨ã
(require 'which-key) (which-key-mode)
ã ãã§ç°¡åã«ä½¿ããã
guide-keyã¨ã®éã
表示ãããã¼ãã¤ã³ãã®ããªãã£ãã¯ã¹ãæå®ããªãã¦ãã
guide-keyã ã¨ã
(require 'guide-key) (setq guide-key/guide-key-sequence '("C-c" "C-z" "C-x")) (guide-key-mode 1)
ã®ããã«ãã©ã®ããªãã£ãã¯ã¹ã®å ´åã«ãã¼ãã¤ã³ãã表示ãããæå®ãã¦ããå¿ è¦ããã£ããã©ãwhich-keyã¯ä¸è¦ãããã©ã«ãã§ãã¹ã¦ã®ãã¼ãã¤ã³ãã表示ããããä¾ãã°ãC-xãå ¥åãããã¨ã1ç§ç¨åº¦å ¥åããªãã§ããã¨ãä¸ã®ã¹ã¯ãªã¼ã³ã·ã§ããã®ããã«ããããã¢ãããã¦ãã¼ãã¤ã³ãã表示ãããã
表示æ¹æ³ããWindowsã®åå²ï¼ããã©ã«ãè¨å®ãããã©ã«ãã§ã¯ä¸ä¸ã«åå²ãã¦ãä¸å´ã«è¡¨ç¤ºãããããã©ãè¨å®ããã°å·¦å³ã«åå²ãããã¨ãå¯è½ï¼ããããããã¡ãæ°è¦ãã¬ã¼ã ãã¦ã¼ã¶ã«ã¹ã¿ã ã®4種é¡ããé¸ã¶ãã¨ãã§ããããããããã¡ã¨æ°è¦ãã¬ã¼ã ã¯ã¡ãã£ã¨è§¦ã£ã¦ã¿ãéã使ãã«ããã£ãã®ã§ãæåã¯ããã©ã«ãè¨å®ã§ããã®ã§ã¯ãªããã¨ãã«ã¹ã¿ã ã§è¨å®ããã°ãauto-complete/companyã®ããã«è¡¨ç¤ºãããã¨ãã§ããããã ã
è¤æ°ãã¼ã¸ã«ã¾ããã£ã表示
ä¾ãã°C-xããå§ã¾ããã¼ãã¤ã³ããªãã¦ãã¡ããã¡ãå¤ããguide-keyã®èª¬æã«ãåã¾ããªãããçµã£ã¦è¨å®ãããã¨ããå§ãããã¦ãããã§ã¯ãå ¨é¨è¡¨ç¤ºãã¦ãã¾ãwhich-keyã¯ã©ããã¦ãããã¨ããã¨ãè¤æ°ãã¼ã¸ã«åãã¦è¡¨ç¤ºããã¨ããããæå³æ´æã«åºã¦ãããä¸ã®ã¹ã¯ãªã¼ã³ã·ã§ããã§ãã(1 of 5)ã¨5ãã¼ã¸ä¸ã®1ãã¼ã¸ç®ã表示ãã¦ãããã¨ãããããããã©ã«ãã§ã¯ãC-hã§ã¡ãã¥ã¼ã表示ããã¦æ¬¡ãã¼ã¸ã表示ãããã¨ãã§ããããã ããã¯ã¡ãã£ã¨åé¡ç¹ãå人çã«ã¯ããã
which-keyã®ä½¿ãã«ããã¨ãããä»å¾èª¿ã¹ããã¨ãã
è¤æ°ãã¼ã¸ã«ã¾ããã£ãå ´åã®ãã¼ã¸éãã«ãC-hã使ããã ããã©ãC-hã¯<DEL>ã«ç½®ãæãã¦ãã人ãå¤ãã¨æããããããã¨ãC-hã§æ¬¡ã®ãã¼ã¸ã£ã¦è¡¨ç¤ºããã¦ããã®ã§ãC-hãæ¼ãã¨ã<DEL>ãå ¥åããããã¨ã«ãªã£ã¦ãã¾ãã
ãããã«ãC-xã§åä½ã試ãã¦ããã®ã§ããã°ãã° C-x <DEL> (backward-kill-sentense)ãçºåãã¦ãã¾ããè¨å®æ¶å¤±ãååç¶ãã¨ãããã¨ããã°ãã°ãã£ãã
ã¾ããC-hã ãã§ãã¼ã¸éããã§ãããC-h nã¨ããªãã¨æ¬¡ã®ãã¼ã¸ãè¦ããªããåã®å ´åã¯<F1> nã¨ãªããããã¯ã¡ãã£ã¨ããã©ãããã
README.mdãè¦ãéããå½ããåã ãã©ãã®è¾ºã¯ã«ã¹ã¿ãã¤ãºã§ãããï¼which-key-use-C-h-for-pagingãããã®è¾ºããã£ã¦ã¿ããã©ãæå¾ ããåä½ã¨ãªããï¼ããã¡ãã¨è¨å®ããã°ä¾¿å©ã«ä½¿ããããªã®ã§ããã¡ãã£ã¨èª¿ã¹ã¦ã¿ããã