unite
ã¨è¨ãããã§ãunite ã® source ã®ä½ãæ¹ãç´¹ä»ãã¾ããæ¬æ ¼çã«ä½ã£ã¦é å¸ãããå ´åã¯å°ç¨ã®ãã¡ã¤ã«ã«æ¸ãã®ãããã®ã§ãããä»åã¯æ軽ã«ä½ãããã¨ãããã¨ã§ vimrc ã«æ¸ãã¾ãããããunite ã® source 㯠vimrc ã§ãæ¸ãã¾ãã ä»åä½ããã® ãµã³ãã«â¦
ã¡ãã£ã¨åã«ä½ã£ã¦ãã®ã§ããã§æãã¦ãããhttps://github.com/thinca/vim-ref/tree/unite絶è³ãã¹ããã¼ã¸ã§ã³ã§ããèªå·±è²¬ä»»ã§ï¼ ãããã¨è¤æ°ã® ref ãããã¡ãä¸åº¦ã«éããã¨ããã¨æå¾ã®ä»¥å¤ãçã£ç½ã«ãªãã¨ãããã°ãããã¾ããç´ãã®ã¡ãã£ã¨æéâ¦
unite ã§ã¯ 㧠action ãé¸æã§ãããã©ããã£ã±ããã使ããã®ã«ã¯ã·ã§ã¼ãã«ãããè¨å®ãã¦ããã¦ä¸çºã§å®è¡ããããã·ã§ã¼ãã«ããã«ã¤ãã¦ã¯ (unite_do_delete_action) ãªã©ãããã¤ãããããaction ãªãã¦ç¡å°½èµã«å¢ãããå ¨ã¦ã® action ã«å¯¾ã㦠ãè¨â¦
unite ã§çµãè¾¼ã¿æååãå ¥åãã¦ããã¨ãã常ã«å é ã®åè£ãé¸æããã¦ãã¦ãã®é¨åã®è²ãå¤ããã ã§ãé¸ã¶ã¨ãããè¿ãã«ããå ´å㯠Vim ã®è£å®ã®çããã£ã¦ãã¼ãã«ã¢ã¼ãã使ããªã㧠ã§é¸ã¶ã®ã ãã©ã1 åæ¼ããã ãã§ã¯æåã®é ç®ãé¸æãããã ãã§â¦
unite ã§ã¯é¸ãã 対象ã«å¯¾ãã¦æ§ã 㪠action ãå®è¡ã§ãããããããããã®ã§ãããã©ã«ã以å¤ã® action ãå®è¡ããå ´åã¯é¸æããå¿ è¦ãããã é¸æãããå ´åã¯å¯¾è±¡ãé¸ãã§ãã ãæ¼ããããã¨â¦ãããã風ã«ãªã£ã¦ action ãé¸ã¹ãããã ãâ¦ã¡ãã£ã¨å¾ ã£â¦
å人çã«ãããããã¨ãããããã®ã§ãaction ãå®ç¾©ãããããããã®ãç°¡åã«ã§ã㦠unite ã¯ç´ æ´ãããã let s:unite_action = { \ 'is_selectable': 1, \ } function! s:unite_action.func(candidates) " {{{ tabnew `=a:candidates[0].action__path` foâ¦
unite ã® file_rec ã¯ç¹å®ã®ãã£ã¬ã¯ããªä»¥ä¸ã®å ¨ãã¡ã¤ã«ãåæãã source ã§ãããã¸ã§ã¯ãã®ã«ã¼ããªãããæå®ããã°ããã¸ã§ã¯ãã®å ¨ãã¡ã¤ã«ãä¸æã§ãã¦ããã便å©ãªãã ãã©ãèå¿ã®æå®æ¹æ³ãç¾å¨ã®ãã£ã¬ã¯ããªã ã£ããã³ãã³ãã©ã¤ã³ããã®æå®â¦
Shougo ããã® unite.vim ãããªã便å©ã unite èªä½ã«é¢ãã説æã¯çç¥ããã¨ãã¦*1ãç¹ã« unite#set_substitute_pattern() ã使ãã¨ããããã§ãããã®ã§ãç§ã® unite ã®è¨å®ã®ä¸ã«ãã unite#set_substitute_pattern() ã«é¢ããé¨åãæãã¦ã¿ãã unite#â¦