EmacsããDashã®ããã¥ã¡ã³ãã«ç´ æ©ãã¢ã¯ã»ã¹ãã
ã¿ã¤ãã«ã¨ç´æ¥ã¯é¢ä¿ãªããã ãã©ãæè¿ãAlfredã¨ãããã¼ã«ã使ãå§ãã¦ã¿ããAlfredã®èª¬æã¯ä»¥ä¸ã®è¨äºã«è©³ãã説æããã¦ããã®ã§è¦ã¦ã¿ãã¨ãããã¨ãï¼Alfredã®ãã¼ã¸ã§ã³ã2ãªã®ã§Alfred2ã¨è¨ãã°ããã®ãããã®ã¾ã¾Alfredã¨ã ãè¨ãã°ããã®ãããããããªãï¼
Mac仕事効率化!Spotlightを完全に超えた神ランチャーアプリ「Alfred 2」の使い方とおすすめWorkflows10選。[Mac] | MacWin Ver.1.0
Alfredã¯Spotlightã®ä»£ããã«ãªãã ãã§ãªããè²ã ãªã¢ããªã±ã¼ã·ã§ã³ã¨é£æºãããã¼ãã¼ãæä½ã ãã§è²ã ãªãã¨ãåºæ¥ãããã«ãªããï¼è¨ç®ããããã¿ã¼ããã«ã§ã³ãã³ãå®è¡ããããStackoverflowã®æ¤ç´¢ããããããã¤ã¼ããã¦ã¿ãããã¤ã¡ã¼ã¸ã¨ãã¦ã¯Emacsã®Anythingãhelmã¿ãªããªãï¼ããã©ã«ãã§å ¥ã£ã¦ããé£æºæ©è½ã ãã ã¨ãã¾ããããããªãã®ã§ãWorkflowã¨ããæ©è½ã§è²ã ãªã¢ããªã±ã¼ã·ã§ã³ã¨é£æºãã¦ãããã¨ã«ãªããã©ããã®æ©è½ã使ãã«ã¯ã©ã¤ã»ã³ã¹ãè³¼å ¥ããå¿ è¦ããããï¼è¨äºãæ¸ãã¦ããæç¹ã ã¨1ã©ã¤ã»ã³ã¹17ã¦ã¼ãããï¼
é£æºããã¢ããªã±ã¼ã·ã§ã³ã®ä¸ã¤ã«Dashããããããã使ãã¨ã©ããªã¢ããªã±ã¼ã·ã§ã³ã使ã£ã¦ãã¦ãããã«Dashã®ããã¥ã¡ã³ãã«ã¢ã¯ã»ã¹åºæ¥ããããªãã
æµãã¨ãã¦ã¯ãAlfred2èµ·åï¼æ¤ç´¢ã¯ã¨ãªå
¥åï¼Enterï¼Dashã®è©²å½ãã¼ã¸ãéããã¨ããæãã
以ä¸ã¯ãRubyã®strftimeé¢æ°ã®ããã¥ã¡ã³ããéãã¾ã§ã®æ§åãGifã¢ãã¡ã«ãã¦ã¿ãã¨ããã
ã¡ãªã¿ã«ãAlfredã¨Dashãé£æºããã«ã¯ä»¥ä¸ã®å ´æããWorkflowããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ããå¿ è¦ããããï¼ãã®åã«ãDashãã¤ã³ã¹ãã¼ã«ãã¦ããå¿ è¦ããããã©ãï¼
GitHub - zenorocha/alfred-workflows: A collection of Alfred 3 workflows that will rock your world
AlfredããGoã®ããã¥ã¡ã³ããæ¤ç´¢åºæ¥ãããã«ãã
ã¡ãªã¿ã«ãä¸è¨ã®Dashã®Workflowï¼v1.17ï¼ã¯Goã«å¯¾å¿ãã¦ããªãã£ã½ããã©ãç°¡åã«è¿½å ãããã¨ãåºæ¥ãã
1. ã¾ããAlfredã®è¨å®ã®Workflowsãã¿ããéããç»é¢å³ä¸ã®ãã©ã¹ã®ãã¿ã³ãæ¼ãããInputãï¼ãScrept Fileterãã¨é¸æã
2. 次ã®ãããªç»é¢ãéãã®ã§å
容ãå
¥åã以ä¸ã¯ãGoç¨ã«å
容ãå
¥åããã¨ãããä»ã®è¨èªã®è¨å®ãéãã¦ã¿ã¦ãåãããã«ããã¨ããã以ä¸ã®ä¾ã§ã¯è²ã
å¤æ´ãã¦ããããã«è¦ãããã©ãéè¦ãªã®ã¯Keywordã®ã¨ããããgoãã«ããã¨ããã
3. ããã¨ã以ä¸ã®æ§ãªã¢ã¤ã³ã³ãç¾ãã¦ããã®ã§ãã§ã£ã±ã£ã¦ãã¨ããããã¦ã¹ã§å¼ã£å¼µããã
4. ããã«ãããã¨æã£ã¦ããã
5. ããã¾ã§ã§ããããAlfredãèµ·åããgo printlnããªã©ã¨å
¥åããã¨ãä»ã®ããã¥ã¡ã³ãã¨åãããã«æ¤ç´¢ã§ããããã«ãªããã¾ãç°¡åã
EmacsããDashã®ããã¥ã¡ã³ãã«ç´ æ©ãã¢ã¯ã»ã¹
ãã¦ãããã¾ã§ã§ã ãã¶ããã¥ã¡ã³ãã¸ã®ã¢ã¯ã»ã¹ãç°¡åã«ãªã£ãããã ãã©ãEmacsããDashã®ããã¥ã¡ã³ããéãdash-at-pointã¨ããElispãããã®ãç¥ã£ãã®ã§å ¥ãã¦ã¿ãã
ãããä¾ã«ãã£ã¦ã以ä¸æµãã§æä½ããã¨ãããGifã¢ãã¡ã«ãã¦ã¿ãã
- Goã®Printlné¢æ°ã®ããã¥ã¡ã³ããéã
- Goã®ListenAndServeé¢æ°ã®ããã¥ã¡ã³ããéã
- Elispã®add-to-listé¢æ°ã®ããã¥ã¡ã³ããéã
ãããªæãã§ã«ã¼ã½ã«ã«ããåèªã®ããã¥ã¡ã³ããä¸çºã§éããã¨ãåºæ¥ãããã«ãªãã
dash-at-pointã®ã¤ã³ã¹ãã¼ã«ã¯list-packagesã§è¡ããinit.elã«ä»¥ä¸ã®ãããªãã¼ãã¤ã³ãã®è¨å®ãæ¸ãã¦ããã¨ããã
;; dash-at-point (global-set-key "\C-cd" 'dash-at-point) (global-set-key "\C-ce" 'dash-at-point-with-docset)
ä¾ãã°ãgo-modeã§éãã¦ãããããã¡ã®ã©ããã«ã«ã¼ã½ã«ãããã¦ãC-c dã¨ããã¨Dashã®Docsetã«go:ãæå®ãããä¸ã§ãã«ã¼ã½ã«ä¸ã®æåãæ¤ç´¢ããããã
ãªã®ã§ãããã¥ã¡ã³ãã¸ã®ã¢ã¯ã»ã¹ãAlfred>Dashã®ãããããããä¸å£°ãæ©ããããã¯æåçã
ã¡ãªã¿ã«ãC-c d(dash-at-pointãå®è¡)ããã¨ãæå®ãããDocsetã¯ã¡ã¸ã£ã¼ã¢ã¼ãã¨ï¼å¯¾ï¼ã§å¯¾å¿ããã¦ãããã©(go-modeã®ã¨ãã¯ãgo:ããruby-modeã®ã¨ãã¯ãruby:ãã¨ãã£ãæã)ãDocksetã®ååãã«ã¹ã¿ã ããæã対å¿ããã¡ã¸ã£ã¼ã¢ã¼ãã¨ã®å¯¾å¿ãç¡ãã¨ããªã©ã¯æ¬¡ã®ããã«ãã¦å¤æ´ï¼ã¾ãã¯è¿½å ï¼ãããã¨ãã§ããããã®ä¾ã¯ãweb-modeã®ã¨ãC-c dããã¨Dashã§ã¯Docsetãhtml:ããæå®ãããä¸ã§æ¤ç´¢ãå®è¡ãããããã«ãªãã
;; web-modeã®ã¨ãã®Docsetã¯htmlã¨ãã (add-to-list 'dash-at-point-mode-alist '(web-mode . "html"))
ããã«ãweb-modeã®ãããã¡ããCSSã®ããã¥ã¡ã³ããéãããã£ã¦ãã¨ãããã¨ããã®ã§ãããããæã¯ãC-c e(dash-at-point-with-docset)ãå®è¡ããã¨ãæåã«Docsetãæå®(ãã®å ´åcssãæå®)ããä¸ã§ããã¥ã¡ã³ããéããã¨ãããã¨ãã§ããã
Emacsï¼Dashã ããªãAlfredã¯å¿ è¦ãªããã ãã©ãAlfredããã£ãã»ããEmacs使ã£ã¦ãªãæã«ãDashã¢ã¯ã»ã¹ã§ããã®ã§ä¸ç·ã«å ¥ãã¦ããã¨ããããã
ãã®è¨äºãæ¸ããæã«Dashã¯2,000åã§ãAlfred2ã¯Family Licenseãè²·ã£ãã®ã§27ã¦ã¼ãï¼3,800åãããï¼ã ã£ãï¼2å°ä»¥ä¸ã®Macã«å ¥ãããããªãFamily Licenseããå¾ã£ã½ããï¼ã©ã¤ã»ã³ã¹ã¯17ã¦ã¼ãï¼ãããªãã«æè³ã¯å¿ è¦ã ãã©ãä½æ¥ã®å¹çã¯ãã以ä¸ã«åä¸ããããªæ°ãããã®ã§ããªãã§ä»ã¾ã§ä½¿ã£ã¦ãªãã£ãã®ããªã¼ã¨ãåçã