Tip: #745 - Find VIMRUNTIME in a bash script
Created: June 15, 2004 19:05 Complexity: advanced Author: Steve Hall Version: 6.0 Karma: 13/4 Imported from: Tip#745
I recently needed the value of $VIMRUNTIME in a bash shell script and was forwarded these two terrific solutions I wanted to post publically:
1. by Luc St-Louis
vim --cmd 'echo $VIMRUNTIME' --cmd 'quit' 2> /tmp/VIMRUNTIME.txt
VIMRUNTIME=`perl -pe 's/\r\n//g' /tmp/VIMRUNTIME.txt`
rm -f /tmp/VIMRUNTIME.txt
2. by Jacob Lerner
VIMRUNTIME=`vim -e -T dumb --cmd 'exe "set t_cm=\<C-M>"
Comments
what use is the variable? when you have vim?
motim , June 15, 2004 19:13