<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Help File on Amit Agarwal Linux Blog</title>
    <link>/tags/help-file/</link>
    <description>Recent content in Help File on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Thu, 27 May 2010 11:44:39 +0000</lastBuildDate>
    
	<atom:link href="/tags/help-file/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>vim - get mappings from the help tex files available with the scripts.</title>
      <link>/2010/05/27/vim-mappings-tex-files-scripts/</link>
      <pubDate>Thu, 27 May 2010 11:44:39 +0000</pubDate>
      
      <guid>/2010/05/27/vim-mappings-tex-files-scripts/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here is a simple script that will show all the vim mappings from the tex file (help file that comes with the vim scripts).&lt;/p&gt;
&lt;p&gt;This will prove to be very useful in usin gthe mappings 🙂&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#!/bin/bash –&lt;br&gt;
#===============================================================================&lt;/p&gt;
&lt;h1 id=&#34;heading&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#          FILE:  get_mappings_from_tex_for_vim.sh&lt;/p&gt;
&lt;h1 id=&#34;heading-1&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#         USAGE:  ./get_mappings_from_tex_for_vim.sh&lt;/p&gt;
&lt;h1 id=&#34;heading-2&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#   DESCRIPTION:  Get the mappings from tex file&lt;/p&gt;
&lt;h1 id=&#34;heading-3&#34;&gt;&lt;/h1&gt;
&lt;p&gt;#       OPTIONS:  —&lt;br&gt;
#  REQUIREMENTS:  —&lt;br&gt;
#          BUGS:  —&lt;br&gt;
#         NOTES:  —&lt;br&gt;
#        AUTHOR:  &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Amit Agarwal&amp;quot; rel=&amp;quot;self&amp;quot; href=&amp;quot;http://blog.amit-agarwal.co.in&amp;quot;&amp;gt;Amit Agarwal&lt;/a&gt; (AKA), &lt;a href=&#34;mailto:amit.agarwal@amit-agarwal.co.in&#34;&gt;amit.agarwal@amit-agarwal.co.in&lt;/a&gt;&lt;br&gt;
#       COMPANY:  Individual&lt;br&gt;
#       VERSION:  1.0&lt;br&gt;
#       CREATED:  09/06/2009 09:19:19 PM IST&lt;br&gt;
#      REVISION:  —&lt;br&gt;
#===============================================================================&lt;br&gt;
file=$1&lt;br&gt;
IFS=$(echo -e &amp;amp;#8217;\n&amp;amp;#8217;)&lt;br&gt;
for i in $(cat $file |&amp;lt;a class=&amp;quot;zem_slink freebase/en/grep&amp;quot; title=&amp;quot;Grep&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Grep&amp;quot;&amp;gt;grep&lt;/a&gt; &amp;amp;#8221;^..line&amp;amp;#8221;)&lt;br&gt;
do&lt;br&gt;
#echo $i |&amp;lt;a class=&amp;quot;zem_slink freebase/en/awk&amp;quot; title=&amp;quot;AWK&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://cm.bell-labs.com/cm/cs/awkbook/index.html&amp;quot;&amp;gt;awk&lt;/a&gt; -F&amp;amp;#8221;&amp;amp;#8217;&amp;amp;#8221; &#39;{print $2&amp;amp;#8221; &amp;amp;#8221; $3&amp;amp;#8221; &amp;amp;#8221;$4}&amp;amp;#8217;|awk -F&amp;amp;#8221;&amp;amp;&amp;amp;#8221; &#39;{print $1&amp;amp;#8221; &amp;amp;#8221;$2}&amp;amp;#8217;&lt;br&gt;
echo $i |awk -F&amp;amp;#8221;&amp;amp;#8217;&amp;amp;#8221; &#39;{&lt;br&gt;
if ( NF &amp;gt;= 4 )&lt;br&gt;
{&lt;br&gt;
print ($2&amp;amp;#8221;\t -&amp;gt;&amp;amp;#8221;$4&amp;amp;#8221;\t==&amp;raquo;&amp;amp;#8221;$NF);&lt;br&gt;
}&lt;br&gt;
else&lt;br&gt;
{&lt;br&gt;
print($2&amp;amp;#8221;\t–&amp;gt;&amp;amp;#8221;$3);&lt;br&gt;
}&lt;br&gt;
fi&lt;br&gt;
}&amp;amp;#8217;  |&amp;lt;a class=&amp;quot;zem_slink freebase/en/sed&amp;quot; title=&amp;quot;Sed&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Sed&amp;quot;&amp;gt;sed&lt;/a&gt; &amp;amp;#8217;s/\h.*(/(/&amp;amp;#8217; |sed &amp;amp;#8217;s/&amp;gt;.*&amp;amp;/&amp;gt;/&amp;amp;#8217; |sed &amp;amp;#8217;s/\t*-.&amp;gt;$//&amp;amp;#8217; |sed &amp;amp;#8217;s/\//&amp;amp;#8217;&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
