vim – get mappings from the help tex files available with the scripts.

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:  Amit Agarwal (AKA), [email protected]
#       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 |grep \”^..line\”)
do
#echo $i |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
}\’  |sed \’s/\\h.*(/(/\’ |sed \’s/>.*&/>/\’ |sed \’s/\\t*-.>$//\’ |sed \’s/\\//\’

done

\"Reblog

About Amit Agarwal

1 Comment on “vim – get mappings from the help tex files available with the scripts.”

1 Trackback on “vim – get mappings from the help tex files available with the scripts.”