<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Vim Tips on Amit Agarwal Linux Blog</title>
    <link>/categories/vim-tips/</link>
    <description>Recent content in Vim Tips on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Wed, 22 Jan 2014 01:15:40 +0000</lastBuildDate>
    
	<atom:link href="/categories/vim-tips/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>vim mappings – easy way to do things.</title>
      <link>/2014/01/22/vim-mappings-easy-things/</link>
      <pubDate>Wed, 22 Jan 2014 01:15:40 +0000</pubDate>
      
      <guid>/2014/01/22/vim-mappings-easy-things/</guid>
      <description>&lt;p&gt;You can use vim mappings to make some of your editor tasks very simple. Here I am giving you just a example, but you could always let your imagination run wild.&lt;/p&gt;
&lt;p&gt;:nmap ,b Oj0c$**hP&lt;/p&gt;
&lt;p&gt;And what do we do here.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;O – Add a new line&lt;/p&gt;
&lt;p&gt;– Go to &lt;a class=&#34;zem_slink&#34; title=&#34;Normal mode&#34; href=&#34;http://en.wikipedia.org/wiki/Normal_mode&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;normal mode&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;j – go to newly added line&lt;/p&gt;
&lt;p&gt;0 – Go to begining of line&lt;/p&gt;
&lt;p&gt;c$ – Change till &lt;a class=&#34;zem_slink&#34; title=&#34;Newline&#34; href=&#34;http://en.wikipedia.org/wiki/Newline&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;end of line&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim – yank/xopy in different register to paste</title>
      <link>/2014/01/16/vim-yankxopy-register-paste/</link>
      <pubDate>Thu, 16 Jan 2014 01:21:17 +0000</pubDate>
      
      <guid>/2014/01/16/vim-yankxopy-register-paste/</guid>
      <description>&lt;p&gt;Very quick update, to use registers, you can select and then yank in a register to paste using the same register. This could be a convinient way to copy multiple selections and then paste which ever selection you want. Here is the simple way to do it:&lt;/p&gt;
&lt;p&gt;visuallly select with v/V&lt;/p&gt;
&lt;p&gt;then “qy to yank (here we are yanking into register q, so in the command you can use any of a-z to use as register)&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Check all vim colorschemes for minor issues</title>
      <link>/2013/10/10/check-vim-colorschemes-minor-issues/</link>
      <pubDate>Thu, 10 Oct 2013 01:13:25 +0000</pubDate>
      
      <guid>/2013/10/10/check-vim-colorschemes-minor-issues/</guid>
      <description>&lt;p&gt;Here is script that checks all the colorschemes in the &lt;a class=&#34;zem_slink&#34; title=&#34;Working directory&#34; href=&#34;http://en.wikipedia.org/wiki/Working_directory&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;current directory&lt;/a&gt; and corrects them if possible (&lt;a class=&#34;zem_slink&#34; title=&#34;Processing (programming language)&#34; href=&#34;http://www.processing.org&#34; target=&#34;_blank&#34; rel=&#34;homepage&#34;&gt;Processing&lt;/a&gt; of the file is done with simple commands like &lt;a class=&#34;zem_slink&#34; title=&#34;Sed&#34; href=&#34;http://en.wikipedia.org/wiki/Sed&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;sed&lt;/a&gt;, &lt;a class=&#34;zem_slink&#34; title=&#34;Grep&#34; href=&#34;http://en.wikipedia.org/wiki/Grep&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;grep&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Checks that the color_name is same as &lt;a class=&#34;zem_slink&#34; title=&#34;Filename&#34; href=&#34;http://en.wikipedia.org/wiki/Filename&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;Filename&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is the script:&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;#!/bin/bash -
