14 lines
		
	
	
	
		
			359 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
	
		
			359 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
typeset -a vimopt=(
 | 
						|
    '--cmd' 'let g:tvim = 1'
 | 
						|
)
 | 
						|
 | 
						|
error() {
 | 
						|
    echo "$*" >&2
 | 
						|
    exit 1
 | 
						|
}
 | 
						|
 | 
						|
termbin=$(command -v default-terminal-emulator) || termbin=$(command -v xterm) || error "No terminal found!"
 | 
						|
vimbin=$(command -v vim) || error "No vim binary found!"
 | 
						|
 | 
						|
exec "$termbin" -c tvim -e "$vimbin" "${vimopt[@]}" "$@" &>/dev/null & disown
 |