Skip to content

Commit

Permalink
Merge pull request #28 from okamos/feature/use_denite
Browse files Browse the repository at this point in the history
Add use denite
  • Loading branch information
glidenote committed Sep 9, 2016
2 parents 72b0ab9 + e9c4c4e commit e5998fc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.markdown
Expand Up @@ -75,6 +75,15 @@ let g:memolist_unite_source = "file_rec"
" use arbitrary unite option (default is empty)
let g:memolist_unite_option = "-auto-preview -start-insert"
" use denite (default 0)
let g:memolist_denite = 1
" use arbitrary denite source (default is 'file_rec')
let g:memolist_denite_source = "anything"
" use arbitrary denite option (default is empty)
let g:memolist_denite_option = "anything"
" use various Ex commands (default '')
let g:memolist_ex_cmd = 'CtrlP'
let g:memolist_ex_cmd = 'NERDTree'
Expand Down
10 changes: 10 additions & 0 deletions autoload/memolist.vim
Expand Up @@ -92,10 +92,18 @@ if !exists('g:memolist_unite_source')
let g:memolist_unite_source = "file"
endif

if !exists('g:memolist_denite_source')
let g:memolist_denite_source = "file_rec"
endif

if !exists('g:memolist_unite_option')
let g:memolist_unite_option = ""
endif

if !exists('g:memolist_denite_option')
let g:memolist_denite_option = ""
endif

if !exists('g:memolist_delimiter_yaml_array')
let g:memolist_delimiter_yaml_array = " "
endif
Expand Down Expand Up @@ -134,6 +142,8 @@ function! memolist#list()
exe "VimFiler" g:memolist_vimfiler_option s:escarg(g:memolist_path)
elseif get(g:, 'memolist_unite', 0) != 0
exe "Unite" g:memolist_unite_source.':'.s:escarg(g:memolist_path) g:memolist_unite_option
elseif get(g:, 'memolist_denite', 0) != 0
exe "Denite" g:memolist_denite_source.':'.s:escarg(g:memolist_path) g:memolist_denite_option
elseif !empty(get(g:, 'memolist_ex_cmd', ''))
exe g:memolist_ex_cmd s:escarg(g:memolist_path)
else
Expand Down

0 comments on commit e5998fc

Please sign in to comment.