<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VIM Tips Blog</title>
	<atom:link href="http://www.vimtips-blog.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vimtips-blog.com</link>
	<description>zzappers latest VIM Blog</description>
	<lastBuildDate>Sat, 14 Apr 2012 17:10:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Vim on Linux &#8211; Tiny VIM</title>
		<link>http://www.vimtips-blog.com/vim-on-linux-tiny-vim/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vim-on-linux-tiny-vim</link>
		<comments>http://www.vimtips-blog.com/vim-on-linux-tiny-vim/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 13:16:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[configuring vim]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.vimtips-blog.com/?p=123</guid>
		<description><![CDATA[I&#8217;ve been working on various Linux servers recently (Centos) which had just the standard installs and have had to use console vim. When you type vi on a Linux console you still get vim but it may be tiny-vim or may be vim in original vanilla vi compatibility mode which will drive you crazy as many common <a href='http://www.vimtips-blog.com/vim-on-linux-tiny-vim/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on various Linux servers recently (Centos) which had just the standard installs and have had to use console vim. When you type vi on a Linux console you still get vim but it may be tiny-vim or may be vim in original vanilla vi compatibility mode which will drive you crazy as many common commands you use frequently just won&#8217;t be there.</p>
<p>What you need is</p>
<p><em>&gt; yum install </em> vim-common vim-enhanced vim-minimal</p>
<p>&nbsp;</p>
<p>and then add an alias or whatever</p>
<p>&nbsp;</p>
<p>alias vi=&#8217;vim&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vimtips-blog.com/vim-on-linux-tiny-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickly Create Open and Close HTML Tags</title>
		<link>http://www.vimtips-blog.com/quickly-create-open-and-close-html-tags/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quickly-create-open-and-close-html-tags</link>
		<comments>http://www.vimtips-blog.com/quickly-create-open-and-close-html-tags/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 17:50:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.vimtips-blog.com/?p=119</guid>
		<description><![CDATA[&#160; &#160; &#8221; type table,,, to get &#60;table&#62;&#60;/table&#62; automatically close a tag imap ,,, &#60;esc&#62;bdwa&#60;&#60;esc&#62;pa&#62;&#60;cr&#62;&#60;/&#60;esc&#62;pa&#62;&#60;esc&#62;kA &#160; or type td,,, to get &#60; td&#62; &#60; /td&#62; etc etc]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&#8221; type table,,, to get &lt;table&gt;&lt;/table&gt; automatically close a tag<br />
imap ,,, &lt;esc&gt;bdwa&lt;&lt;esc&gt;pa&gt;&lt;cr&gt;&lt;/&lt;esc&gt;pa&gt;&lt;esc&gt;kA</p>
<p>&nbsp;</p>
<p>or type td,,, to get &lt; td&gt; &lt; /td&gt; etc etc</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vimtips-blog.com/quickly-create-open-and-close-html-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Vim&#8217;s Visual Block Mode</title>
		<link>http://www.vimtips-blog.com/using-vims-visual-block-mode/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-vims-visual-block-mode</link>
		<comments>http://www.vimtips-blog.com/using-vims-visual-block-mode/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 20:16:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.vimtips-blog.com/?p=114</guid>
		<description><![CDATA[Vim&#8217;s visual block mode is a feature that I hardly ever use but is extremely useful when I do need it. You can highlight a column of text or numbers in the center of a page and perform various edit operations on that text. It is unbelievably powerful and I realize on writing this that <a href='http://www.vimtips-blog.com/using-vims-visual-block-mode/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Vim&#8217;s visual block mode is a feature that I hardly ever use but is extremely useful when I do need it.<br />
You can highlight a column of text or numbers in the center of a page and perform various edit operations on that text. It is unbelievably powerful and I realize on writing this that I only use a fraction of the blockwise possibilities.</p>
<p>You enter Visual Blockwise mode with Control V however I uses that for Paste so have it remapped to Control Q</p>
<div class=box>
<p>&#8221; Visual is the newest and usually the most intuitive editing mode<br />
<br />&#8221; Visual basics<br />
<br />v                               : enter visual mode<br />
<br />V                               : visual mode whole line<br />
<br /><C-V>                           : enter VISUAL BLOCKWISE mode (remap on Windows to say C-Q *C*<br />
<br />gv                              : reselect last visual area (ultra)<br />
<br />o                               : navigate visual area<br />
<br />&#8220;*y or &#8220;+y                      : yank visual area into paste buffer  [C]<br />
<br />V%                              : visualise what you match<br />
<br />V}J                             : Join Visual block (great)<br />
<br />V}gJ                            : Join Visual block w/o adding spaces<br />
<br />`[v`]                           : Highlight last insert<br />
<br />:%s/\%Vold/new/g                : Do a substitute on last visual area [N]</p>
<p> :help blockwise-visual
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.vimtips-blog.com/using-vims-visual-block-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saving VimTips as a VIM Help Tags Page (make your own VIM help file)</title>
		<link>http://www.vimtips-blog.com/saving-vimtips-as-a-vim-help-tags-page/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=saving-vimtips-as-a-vim-help-tags-page</link>
		<comments>http://www.vimtips-blog.com/saving-vimtips-as-a-vim-help-tags-page/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 23:13:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[configuring vim]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.vimtips-blog.com/?p=108</guid>
		<description><![CDATA[The following should all be on one line :sav! $VIMRUNTIME/doc/vimtips.txt&#124;:1,/^__BEGIN__/d&#124;:/^__END__/,$d&#124;:w!&#124;:helptags $VIMRUNTIME/doc Save the Vim Tips Web Page as an HTML file edit with VIM then execute the above line. This strips off the unwanted stuff outside the __BEGIN__ and __END__ tags, writes the remainder to the VIM Help Tags folder and then runs helptags to <a href='http://www.vimtips-blog.com/saving-vimtips-as-a-vim-help-tags-page/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<div class=xbox>
The following should all be on one line<br />
<code><br />
:sav! $VIMRUNTIME/doc/vimtips.txt|:1,/^__BEGIN__/d|:/^__END__/,$d|:w!|:helptags $VIMRUNTIME/doc<br />
</code><br />
Save the Vim Tips Web Page as an HTML file edit with VIM then execute the above line. This strips off the unwanted stuff outside the __BEGIN__ and __END__ tags, writes the remainder to the VIM Help Tags folder and then runs helptags to generate the tags. Note the above line of Vim commands is to be found in the VIMTips file execute it with yy@&#8221; </p>
<p>&#8221; A VIM Help file requires a line such at the start:</p>
<p>*vimtips.txt*	For Vim version 7.3.  Last change: 2011 Dec 11</p>
<p>&#8221; and a line such at the end<br />
vim:tw=78:ts=8:ft=help:norl:      </p>
<p>The Searchable Helptags are generated from any text enclosed by stars, replace any spaces by a hypen.<br />
I&#8217;m used a leading &#8220;best to help me find my own help tags. eg</p>
<p>:help best<tab> will list my tags</p>
<p>This tip suggested by Fredrik Acosta
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.vimtips-blog.com/saving-vimtips-as-a-vim-help-tags-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vimrc tips : Comment your .vimrc, Backup your .vimrc file</title>
		<link>http://www.vimtips-blog.com/vimrc-tips-comment-your-vimrc-backup-your-vimrc-file/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vimrc-tips-comment-your-vimrc-backup-your-vimrc-file</link>
		<comments>http://www.vimtips-blog.com/vimrc-tips-comment-your-vimrc-backup-your-vimrc-file/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 12:01:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[configuring vim]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.vimtips-blog.com/?p=57</guid>
		<description><![CDATA[Some Vim experts have a practically empty .vimrc file (the config file) others like me have a huge one unfortunately in my case that means there is a lot of dead wood in it. To counteract that I now comment my .vimrc file (the doublequote &#8221; is the comment delimiter) and am gradually commenting older <a href='http://www.vimtips-blog.com/vimrc-tips-comment-your-vimrc-backup-your-vimrc-file/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Some Vim experts have a practically empty .vimrc file (the config file) others like me have a huge one unfortunately in my case that means there is a lot of dead wood in it. To counteract that I now comment my .vimrc file (the doublequote &#8221; is the comment delimiter) and am gradually commenting older parts of my vimrc and deleting stuff that is no longer relevant or is just plain junk. Remember you can use conditionals in your .vimrc so that particular parts of the config only apply to say php files or distinguish whether you are on your laptop or PC. Finally be aware of the danger that something in your config could &#8220;hide&#8221; or counteract some of Vim&#8217;s functionality.</p>
<p>I regularly backup my .vimrc and also have a copy stashed away on the Internet that I can download and use should I have to set up with a new PC.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vimtips-blog.com/vimrc-tips-comment-your-vimrc-backup-your-vimrc-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VIM: Replace a line with the contents of a file!</title>
		<link>http://www.vimtips-blog.com/vim-replace-a-line-with-the-contents-of-a-file/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vim-replace-a-line-with-the-contents-of-a-file</link>
		<comments>http://www.vimtips-blog.com/vim-replace-a-line-with-the-contents-of-a-file/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 09:26:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.vimtips-blog.com/?p=68</guid>
		<description><![CDATA[This tip discusses replacing a marker line with the contents of a file " replace string with contents of a file, -d deletes the "mark" :g/^MARK$/r tmp.txt &#124; -d]]></description>
			<content:encoded><![CDATA[<div class=xbox>
<code><br />
This tip discusses replacing a marker line with the contents of a file</p>
<p>" replace string with contents of a file, -d deletes the "mark"<br />
:g/^MARK$/r tmp.txt | -d<br />
</code>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.vimtips-blog.com/vim-replace-a-line-with-the-contents-of-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing Text AFTER a string</title>
		<link>http://www.vimtips-blog.com/replacing-text-after-a-string/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=replacing-text-after-a-string</link>
		<comments>http://www.vimtips-blog.com/replacing-text-after-a-string/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 22:53:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.vimtips-blog.com/?p=58</guid>
		<description><![CDATA[This is a common editing problem, I want to replace the first TD tag after a certain string. So every time &#8216;string1&#8242; is found replace the next td tag with string2 even if not on the same line. :%s#string1\(\_.\{-}\)&#60;td[^>]\+>#\1string2# Explanation:- \_.\{-} any non-greedy sequence of characters before td tag, multi-line if necessary. \(..\) memorize it <a href='http://www.vimtips-blog.com/replacing-text-after-a-string/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<div class=xbox>
This is a common editing problem, I want to replace the first TD tag after a certain string.<br />
So every time &#8216;string1&#8242; is found replace the next td tag with string2 even if not on the same line.</p>
<p><code><br />
:%s#string1\(\_.\{-}\)&lt;td[^>]\+>#\1string2#<br />
</code></p>
<p>Explanation:-<br />
\_.\{-}   any non-greedy sequence of characters before td tag, multi-line if necessary.<br />
\(..\) memorize it<br />
[^>]\+>  any sequence of character up until ></p>
<p>Principle:-<br />
The memory part is important, it puts back the &#8220;unknown&#8221; string between string1 and string2 as \1.</p>
<p>The simpler same line only version</p>
<p><code><br />
:%s#string1\(.\{-}\)&lt;td[^>]\+>#&#038;string2#<br />
</code>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.vimtips-blog.com/replacing-text-after-a-string/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Pasting into Vim without the Junk</title>
		<link>http://www.vimtips-blog.com/pasting-into-vim/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pasting-into-vim</link>
		<comments>http://www.vimtips-blog.com/pasting-into-vim/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 11:28:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.vimtips-blog.com/?p=54</guid>
		<description><![CDATA[One irritation with the default set up of VIM is where you paste into a file and text is formatted either with unwanted tabs or is prefixed by a &#8220;comment&#8221; hash etc. As this is rarely what you want the setting to prevent this is:- :set paste Another problem is when you paste from say <a href='http://www.vimtips-blog.com/pasting-into-vim/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>One irritation with the default set up of VIM is where you paste into a file and text is formatted either with unwanted tabs or is prefixed by a &#8220;comment&#8221; hash etc. As this is rarely what you want the setting to prevent this is:-</p>
<div class=xbox>
:set paste</p>
<p>Another problem is when you paste from say Microsoft Word and you get a lot of junk formatting codes</p>
<p>&#8221; filter non-printable characters from the paste buffer<br />
&#8221; useful when pasting from some gui application<br />
:nmap <leader>p :let @* = substitute(@*,&#8217;[^[:print:]]&#8217;,&#8221;,&#8217;g')<cr>&#8220;*</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.vimtips-blog.com/pasting-into-vim/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using gf to open root based include files : wonderful includeexpr</title>
		<link>http://www.vimtips-blog.com/using-gf-to-open-root-based-include-files-wonderful-includeexpr/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-gf-to-open-root-based-include-files-wonderful-includeexpr</link>
		<comments>http://www.vimtips-blog.com/using-gf-to-open-root-based-include-files-wonderful-includeexpr/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 21:18:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.vimtips-blog.com/?p=51</guid>
		<description><![CDATA[gf can open all files paths relative to the current directory eg:- index.php main/main.php ../index.php But gf doesn&#8217;t know what to do with root based paths because it obviously has no idea where the file actually is. This is highly frustrating but as usual with vim there is a work around in fact there are <a href='http://www.vimtips-blog.com/using-gf-to-open-root-based-include-files-wonderful-includeexpr/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<div class=xbox>
gf can open all files paths relative to the current directory eg:-<br />
index.php<br />
main/main.php<br />
../index.php</p>
<p>But gf doesn&#8217;t know what to do with root based paths because it obviously has no idea where the file actually is. This is highly frustrating but as usual with vim there is a work around in fact there are several but the one I find horsiest is the recently introduced includeexpr. </p>
<p>This works by performing a virtual substitute on each root path it recognizes replacing the<br />
root with a full path eg.<br />
/js/main.js<br />
with<br />
/var/www/html/js/main.js</p>
<p>/var/www/html/js/main.js</p>
<p>:set includeexpr=substitute(v:fname,&#8217;/js/&#8217;,'/var/www/html/js/&#8217;,'g&#8217;)</p>
<p>Of course you have to set this up for each project you work depending on the root path.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.vimtips-blog.com/using-gf-to-open-root-based-include-files-wonderful-includeexpr/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Add your own menus to gVim , it&#8217;s Easy</title>
		<link>http://www.vimtips-blog.com/add-your-own-menus-to-gvim-its-easy/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=add-your-own-menus-to-gvim-its-easy</link>
		<comments>http://www.vimtips-blog.com/add-your-own-menus-to-gvim-its-easy/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 20:49:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.vimtips-blog.com/?p=40</guid>
		<description><![CDATA[I&#8217;ve only recently started creating my own menus it&#8217;s really easy. I&#8217;m maxxed out on maps and abbreviations so find it useful to put stuff in these menus. " in your _vimrc (or .vimrc) The "My" identifier is the name of the Menu and binds all the commands together amenu My.Insert\ a\ VIM\ modeline ggOvim:ff=unix <a href='http://www.vimtips-blog.com/add-your-own-menus-to-gvim-its-easy/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve only recently started creating my own menus it&#8217;s really easy. I&#8217;m maxxed out on maps and abbreviations so find it useful to put stuff in these menus.</p>
<div class="xbox">
<code><br />
" in your _vimrc (or .vimrc)</p>
<p>The "My" identifier is the name of the Menu and binds all the commands together</p>
<p>amenu  My.Insert\ a\ VIM\ modeline <Esc><Esc>ggOvim:ff=unix ts=4 ss=4<CR>vim60:fdm=marker<esc>gg<br />
" fName: Only the filename (without path)<br />
" fPath: Only the path<br />
" rName: path+filename relative to current directory<br />
amenu My.Copy\ fName :let @*=expand("%:t")<CR><br />
amenu My.Copy\ fPath :let @*=expand("%:p:h")<CR><br />
amenu My.Copy\ rName :let @*=expand("%:.")<CR><br />
amenu My.Tab\ sball :tab sball<br />
amenu My.vimtips :tabe c:/intranet/vimtips.txt<CR><br />
</code>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.vimtips-blog.com/add-your-own-menus-to-gvim-its-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