#===============================================================================
#
#          FILE: check_colors.sh
#
#         USAGE: ./check_colors.sh
#
#   DESCRIPTION:
#
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Amit Agarwal (aka), 
#      REVISION:  ---
#===============================================================================
cd ~/.vim/colors
for i in *vim
do
    #echo &#34;Processing $i&#34;
    if [[ $(grep -c g:colors_name $i ) -eq 0 ]]; then
        if [[ $(grep -c colors_name $i ) -eq 0 ]]; then
            echo &#34;File $i does not have colorname&#34;;
            missing=$missing&#34; $i&#34;
        else
            sed -i.bak &#39;/colors_name/ s/.*/let g:colors_name=&#34;&#39;${i//.vim}&#39;&#34;/g&#39; $i
        fi
    else
        if [[ $(grep -c colors_name $i|grep let ) -gt 1 ]]; then
            echo &#34;WARN -----&amp;gt;&amp;gt; File $i has more than one colorsname&#34;
        fi
        colorname=$(grep g:colors_name $i|grep let| sed -e &#39;s/&#34;//g&#39; -e &#39;s/.*=//&#39; |tr -d &#39; &#39;)
        if [[ ${colorname}.vim != $i ]]; then
            echo &#34;Filename $i does not match colorname $colorname .. correcting &#34;
            sed -i.bak &#39;/colors_name/ s/.*/let g:colors_name=&#34;&#39;${i//.vim}&#39;&#34;/g&#39; $i
            #sed -i.bak &#39;s/(.*g:colors_name.*=)/1&#39;${i//.vim}&#39;/g&#39; $i
        fi
    fi
done

if [[ x$missing != x ]] ; then
    echo &#34;Missing colornames in $missing&#34;
fi&lt;/pre&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul zemanta-article-ul-image&#34; style=&#34;margin: 0; padding: 0; overflow: hidden;&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;http://java.dzone.com/articles/using-grep-inside-vim&#34; target=&#34;_blank&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; alt=&#34;&#34; src=&#34;https://i0.wp.com/i.zemanta.com/204873595_80_80.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://java.dzone.com/articles/using-grep-inside-vim&#34; target=&#34;_blank&#34;&gt;Using Grep from Inside Vim&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;http://nathangrigg.net/vimhelp/&#34; target=&#34;_blank&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; alt=&#34;&#34; src=&#34;https://i1.wp.com/i.zemanta.com/noimg_35_80_80.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://nathangrigg.net/vimhelp/&#34; target=&#34;_blank&#34;&gt;Vim&amp;#8217;s full help in PDF form&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;http://www.vim.org/scripts/script.php?script_id=4586&#34; target=&#34;_blank&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; alt=&#34;&#34; src=&#34;https://i1.wp.com/i.zemanta.com/noimg_22_80_80.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://www.vim.org/scripts/script.php?script_id=4586&#34; target=&#34;_blank&#34;&gt;vim-colorscheme-switcher 0.2.5 &amp;#8212; Easily &amp; quickly switch between color schemes&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim maps – simple commands to do stuff.</title>
      <link>/2013/08/28/vim-maps-simple-commands-stuff/</link>
      <pubDate>Wed, 28 Aug 2013 01:03:42 +0000</pubDate>
      
      <guid>/2013/08/28/vim-maps-simple-commands-stuff/</guid>
      <description>&lt;p&gt;Some time back, I was working on some script for logging and I wanted to change the class to function like this:&lt;/p&gt;
&lt;pre class=&#34;brush: shell; gutter: true; first-line: 1&#34;&gt;$logger-&amp;gt;Debug(&#34;Test string&#34;);
loggerFunc(&#34;Debug&#34;, &#34;Test String&#34;);&lt;/pre&gt;
&lt;p&gt;As you can see, this change could be quite frustrating if you have quite a few references. And thus vim comes to rescue.&lt;/p&gt;
&lt;p&gt;Simple map like ::&lt;/p&gt;
&lt;pre class=&#34;brush: actionscript3; gutter: true; first-line: 1&#34;&gt;:map ,mm :s/(.*)$logger-&amp;gt;(.*)((.*)).*/1loggerFunc(&#34;2&#34;,3);/&lt;/pre&gt;
&lt;p&gt;and then I can do “/$logger-&amp;gt;” and then “n” to go to next match. Just do “,mm” and the line is re-factored.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Vim – Why and where am I getting these errors from?</title>
      <link>/2013/05/15/vim-errors-from/</link>
      <pubDate>Wed, 15 May 2013 01:47:13 +0000</pubDate>
      
      <guid>/2013/05/15/vim-errors-from/</guid>
      <description>&lt;p&gt;If you have got this question in your mind, then you are in right place.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;vim -V20  2&amp;gt;&amp;1 |tee&lt;/pre&gt;
&lt;p&gt;You can give the debugfile as any file, where you would want to log the debug messages. This will log a lot of information in the debugfile, you can open the file, once you have got the error in the main vim window. After this, you can open the debugfile and simply search for the error that you were getting. Just look for the reason why this error is originated in the debug logs and then it should be pretty simple to fix that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim mappings for multiple files.</title>
      <link>/2012/08/06/vim-mappings-multiple-files/</link>
      <pubDate>Mon, 06 Aug 2012 06:34:23 +0000</pubDate>
      
      <guid>/2012/08/06/vim-mappings-multiple-files/</guid>
      <description>&lt;p&gt;If you open multiple &lt;a class=&#34;zem_slink&#34; title=&#34;Computer file&#34; href=&#34;http://en.wikipedia.org/wiki/Computer_file&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;files&lt;/a&gt; in vim with &lt;a class=&#34;zem_slink&#34; title=&#34;Command-line interface&#34; href=&#34;http://en.wikipedia.org/wiki/Command-line_interface&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;command line option&lt;/a&gt;. Then the only way to move between the files is &lt;strong&gt;“:n”&lt;/strong&gt; and &lt;strong&gt;“:N”&lt;/strong&gt;. There is a easier way to do this. Just add mappings for this in vimrc. Here is what you can use.&lt;/p&gt;
&lt;pre class=&#34;brush: shell; gutter: true; first-line: 1&#34;&gt;map  :N
map  :n&lt;/pre&gt;
&lt;p&gt;And if you want to make sure that you move to the prev or next file after saving the file, then you modifyt the mapping like this:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Get yourself som new themes for vim</title>
      <link>/2012/02/15/som-themes-vim/</link>
      <pubDate>Wed, 15 Feb 2012 06:18:53 +0000</pubDate>
      
      <guid>/2012/02/15/som-themes-vim/</guid>
      <description>&lt;p&gt;Well, you would already have some themes for your vim, by default. And if you did not like them then you would have added some of your own too (downloaded from &lt;a href=&#34;http://www.vim.org&#34; target=&#34;_blank&#34;&gt;vim.org&lt;/a&gt;). But, those are something, that you might not still like and want to make some changes.&lt;/p&gt;
&lt;p&gt;Here’s, a new way to do it. Just go to the link mentioned below and click on Generate Dark or Generate Light. You can generate as many as you like and once you like the theme, simply click on vim in the bottom and download 🙂 BTW, you can generate textmate and Emacs theme as well.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>g flag in :s useless in vim</title>
      <link>/2011/11/05/flag-s-useless-vim/</link>
      <pubDate>Sat, 05 Nov 2011 07:33:19 +0000</pubDate>
      
      <guid>/2011/11/05/flag-s-useless-vim/</guid>
      <description>&lt;p&gt;Some time back there was a post on vim_use list about the “/g” flag for the search and replace functionality of the vim. And the response of “Tim Chase” on the same was very elaborate and interesting. I always knew that “/g” is only for replacing multiple occurrences on the same line, but here are few things that I did not know.&lt;/p&gt;
&lt;pre class=&#34;brush: text; gutter: true; first-line: 1&#34;&gt;   :0/this/s//that&lt;/pre&gt;
&lt;p&gt;This one will only replace the first occurrence of this in the whole file.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>debug call function() to debug a function in vim</title>
      <link>/2011/09/04/debug-call-function-debug-function-vim/</link>
      <pubDate>Sun, 04 Sep 2011 06:04:53 +0000</pubDate>
      
      <guid>/2011/09/04/debug-call-function-debug-function-vim/</guid>
      <description>&lt;div class=&#34;zemanta-img&#34; style=&#34;margin: 1em; display: block;&#34;&gt;
  &lt;p&gt;
    &lt;figure style=&#34;width: 159px&#34; class=&#34;wp-caption alignright&#34;&gt;&lt;a href=&#34;http://commons.wikipedia.org/wiki/File:Function_machine2.svg&#34;&gt;&lt;img title=&#34;Drawn in Autosketch + pasting in words from Excel&#34; src=&#34;https://i1.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/zemanta//159px-Function_machine2.svg_3.png?resize=159%2C152&#34; alt=&#34;Drawn in Autosketch + pasting in words from Excel&#34; width=&#34;159&#34; height=&#34;152&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-caption-text&#34;&gt;Image via Wikipedia&lt;/figcaption&gt;&lt;/figure&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Have you ever wished that you could either see what is going on initially at the vim startup like you could do with C program in the gdm mode, but really did not want to go through &lt;a class=&#34;zem_slink&#34; title=&#34;GNU Debugger&#34; href=&#34;http://www.gnu.org/software/gdb&#34; rel=&#34;homepage&#34;&gt;gdb&lt;/a&gt;. Or rather you sometime felt that some &lt;a class=&#34;zem_slink&#34; title=&#34;Function (mathematics)&#34; href=&#34;http://en.wikipedia.org/wiki/Function_%28mathematics%29&#34; rel=&#34;wikipedia&#34;&gt;function&lt;/a&gt; defined by some plugin is causing some issue and you wanted to debug just that function. Well you need not wish anymore, the functionality is already there.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim autocomplete – automagically without tab.</title>
      <link>/2011/04/16/vim-autocomplete-automagically-without-tab/</link>
      <pubDate>Sat, 16 Apr 2011 01:10:59 +0000</pubDate>
      
      <guid>/2011/04/16/vim-autocomplete-automagically-without-tab/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Lets first do the setup in one line. Get my &lt;a title=&#34;vim script download&#39;er&#34; href=&#34;http://blog.amit-agarwal.co.in/2011/03/09/all-in-one-solution-for-all-the-scripts-of-vim-from-vim-org/&#34; target=&#34;_blank&#34;&gt;vim script downloader&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Use the script to add the script with script ID : :1879 (vim-autocomplpop) to your list of plugins for vim and you  are done.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If you are using snipmate, then make sure that you read the description of the plugin to add the required lines to the vimrc file to get the full functionality. You would love to type henceforth in your favourite editor. We will talk about more on &lt;a class=&#34;zem_slink&#34; title=&#34;IntelliSense&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/IntelliSense&#34;&gt;Intellisense&lt;/a&gt; in few days time.. Chao till then.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>what is vim in 6Kb..</title>
      <link>/2011/03/16/what-is-vim-in-6kb/</link>
      <pubDate>Wed, 16 Mar 2011 16:36:33 +0000</pubDate>
      
      <guid>/2011/03/16/what-is-vim-in-6kb/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;If you thought that vim is very bloated and nothing abuot this editor can be small, then you are not alone. I was myself in the same bandwagon.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Well, I never thought that there could be anything about vim that can be explained in Kb’s, lest alone the complete vim features. But looks like &lt;a title=&#34;vim.org&#34; href=&#34;http://www.vim.org&#34; target=&#34;_blank&#34;&gt;vim.org&lt;/a&gt; had thought about this and thus came up with &lt;a title=&#34;this&#34; href=&#34;http://www.vim.org/6kbyte.php&#34; target=&#34;_blank&#34;&gt;this&lt;/a&gt;. And &lt;a title=&#34;here&#34; href=&#34;http://www.vim.org/6k/features.en.txt&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt; is the direct link to the vim in 6kb in English.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>All in one solution for all the scripts of vim from vim.org</title>
      <link>/2011/03/09/all-in-one-solution-for-all-the-scripts-of-vim-from-vim-org/</link>
      <pubDate>Wed, 09 Mar 2011 16:39:52 +0000</pubDate>
      
      <guid>/2011/03/09/all-in-one-solution-for-all-the-scripts-of-vim-from-vim-org/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;For quite sometime now, I was looking for some console based program which would help me get the scripts from vim.org. A simple solution would have been to do a wget for the scripts. But since there are so many scripts coming up daily and with a need to search based on script ID and name of the script, I thought better to write a script that can do all of those things. Now, what was required was that the script should be either able to download this or add to the &lt;a title=&#34;GLVS&#34; href=&#34;http://www.vim.org/scripts/script.php?script_id=2444&#34; target=&#34;_blank&#34;&gt;GLVS&lt;/a&gt; script. Also note that, I had done something similar in the past &lt;a title=&#34;vim – get the list of all the scripts available.&#34; href=&#34;http://blog.amit-agarwal.co.in/2010/05/28/vim-get-the-list-of-all-the-scripts-available/&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt;. There are some additions in the below script. You can download a copy of the script &lt;a href=&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2011/03/get_vim_scripts.txt&#34;&gt;get_vim_scripts&lt;/a&gt;. Or you can copy the script from below:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>[Solved] Abbreviations not working in vim</title>
      <link>/2010/10/02/solved-abbreviations-working-vim/</link>
      <pubDate>Sat, 02 Oct 2010 15:17:39 +0000</pubDate>
      
      <guid>/2010/10/02/solved-abbreviations-working-vim/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Today I found that abbreviations are not working in vim in my current login. I searched log of blog’s and sill did not find any solution so I decided to take the matters in my hand.&lt;/p&gt;
&lt;p&gt;To start with I &lt;a class=&#34;zem_slink&#34; title=&#34;Disability&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Disability&#34;&gt;disabled&lt;/a&gt; all the plugin’s by moving my &lt;a class=&#34;zem_slink&#34; title=&#34;WordPress Plugin Directory&#34; rel=&#34;homepage&#34; href=&#34;http://wordpress.org/extend/plugins/&#34;&gt;plugin directory&lt;/a&gt;. This did not help me solve the issue, so the only other option left was to now disable the vimrc file completely. Once I removed the vimrc file, the abbreviations started working.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Make better use of the scripting feature in the vim editor</title>
      <link>/2010/07/23/make-better-use-of-the-scripting-feature-in-the-vim-editor/</link>
      <pubDate>Fri, 23 Jul 2010 04:04:33 +0000</pubDate>
      
      <guid>/2010/07/23/make-better-use-of-the-scripting-feature-in-the-vim-editor/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;There is a nice tutorial on the &amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;http://www.ibm.com/developerworks/linux/library/l-vim-script-1/index.html?ca=dgr-lnxw82&amp;amp;S_TACT=105AGX59&amp;amp;S_CMP=grlnxw82&amp;quot;&amp;gt;Scripting the vim editor&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I liked it, hope you too like it.&amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/pixy7.gif&amp;quot; /&amp;gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Play with vim colors.</title>
      <link>/2010/07/17/play-with-vim-colors/</link>
      <pubDate>Fri, 16 Jul 2010 19:16:52 +0000</pubDate>
      
      <guid>/2010/07/17/play-with-vim-colors/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;In vim you can customize the colors of your terminal vim or the GUI version. If you wanted to play around with colors then you can simply put the file containing the colorscheme to directory &amp;amp;#8221;~/.vim/colors&amp;amp;#8221; and load it in vim with &amp;amp;#8221;&lt;strong&gt;colorscheme &lt;name&gt;&lt;/strong&gt;&amp;amp;#8221;.&lt;/p&gt;
&lt;p&gt;That most of you would know. What I will add here is how easy it can be create it if you knew the right place to do it: Head over&amp;lt;a href=&amp;quot;http://yukihiro.nakadaira.googlepages.com/vim-color.html&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt; here&lt;/a&gt;. No explanations needed. Anyway if you need help, leave a comment.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vi reference links</title>
      <link>/2010/07/17/vi-reference-links/</link>
      <pubDate>Fri, 16 Jul 2010 19:16:50 +0000</pubDate>
      
      <guid>/2010/07/17/vi-reference-links/</guid>
      <description>&lt;p&gt;&lt;tt&gt;&amp;lt;a href=&amp;quot;http://www.lagmonster.org/docs/vi2.html&amp;quot;&amp;gt;http://www.lagmonster.org/docs/vi2.html&lt;/a&gt;&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;&amp;lt;a href=&amp;quot;http://www.venukb.com/2007/01/28/vivim-graphical-cheat-sheet/&amp;quot;&amp;gt;http://www.venukb.com/2007/01/28/vivim-graphical-cheat-sheet/&lt;/a&gt;&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;&amp;lt;a href=&amp;quot;http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html&amp;quot;&amp;gt;http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html&lt;/a&gt;&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;&amp;lt;a href=&amp;quot;http://www.eng.hawaii.edu/Tutor/vi.html#commands&amp;quot;&amp;gt;http://www.eng.hawaii.edu/Tutor/vi.html#commands&lt;/a&gt;&lt;/tt&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>jumps and marks in vim</title>
      <link>/2010/07/11/jumps-and-marks-in-vim/</link>
      <pubDate>Sun, 11 Jul 2010 07:59:25 +0000</pubDate>
      
      <guid>/2010/07/11/jumps-and-marks-in-vim/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;First we will talk about jumps in vim. Very useful for &amp;lt;a class=&amp;quot;zem_slink freebase/en/navigation&amp;quot; title=&amp;quot;Navigation&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Navigation&amp;quot;&amp;gt;navigation&lt;/a&gt; and jumping around the vim. The jumps are commands that lets you jump from one location to another location, like {{ or [[ and so on … From the help file of vim&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A &amp;amp;#8221;jump&amp;amp;#8221; is one of the following commands: &amp;amp;#8221;&amp;amp;#8217;&amp;amp;#8221;, &amp;amp;#8221;`&amp;amp;#8221;, &amp;amp;#8221;G&amp;amp;#8221;, &amp;amp;#8221;/&amp;amp;#8221;, &amp;amp;#8221;?&amp;amp;#8221;, &amp;amp;#8221;n&amp;amp;#8221;,&lt;br&gt;
&amp;amp;#8221;N&amp;amp;#8221;, &amp;amp;#8221;%&amp;amp;#8221;, &amp;amp;#8221;(&amp;amp;#8221;, &amp;amp;#8221;)&amp;amp;#8221;, &amp;amp;#8221;[[&amp;amp;#8221;, &amp;amp;#8221;]]&amp;amp;#8221;, &amp;amp;#8221;{&amp;amp;#8221;, &amp;amp;#8221;}&amp;amp;#8221;, &amp;amp;#8221;:s&amp;amp;#8221;, &amp;amp;#8221;:tag&amp;amp;#8221;, &amp;amp;#8221;L&amp;amp;#8221;, &amp;amp;#8221;M&amp;amp;#8221;, &amp;amp;#8221;H&amp;amp;#8221; and&lt;br&gt;
the commands that start editing a new file.  If you make the &amp;lt;a class=&amp;quot;zem_slink freebase/en/cursor&amp;quot; title=&amp;quot;Cursor (computers)&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Cursor_%28computers%29&amp;quot;&amp;gt;cursor&lt;/a&gt; &amp;amp;#8221;jump&amp;amp;#8221;&lt;br&gt;
with one of these commands, the position of the cursor before the jump is&lt;br&gt;
remembered.  You can return to that position with the &amp;amp;#8221;&amp;amp;#8217;&amp;amp;#8217;&amp;amp;#8221; and &amp;amp;#8221;“&amp;amp;#8221; command,&lt;br&gt;
unless the line containing that position was changed or deleted.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>bash script to change the vim colorscheme from the list of locally available schemes</title>
      <link>/2010/06/25/bash-script-to-change-the-vim-colorscheme-from-the-list-of-locally-available-schemes/</link>
      <pubDate>Thu, 24 Jun 2010 20:51:35 +0000</pubDate>
      
      <guid>/2010/06/25/bash-script-to-change-the-vim-colorscheme-from-the-list-of-locally-available-schemes/</guid>
      <description>&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png\&#34;&gt;&lt;img title=\&#34;MacVim icon, glossy style\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Vim_gloss_128.png\&#34; alt=\&#34;MacVim icon, glossy style\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image via &lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png\&#34;&gt;Wikipedia&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Today I was just wondering how good it would be to have a script to change the &amp;lt;a class=&amp;quot;zem_slink freebase/en/vim&amp;quot; title=&amp;quot;Vim (text editor)&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://www.vim.org/&amp;quot;&amp;gt;vim&lt;/a&gt; colorscheme from the &amp;lt;a class=&amp;quot;zem_slink freebase/en/cmd_exe&amp;quot; title=&amp;quot;Command Prompt&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Command_Prompt&amp;quot;&amp;gt;command prompt&lt;/a&gt;. The plan for the script was simply to print the list of available schemes and then let the user select the actions from there on. So, here is the result:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vi tips with examples for programmers — very useful</title>
      <link>/2010/06/05/vi-tips-with-examples-for-programmers-very-useful/</link>
      <pubDate>Sat, 05 Jun 2010 02:08:37 +0000</pubDate>
      
      <guid>/2010/06/05/vi-tips-with-examples-for-programmers-very-useful/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;First off, sorry for not posting regularly. Will be so for probably another couple of days.&lt;/p&gt;
&lt;p&gt;In the meantime found a very nice artcle on vim:&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://en.wikibooks.org/wiki/Learning_the_vi_editor/Vim/Useful_things_for_programmers_to_know&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://en.wikibooks.org/wiki/Learning_the_vi_editor/Vim/Useful_things_for_programmers_to_know&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim – get the list of all the scripts available.</title>
      <link>/2010/05/28/vim-get-the-list-of-all-the-scripts-available/</link>
      <pubDate>Thu, 27 May 2010 20:26:35 +0000</pubDate>
      
      <guid>/2010/05/28/vim-get-the-list-of-all-the-scripts-available/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;To get a list of all the scripts in the vim.sf.net project, you can run the following command. This will list all the scripts with the script id.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;wget -O – &amp;amp;#8217;http://www.vim.org/scripts/script_search_results.php?&amp;amp;show_me=4000&amp;amp;result_ptr=0&amp;amp;#8217; -o /dev/null | &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; width| grep script_id= |&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/.*script_id=//&amp;amp;#8217;|tr -d &amp;amp;#8221;&amp;amp;#8221;&amp;amp;#8221;|tr &amp;amp;#8221;&amp;gt;&amp;amp;#8221; &amp;amp;#8221; &amp;amp;#8221;|sed &amp;amp;#8217;s/&amp;lt; .*//&amp;amp;#8217; | tr -d &amp;amp;#8217;\001&amp;amp;#8217;-&amp;amp;#8217;\011&amp;amp;#8217;&amp;amp;#8217;\013&amp;amp;#8217;&amp;amp;#8217;\014&amp;amp;#8217;&amp;amp;#8217;\016&amp;amp;#8217;-&amp;amp;#8217;\037&amp;amp;#8217;&amp;amp;#8217;\200&amp;amp;#8217;-&amp;amp;#8217;\377&amp;amp;#8217; |sort -n&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.slumpedoverkeyboarddead.com/2009/09/17/use-curl-to-monitor-your-vonage-phone-bill/&amp;quot;&amp;gt;Use curl to Monitor Your Vonage Phone Bill&lt;/a&gt; (slumpedoverkeyboarddead.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://securewebs.com/yum-updates/&amp;quot;&amp;gt;Yum Updates&lt;/a&gt; (securewebs.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.gubatron.com/blog/2009/10/10/ubuntudebian-quick-reference-how-to-change-your-servers-utc-timezone-on-the-command-line/&amp;quot;&amp;gt;Ubuntu/Debian Quick Reference: How To Change Your Server&amp;amp;#8217;s UTC Timezone on the command line&lt;/a&gt; (gubatron.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://blog.amit-agarwal.co.in/2009/11/22/short-information-about-loaded-kernel-modules/&amp;quot;&amp;gt;Short Information about loaded kernel modules&lt;/a&gt; (amit-agarwal.co.in)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/b22b2e85-8107-4f9b-9130-85a8e8ae370b/&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b52.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related more-info pretty-attribution paragraph-reblog&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
    <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>
    
    <item>
      <title>vim – get names of the scripts and the details from the command line</title>
      <link>/2010/05/19/vim-get-names-of-the-scripts-and-the-details-from-the-command-line/</link>
      <pubDate>Wed, 19 May 2010 16:38:42 +0000</pubDate>
      
      <guid>/2010/05/19/vim-get-names-of-the-scripts-and-the-details-from-the-command-line/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;For the below commands either you can set the two variables in bold and then run the scripts or change the following in the commands and run the scripts.&lt;/p&gt;
&lt;p&gt;If you have html2text installed then you can use this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;wget -o /dev/null -O &lt;strong&gt;$script_id_file&lt;/strong&gt; &amp;amp;#8217;http://www.vim.org/scripts/script.php?script_id=&amp;amp;#8217;&lt;strong&gt;$script_id&lt;/strong&gt; |html2text&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you dont have html2text installed then you can use:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;wget -o /dev/null -O &lt;strong&gt;$script_id_file&lt;/strong&gt; &amp;amp;#8217;http://www.vim.org/scripts/script.php?script_id=&amp;amp;#8217;&lt;strong&gt;$script_id&lt;/strong&gt;&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.inquisitr.com/55496/twilight-eclipse-script-allegedly-leaked/&amp;quot;&amp;gt;Twilight Eclipse Script Allegedly Leaked&lt;/a&gt; (inquisitr.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://huddledmasses.org/powershell-script-club-in-rochester-on-wednesday/&amp;quot;&amp;gt;PowerShell Script Club in Rochester on Wednesday&lt;/a&gt; (huddledmasses.org)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://blogs.adobe.com/acrolaw/2010/02/add_a_flatten_document_menu_item.html&amp;quot;&amp;gt;Add a Flatten Document Menu Item to Acrobat&lt;/a&gt; (blogs.adobe.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://codebetter.com/blogs/james.kovacs/archive/2010/02/25/the-exec-problem.aspx&amp;quot;&amp;gt;The Exec Problem&lt;/a&gt; (codebetter.com)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot; style=&amp;quot;margin-top: 10px; height: 15px;&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/d25e9b6c-aca3-4008-9a3c-3403140d32e0/&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; style=&amp;quot;border: medium none; float: right;&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e38.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related pretty-attribution&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vi – the powerful Linux/Unix text editor</title>
      <link>/2010/05/12/vi-the-powerful-linuxunix-text-editor/</link>
      <pubDate>Wed, 12 May 2010 17:01:25 +0000</pubDate>
      
      <guid>/2010/05/12/vi-the-powerful-linuxunix-text-editor/</guid>
      <description>&lt;p&gt;&lt;tt&gt;We will talk about some vi stuff today:&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;Some fun first&amp;ndash;&amp;gt;&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;1) &amp;lt;a href=&amp;quot;http://www.vim.org/tips/tip.php?tip_id=664&amp;quot;&amp;gt;http://www.vim.org/tips/tip.php?tip_id=664&lt;/a&gt;&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;2) help 42&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;Ok, coming to serious things-&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;References:&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;3) Linux cheat sheet: &lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;&amp;lt;a href=&amp;quot;http://www.lagmonster.org/docs/vi2.html&amp;quot;&amp;gt;http://www.lagmonster.org/docs/vi2.html&lt;/a&gt;&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;4) &amp;lt;a href=&amp;quot;http://www.venukb.com/2007/01/28/vivim-graphical-cheat-sheet/&amp;quot;&amp;gt;http://www.venukb.com/2007/01/28/vivim-graphical-cheat-sheet/&lt;/a&gt;&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;5) &amp;lt;a href=&amp;quot;http://www.eng.hawaii.edu/Tutor/vi.html#commands&amp;quot;&amp;gt;http://www.eng.hawaii.edu/Tutor/vi.html#commands&lt;/a&gt;&lt;/tt&gt;&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;Commands and tips:&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;6) Something that is difficult to find on the net is : how to create a numbered list in vi/vim? Simple, we will use macro&#39;s&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;To do this: &lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;a&amp;gt; type number and terminatory ex: 1)&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;b&amp;gt; start recording using &lt;ALT&gt;qa  . This will record the macro in a. &lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;c&amp;gt; yank the line with yy&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;d&amp;gt; goto next line &lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;e&amp;gt; press &lt;CTRL&gt;a to increment the number&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;f&amp;gt; End the macro recording with q &lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;g&amp;gt; Play the macro with numner of times to repeat the actions. Example press 11@a&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;7) For repeating the last command you can use &lt;dot&gt;&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;8) You can put your vim settings in ~/&lt;dot&gt;vimrc and this can containg things like &amp;quot;set nu&amp;quot; and any other configuration.&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;9) Adding date in vi : &lt;ESC&gt;:r! date &lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;10) There is a variant of vi known as elvis which is quite nice&lt;/tt&gt;&lt;br&gt;
&lt;tt&gt;11) Similarly for viewing binary file there is a variant called bvi&lt;/tt&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>change the window in split screen.</title>
      <link>/2010/04/11/change-the-window-in-split-screen/</link>
      <pubDate>Sun, 11 Apr 2010 09:12:00 +0000</pubDate>
      
      <guid>/2010/04/11/change-the-window-in-split-screen/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I use the split screen in vim very in-frequently, so I did not really know how to move from one screen to the other. There is also very little or no documentation that I found on this on the first page of google, so here it is :&lt;br&gt;
press &amp;amp;#8221;ctrl+w and ctrl + w&amp;amp;#8221; to change to other window.&lt;/p&gt;
&lt;p&gt;If you are not sure how to get the split screen, then you can type help split in vim to get the help on split screen.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>bash script to change vim colorscheme based on the available themes</title>
      <link>/2010/04/11/bash-script-change-vim-colorscheme-based-themes/</link>
      <pubDate>Sun, 11 Apr 2010 09:11:41 +0000</pubDate>
      
      <guid>/2010/04/11/bash-script-change-vim-colorscheme-based-themes/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png\&#34;&gt;&lt;img title=\&#34;MacVim icon, glossy style\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Vim_gloss_128.png\&#34; alt=\&#34;MacVim icon, glossy style\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image via &lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png\&#34;&gt;Wikipedia&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;p&gt;Here&amp;amp;#8217;s one script that you may find useful. A little variation or wrapper for this script can make your life colorful 🙂&lt;/p&gt;
&lt;p&gt;You can write a wrapper to this to take one of the inputs randomly and then use it in alias to start &amp;lt;a class=&amp;quot;zem_slink freebase/en/vim&amp;quot; title=&amp;quot;Vim (text editor)&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://www.vim.org/&amp;quot;&amp;gt;vim&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>using paragraph seperator in vi – the easy way</title>
      <link>/2010/04/07/using-paragraph-seperator-in-vi-the-easy-way/</link>
      <pubDate>Wed, 07 Apr 2010 07:56:09 +0000</pubDate>
      
      <guid>/2010/04/07/using-paragraph-seperator-in-vi-the-easy-way/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;blockquote&gt;
&lt;p&gt;imap aa &lt;Esc&gt;80i-&lt;Esc&gt;i&lt;Esc&gt;o&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Just put this in the vimrc or in a vi session with a : in normal mode.&lt;/p&gt;
&lt;p&gt;Explanation:&lt;/p&gt;
&lt;p&gt;This will map the key &amp;amp;#8221;aa&amp;amp;#8221; to the sequence which will add &amp;amp;#8221;-&amp;amp;#8221; 80 times in the current line and then go to new line in insert mode. This is quite simple so any changes required should be simple enough to make.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim understanding the various modes and using the yanking more efficiently.</title>
      <link>/2010/04/06/vim-understanding-the-various-modes-and-using-the-yanking-more-efficiently/</link>
      <pubDate>Tue, 06 Apr 2010 02:42:38 +0000</pubDate>
      
      <guid>/2010/04/06/vim-understanding-the-various-modes-and-using-the-yanking-more-efficiently/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png\&#34;&gt;&lt;img title=\&#34;MacVim icon, glossy style\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Vim_gloss_128.png\&#34; alt=\&#34;MacVim icon, glossy style\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image via &lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png\&#34;&gt;Wikipedia&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;p&gt;We will look at the vim modes today. Sometime back , I was looking at copying a function body. So I was basically looking to copy the lines till matching &amp;amp;#8221;&lt;strong&gt;}&lt;/strong&gt;&amp;amp;#8221;. I found a plugin called &amp;lt;a href=&amp;quot;http://www.vim.org/scripts/script.php?script_id=1234&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;yankring&lt;/a&gt; which would allow me to yank the text in various combinations. So I can copy a function by going to the begining of the function and then &amp;amp;#8221;&lt;strong&gt;y}&lt;/strong&gt;&amp;amp;#8221;. That is very simple to understand right? Wrong!!!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim scripts and tips</title>
      <link>/2010/03/29/vim-scripts-and-tips/</link>
      <pubDate>Mon, 29 Mar 2010 07:01:07 +0000</pubDate>
      
      <guid>/2010/03/29/vim-scripts-and-tips/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here are few of the links for vim that you can use. It consists of the link to vimrc, colorscheme, syntaxcomplete and zzsplash.&lt;br&gt;
&amp;lt;a href=&amp;quot;http://vim.wikia.com/wiki/User:Tonymec/vimrc&amp;quot;&amp;gt;http://vim.wikia.com/wiki/User:Tonymec/vimrc&lt;/a&gt;&lt;br&gt;
&amp;lt;a href=&amp;quot;http://vim.wikia.com/wiki/User:Tonymec/almost-default.vim&amp;quot;&amp;gt;http://vim.wikia.com/wiki/User:Tonymec/almost-default.vim&lt;/a&gt;&lt;br&gt;
&amp;lt;a href=&amp;quot;http://vim.wikia.com/wiki/User:Tonymec/syntaxcomplete.vim&amp;quot;&amp;gt;http://vim.wikia.com/wiki/User:Tonymec/syntaxcomplete.vim&lt;/a&gt;&lt;br&gt;
&amp;lt;a href=&amp;quot;http://vim.wikia.com/wiki/User:Tonymec/zzsplash.vim&amp;quot;&amp;gt;http://vim.wikia.com/wiki/User:Tonymec/zzsplash.vim&lt;/a&gt;&amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&amp;gt;&lt;/table&gt; &amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://blog.amit-agarwal.co.in/2010/02/02/bash-script-to-change-the-vim-colorscheme-from-the-list-of-locally-available-schemes/&amp;quot;&amp;gt;bash script to change the vim colorscheme from the list of locally available schemes&lt;/a&gt; (amit-agarwal.co.in)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.prweb.com/releases/2010/03/prweb3740684.htm&amp;quot;&amp;gt;Wikia Introduces New Tools For People to Create Wiki Answer Sites on Any Topic&lt;/a&gt; (prweb.com)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/a04b9f08-df03-476c-b6d3-a1d32078cb64/&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b68.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related more-info pretty-attribution paragraph-reblog&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>vim search multiple files</title>
      <link>/2010/03/25/vim-search-multiple-files/</link>
      <pubDate>Thu, 25 Mar 2010 02:41:28 +0000</pubDate>
      
      <guid>/2010/03/25/vim-search-multiple-files/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Searching some pattern in multiple files is something that is required very often. There are multiple ways to do it, like &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;lt;a class=&amp;quot;zem_slink freebase/guid/9202a8c04000641f8000000006b66ec6&amp;quot; title=&amp;quot;Ack (command-line utility)&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Ack_%28command-line_utility%29&amp;quot;&amp;gt;ack&lt;/a&gt;, find and so on so forth. But if your editor already has the capability to do that, then why leave your favourite vi and go to shell. I will point you to some scripts and some wiki pages on how to do this 🙂&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>eclim for Fedora – Leonidas – installation.</title>
      <link>/2010/03/08/eclim-for-fedora-leonidas-installation/</link>
      <pubDate>Mon, 08 Mar 2010 03:48:31 +0000</pubDate>
      
      <guid>/2010/03/08/eclim-for-fedora-leonidas-installation/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here is the installation instruction for Eclim for vim. I have not tried it as I did not require it, but if you need it.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://downloads.sourceforge.net/project/eclim/eclim/1.4.8/eclim&#34;&gt;http://downloads.sourceforge.net/project/eclim/eclim/1.4.8/eclim&lt;/a&gt;_1.4.8.tar.gz?use_mirror=biznetnetworks&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sudo ant -Declipse.home=/usr/lib/eclipse -Dvim.files=/home/amitag/.vim -Dplugins=cdt&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;create ctgs using&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ctags -R /usr/include/&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://spf13.com/post/vim-crash-course&amp;quot;&amp;gt;VIM Crash Course&lt;/a&gt; (spf13.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://go.theregister.com/feed/www.theregister.co.uk/2010/01/26/sourceforge_ip_address_filtering/&amp;quot;&amp;gt;SourceForge bars 5 nations from open source downloads&lt;/a&gt; (go.theregister.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://blog.amit-agarwal.co.in/2010/01/22/my-project-in-sourceforgenet-gnomedesktopwal/&amp;quot;&amp;gt;My project in sourceforge.net gnomedesktopwal&lt;/a&gt; (amit-agarwal.co.in)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/0fb78d60-4b1a-4563-8ffa-f572041a3a64/&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b13.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related more-info pretty-attribution paragraph-reblog&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Built-in lists in vim</title>
      <link>/2010/02/03/built-in-lists-in-vim/</link>
      <pubDate>Wed, 03 Feb 2010 16:49:32 +0000</pubDate>
      
      <guid>/2010/02/03/built-in-lists-in-vim/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a class=&amp;quot;zem_slink freebase/en/vimscript&amp;quot; title=&amp;quot;Vimscript&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Vimscript&amp;quot;&amp;gt;Vimscript&lt;/a&gt; provides excellent support for operating on collections of &amp;lt;a class=&amp;quot;zem_slink freebase/en/data&amp;quot; title=&amp;quot;Data&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Data&amp;quot;&amp;gt;data&lt;/a&gt;, a cornerstone of programming. In this third article in the series, learn how to use Vimscript&amp;amp;#8217;s built-in lists to ease everyday operations such as reformatting lists, filtering sequences of filenames, and sorting sets of line numbers. You&amp;amp;#8217;ll also walk through examples that demonstrate the power of lists to extend and enhance two common uses of &amp;lt;a class=&amp;quot;zem_slink freebase/en/vim&amp;quot; title=&amp;quot;Vim (text editor)&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://www.vim.org/&amp;quot;&amp;gt;Vim&lt;/a&gt;: creating a &amp;lt;a class=&amp;quot;zem_slink freebase/en/user_defined_function&amp;quot; title=&amp;quot;User-defined function&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/User-defined_function&amp;quot;&amp;gt;user-defined function&lt;/a&gt; to align assignment operators, and improving the built-in text completions mechanism.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>using cscope with vim</title>
      <link>/2010/01/08/using-cscope-with-vim/</link>
      <pubDate>Fri, 08 Jan 2010 03:02:50 +0000</pubDate>
      
      <guid>/2010/01/08/using-cscope-with-vim/</guid>
      <description>&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://www.flickr.com/photos/87569910@N00/2885667385\&#34;&gt;&lt;img title=\&#34;Google Image Search\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/2885667385_27fa023622_m.jpg\&#34; alt=\&#34;Google Image Search\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image by &lt;a href=\&#34;http://www.flickr.com/photos/87569910@N00/2885667385\&#34;&gt;schoschie&lt;/a&gt; via Flickr&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here&amp;amp;#8217;s the best of the two links that I found with &amp;lt;a class=&amp;quot;zem_slink freebase/en/google&amp;quot; title=&amp;quot;Google&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://google.com&amp;quot;&amp;gt;Google&lt;/a&gt; and &amp;lt;a class=&amp;quot;zem_slink&amp;quot; title=&amp;quot;Bing&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://bing.com/&amp;quot;&amp;gt;Bing&lt;/a&gt; combined out of lots of links that I think can help you understand how to use cscope with vim, if you dont know already.&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://cscope.sourceforge.net/cscope_vim_tutorial.html&amp;quot;&amp;gt;http://cscope.sourceforge.net/cscope_vim_tutorial.html&lt;/a&gt;&lt;br&gt;
&amp;lt;a href=&amp;quot;http://www.faqs.org/docs/ldev/0130091154_242.htm&amp;quot;&amp;gt;http://www.faqs.org/docs/ldev/0130091154_242.htm&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Finding all numbers that are bigger than 1 in vim</title>
      <link>/2009/12/24/finding-all-numbers-that-are-bigger-than-1-in-vim/</link>
      <pubDate>Thu, 24 Dec 2009 07:37:08 +0000</pubDate>
      
      <guid>/2009/12/24/finding-all-numbers-that-are-bigger-than-1-in-vim/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;/^([2-9]d*|1d+)&lt;br&gt;
If we have a csv like structure&lt;/p&gt;
&lt;p&gt;The trick here is simple, lets look at the regex from the begining:&lt;/p&gt;
&lt;p&gt;^ – start from the begining&lt;br&gt;
() – start and end of block&lt;br&gt;
[] – digits within this. So we are looking from 2 to 9 to exclude the numbers begining with 1&lt;br&gt;
d – search for digits&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;– search for one or more&lt;br&gt;
| – or operation&lt;br&gt;
1 – search for numbers begining with 1&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;– containing atleast one occurence or more.&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://sparksspace.blogspot.com/2009/10/adding-leading-zeros-in-excel.html&amp;quot;&amp;gt;Adding Leading Zeros in Excel&lt;/a&gt; (sparksspace.blogspot.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://blog.creativethink.com/2009/11/the-best-thing-about-2010.html&amp;quot;&amp;gt;The Best Thing About &amp;amp;#8221;2010&amp;amp;#8221;&lt;/a&gt; (creativethink.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.revenews.com/jackbusch/google-goggles-the-world-is-your-hyperlink/&amp;quot;&amp;gt;Google Goggles: The World is Your Hyperlink&lt;/a&gt; (revenews.com)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/e022d83e-669e-4cad-894c-cdab54a1946c/&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e34.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related more-info pretty-attribution paragraph-reblog&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>Know when you will type :q in your term instead of vi(m), the alias will chewed you out.</title>
      <link>/2009/12/20/know-when-you-will-type-q-in-your-term-instead-of-vim-the-alias-will-chewed-you-out/</link>
      <pubDate>Sun, 20 Dec 2009 07:53:47 +0000</pubDate>
      
      <guid>/2009/12/20/know-when-you-will-type-q-in-your-term-instead-of-vim-the-alias-will-chewed-you-out/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;most simple solution is to alias :q like so:&lt;br&gt;
alias :q=`echo &amp;amp;#8221;This is not vim&amp;amp;#8221;`&lt;/p&gt;
&lt;p&gt;but as someone suggested in commandlinefu, you can use tput to put some color and fun into this.&lt;br&gt;
alias :q=&amp;amp;#8217;tput setaf 1; echo &amp;gt;&amp;amp;2 &amp;amp;#8221;this is NOT vi(m) :/&amp;amp;#8221;; tput sgr0&amp;amp;#8217;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Add current date and time in vim</title>
      <link>/2009/11/20/add-current-date-and-time-in-vim/</link>
      <pubDate>Fri, 20 Nov 2009 02:10:40 +0000</pubDate>
      
      <guid>/2009/11/20/add-current-date-and-time-in-vim/</guid>
      <description>&lt;p&gt;Last few days I was quite busy. So this time very quick tip 🙂&lt;/p&gt;
&lt;p&gt;Add the following to the ~/.vimrc file&lt;/p&gt;
&lt;p&gt;imap dt :r! dateA&lt;/p&gt;
&lt;p&gt;And now whenever you type dt in the insert mode in vi, date will be inserted.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>stop indentation on current file in vim to keep the indentation from copied text.</title>
      <link>/2009/10/22/stop-indentation-on-current-file-in-vim-to-keep-the-indentation-from-copied-text/</link>
      <pubDate>Thu, 22 Oct 2009 01:57:24 +0000</pubDate>
      
      <guid>/2009/10/22/stop-indentation-on-current-file-in-vim-to-keep-the-indentation-from-copied-text/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I have been looking for this for quite some time. Finally found two easy ways to do it:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;:setlocal noautoindent&lt;br&gt;
:setlocal nocindent&lt;br&gt;
:setlocal nosmartindent&lt;br&gt;
:setlocal indentexpr=&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Just use the above four commands when the file is already open to stop all the indentation/smart indentation/auto indentation in vim for the current file. If you want to map it then you can use shorthand notations and map it in the .vimrc file.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>&lt;dot&gt;vimrc file for vim users</title>
      <link>/2009/10/01/vimrc-file-for-vim-users/</link>
      <pubDate>Thu, 01 Oct 2009 13:57:16 +0000</pubDate>
      
      <guid>/2009/10/01/vimrc-file-for-vim-users/</guid>
      <description>&lt;p&gt;Example vimrc file below:&lt;/p&gt;
&lt;p&gt;let g:VIM_CUSTOM = &amp;amp;#8221;/home/amitag/.vim_custom/&amp;amp;#8221;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&amp;amp;#8221; Don&amp;amp;#8217;t use vi compatibility; I want all the new features in Vim&lt;/p&gt;
&lt;p&gt;set nocompatible&lt;/p&gt;
&lt;p&gt;&amp;amp;#8221; Version 6.0-specific stuff&lt;/p&gt;
&lt;p&gt;if version &amp;gt;= 600&lt;/p&gt;
&lt;p&gt;syntax enable&lt;/p&gt;
&lt;p&gt;filetype on&lt;/p&gt;
&lt;p&gt;filetype plugin on&lt;/p&gt;
&lt;p&gt;filetype indent on&lt;/p&gt;
&lt;p&gt;else&lt;/p&gt;
&lt;p&gt;syntax on&lt;/p&gt;
&lt;p&gt;endif&lt;/p&gt;
&lt;p&gt;set showfulltag &amp;amp;#8221; Get function usage help automatically&lt;/p&gt;
&lt;p&gt;set showcmd &amp;amp;#8221; Show current vim command in status bar&lt;/p&gt;
&lt;p&gt;set showmatch &amp;amp;#8221; Show matching parentheses/brackets&lt;/p&gt;
&lt;p&gt;set showmode &amp;amp;#8221; Show current vim mode&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
