For example:
:NotMuch date:today
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
endfunction
function! s:kill_this_buffer()
- ruby $curbuf.close
- bdelete!
ruby << EOF
- $buf_queue.pop
- b = $buf_queue.last
- VIM::command("buffer #{b}") if b
+ if $buf_queue.size > 1
+ $curbuf.close
+ VIM::command("bdelete!")
+ $buf_queue.pop
+ b = $buf_queue.last
+ VIM::command("buffer #{b}") if b
+ end
EOF
endfunction
endif
endfunction
-function! s:NotMuch()
+function! s:NotMuch(...)
call s:set_defaults()
ruby << EOF
get_config
EOF
- call s:folders()
+ if a:0
+ call s:search(join(a:000))
+ else
+ call s:folders()
+ endif
endfunction
-command NotMuch :call s:NotMuch()
+command -nargs=* NotMuch call s:NotMuch(<f-args>)
" vim: set noexpandtab: