Commit | Line | Data |
---|---|---|
50a964ce DM |
1 | #!/bin/sh |
2 | ||
3 | # Run Vim in ex mode (-e) and run the given script ($1) on startup. Our scripts | |
4 | # end with 'qall!' which causes actual Vim UI to never start up. | |
5 | # | |
6 | # Set environment variable DEBUG=1 to allow more verbose error output from Vim. | |
7 | # | |
8 | # See: http://vim.wikia.com/wiki/Vim_as_a_system_interpreter_for_vimscript | |
9 | ||
c9cf76dc JM |
10 | rundir=`dirname $0` |
11 | export LD_LIBRARY_PATH=`readlink -f $rundir` | |
50a964ce DM |
12 | vimscriptfile="$1" |
13 | shift | |
14 | if [ x$DEBUG = x ] ; then | |
15 | exec 2> /dev/null | |
16 | fi | |
5f66fc06 | 17 | exec vim -i NONE -V1 -nNesS $vimscriptfile -- "$@" | cat |