vim: allow calling with arguments

For example:

  :NotMuch date:today

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras 2013-10-13 23:25:44 -05:00
parent 77c2c3143b
commit a760e4ab47

View file

@ -273,12 +273,14 @@ function! s:show_next_thread()
endfunction endfunction
function! s:kill_this_buffer() function! s:kill_this_buffer()
ruby $curbuf.close
bdelete!
ruby << EOF ruby << EOF
$buf_queue.pop if $buf_queue.size > 1
b = $buf_queue.last $curbuf.close
VIM::command("buffer #{b}") if b VIM::command("bdelete!")
$buf_queue.pop
b = $buf_queue.last
VIM::command("buffer #{b}") if b
end
EOF EOF
endfunction endfunction
@ -412,7 +414,7 @@ function! s:set_defaults()
endif endif
endfunction endfunction
function! s:NotMuch() function! s:NotMuch(...)
call s:set_defaults() call s:set_defaults()
ruby << EOF ruby << EOF
@ -863,9 +865,13 @@ ruby << EOF
get_config get_config
EOF EOF
call s:folders() if a:0
call s:search(join(a:000))
else
call s:folders()
endif
endfunction endfunction
command NotMuch :call s:NotMuch() command -nargs=* NotMuch call s:NotMuch(<f-args>)
" vim: set noexpandtab: " vim: set noexpandtab: