Here is a simple script that will show all the vim mappings from the tex file (help file that comes with the vim scripts).
This will prove to be very useful in usin gthe mappings 🙂
#!/bin/bash –
#===============================================================================
#Â Â Â Â Â Â Â Â Â FILE:Â get_mappings_from_tex_for_vim.sh
#Â Â Â Â Â Â Â Â USAGE:Â ./get_mappings_from_tex_for_vim.sh
#Â Â DESCRIPTION:Â Get the mappings from tex file
#      OPTIONS: —
# REQUIREMENTS: —
#         BUGS: —
#        NOTES: —
#Â Â Â Â Â Â Â AUTHOR:Â <a class="zem_slink" title="Amit Agarwal" rel="self" href="http://blog.amit-agarwal.co.in">Amit Agarwal (AKA), amit.agarwal@amit-agarwal.co.in
#Â Â Â Â Â Â COMPANY:Â Individual
#Â Â Â Â Â Â VERSION:Â 1.0
#Â Â Â Â Â Â CREATED:Â 09/06/2009 09:19:19 PM IST
#     REVISION: —
#===============================================================================
file=$1
IFS=$(echo -e ’\n’)
for i in $(cat $file |<a class="zem_slink freebase/en/grep" title="Grep" rel="wikipedia" href="http://en.wikipedia.org/wiki/Grep">grep ”^..line”)
do
#echo $i |<a class="zem_slink freebase/en/awk" title="AWK" rel="homepage" href="http://cm.bell-labs.com/cm/cs/awkbook/index.html">awk -F”’” '{print $2” ” $3” ”$4}’|awk -F”&” '{print $1” ”$2}’
echo $i |awk -F”’” '{
if ( NF >= 4 )
{
print ($2”\t ->”$4”\t==»”$NF);
}
else
{
print($2”\t–>”$3);
}
fi
}’Â |<a class="zem_slink freebase/en/sed" title="Sed" rel="wikipedia" href="http://en.wikipedia.org/wiki/Sed">sed ’s/\h.*(/(/’ |sed ’s/>.*&/>/’ |sed ’s/\t*-.>$//’ |sed ’s/\//’
Continue reading