random script dump
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314
  1. #!/usr/bin/env bash
  2. typeset -a vimopt=(
  3. '--cmd' 'let g:tvim = 1'
  4. )
  5. error() {
  6. echo "$*" >&2
  7. exit 1
  8. }
  9. termbin=$(command -v default-terminal-emulator) || termbin=$(command -v xterm) || error "No terminal found!"
  10. vimbin=$(command -v vim) || error "No vim binary found!"
  11. exec "$termbin" -c tvim -e "$vimbin" "${vimopt[@]}" "$@" &>/dev/null & disown