unite ã§ã¯
ã§ãaction ã«å¯¾ããã·ã§ã¼ãã«ãããè¨å®ããã«ã¯ä¾ã«ãã£ã¦ FileType unite ã§ä»¥ä¸ã®ããã«ããã
" after/ftplugin/unite.vim nnoremap <silent> <buffer> <C-k> :<C-u>call unite#mappings#do_action('right')<CR> inoremap <silent> <buffer> <C-k> <ESC>:call unite#mappings#do_action('right')<CR>
â¦ãããé·ããä½ãããã¼ãã«ã¢ã¼ãã¨æ¿å
¥ã¢ã¼ãã§å²ãå½ã¦å
ãå¤ããªãã¨ãããªãã大åã®äººã¯ã³ããããã ãããã©ãåå¿è
ã«ã¯åããã¥ããã
ãªã®ã§ãç§ã¯ä»¥ä¸ã®ãããªé¢æ°ãå®ç¾©ããã
function! s:do(action) return printf("%s:\<C-u>call unite#mappings#do_action(%s)\<CR>", \ (mode() ==# 'i' ? "\<ESC>" : ''), string(a:action)) endfunction
ããã§ã
nnoremap <silent> <buffer> <expr> <C-j> <SID>do('below') inoremap <silent> <buffer> <expr> <C-j> <SID>do('below')
ãããªé¢¨ã«ã§ãããã¡ãã£ã¨çããªã£ããä½ãã両æ¹ã¨ãåããããã³ã°ã§ããããããã
ãã®ç¨åº¦ã®é¢æ°ã¯ unite æ¬ä½ã«æ¬²ããã¨ãããååã¯ä½ã§ããããã ãã©ãçãæ¹ãå¬ããã®ã§ä¾ãã° unite#do() ã¨ã*1ãç¡éã«å¢ãã action ã«ä¸æã«
追è¨: unite#do_action() ã¨ãã¦åãè¾¼ã¾ãã¾ããï¼
http://github.com/Shougo/unite.vim/commit/4a6eddca83d623aa3ccb681ee19b02c433d5fb8b#L0R110
*1:ããã ã¨é¢æ°åããæå³ãããããããçãåªå ã§ã