Skip to content

Instantly share code, notes, and snippets.

@hotoo
Created April 28, 2011 07:05
Show Gist options
  • Select an option

  • Save hotoo/945936 to your computer and use it in GitHub Desktop.

Select an option

Save hotoo/945936 to your computer and use it in GitHub Desktop.
let g:use_bash="zsh"
" 打开终端窗口。
" TODO: 默认打开指定的目录。
" TODO: Vim 的等待提示。
function! OpenBash(...)
let bash=':!open /bin/bash'
if g:OS#win
let bash=':!start cmd'
elseif "zsh" == g:use_bash
let bash=':!open /bin/zsh'
endif
exec bash
endfunction
command -nargs=? Cmdhere call OpenBash(<f-args>)
command -nargs=? Bashere call OpenBash(<f-args>)
command -nargs=? Bashhere call OpenBash(<f-args>)
@terry6394
Copy link

第二个问题:
if input("Coffee or beer? ") == "beer"
echo "Cheers!"
endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment