Skip to content

Instantly share code, notes, and snippets.

@daisuzu
Created September 6, 2012 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daisuzu/3656454 to your computer and use it in GitHub Desktop.
Save daisuzu/3656454 to your computer and use it in GitHub Desktop.
unite custom action(dirdiff)
NeoBundle 'vim-scripts/DirDiff.vim.git'
let dirdiff_action = {
\ 'description' : 'DirDiff with the other candidate',
\ 'is_selectable' : 1,
\ }
function! dirdiff_action.func(candidates)
if len(a:candidates) == 2
" :DirDiff with selected candidates
call unite#util#smart_execute_command('tabnew', '')
execute ':DirDiff ' . a:candidates[0].action__path . ' ' . a:candidates[1].action__path
endif
endfunction
call unite#custom_action('directory', 'dirdiff', dirdiff_action)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment