<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Tech-Recipes - Latest Comments in Show line numbers in vi or vim</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><atom:link href="https://tech-recipes.disqus.com/show_line_numbers_in_vi_or_vim_unix_tech_recipes/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sat, 06 Aug 2011 19:52:22 -0000</lastBuildDate><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-279482377</link><description>&lt;p&gt;Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Maikel</dc:creator><pubDate>Sat, 06 Aug 2011 19:52:22 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-204406427</link><description>&lt;p&gt; What... hmm., no preview and this notices the tags and does something gunky... anyways, I ment to remove &amp;lt; /cr &amp;gt; &amp;lt; /f6 &amp;gt; &amp;lt; /silent &amp;gt; (sorry for the whitespace), i.e. only nnoremap &amp;lt;silent&amp;gt; &amp;lt;f6&amp;gt; :set number!&amp;lt;cr&amp;gt; is sufficient.nnoremap &amp;lt;silent&amp;gt; &amp;lt;f6&amp;gt; :set number!&amp;lt;cr&amp;gt; is sufficient.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ville Aakko</dc:creator><pubDate>Mon, 16 May 2011 06:25:19 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-204406063</link><description>&lt;p&gt;For me, I needed to remove &amp;lt;/cr&amp;gt;&amp;lt;/f6&amp;gt;&amp;lt;/silent&amp;gt; (otherwise they vere pasted into vim)&amp;lt;/cr&amp;gt;&amp;lt;/f6&amp;gt;&amp;lt;/silent&amp;gt; (otherwise they vere pasted into vim)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ville Aakko</dc:creator><pubDate>Mon, 16 May 2011 06:23:27 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-192283542</link><description>&lt;p&gt;do :help linenumbers&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">pedro</dc:creator><pubDate>Tue, 26 Apr 2011 18:06:10 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-133614576</link><description>&lt;p&gt;Thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dsa</dc:creator><pubDate>Mon, 24 Jan 2011 02:14:48 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-93724370</link><description>&lt;p&gt;The .vimrc file needs to be in your home directory. Since the root user's home directory is in a different location than the standard user, it would make sense to put it in that location.&lt;/p&gt;&lt;p&gt;Though if using sudo to act as root, it may or may not use the user's .vimrc file - simple enough to test.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anon</dc:creator><pubDate>Thu, 04 Nov 2010 04:00:14 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-84052111</link><description>&lt;p&gt;This toggles line numbres:&lt;br&gt;:set nu!&lt;br&gt;Put this in .vimrc to make F6 toggle line numbers:&lt;br&gt;nnoremap &amp;lt;silent&amp;gt; &amp;lt;f6&amp;gt; :set nu!&amp;lt;cr&amp;gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">cs</dc:creator><pubDate>Mon, 04 Oct 2010 17:11:11 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-77007221</link><description>&lt;p&gt;This did not work as root.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">A Obrzut</dc:creator><pubDate>Sat, 11 Sep 2010 21:52:57 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-73996426</link><description>&lt;p&gt;I tried so many of these things to get the line number to always appear at the lower right hand corner and none of them worked.  It turns out that all you need to do is add&lt;/p&gt;&lt;p&gt;set ruler&lt;/p&gt;&lt;p&gt;to your .vimrc file&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">lancesimms</dc:creator><pubDate>Wed, 01 Sep 2010 16:17:49 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-73630627</link><description>&lt;p&gt;You shouldn't need the colon (:) if it is in your ~/.vimrc. Just add set number to the ~/.vimrc&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mark Szymanski</dc:creator><pubDate>Tue, 31 Aug 2010 19:38:30 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-65234489</link><description>&lt;p&gt;my terminal doesn't show color word. for example when we write int then it turns green, but mine shows black. this happens for all commands .&lt;br&gt;help me!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SagarRmali</dc:creator><pubDate>Fri, 30 Jul 2010 02:31:47 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-65170543</link><description>&lt;p&gt;abreviations work, too:&lt;/p&gt;&lt;p&gt;:set nu&lt;br&gt;:set nonu&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bytemangler</dc:creator><pubDate>Thu, 29 Jul 2010 17:42:37 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-58371807</link><description>&lt;p&gt;How to save a file with numbers ,Rathnasekaran.R&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ramy Mousa</dc:creator><pubDate>Thu, 24 Jun 2010 02:37:07 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-53817394</link><description>&lt;p&gt;very useful thx ! ! !&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Opalinux</dc:creator><pubDate>Thu, 03 Jun 2010 05:20:50 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-38653645</link><description>&lt;p&gt;thanks krab&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tojo</dc:creator><pubDate>Tue, 09 Mar 2010 04:51:31 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-32889103</link><description>&lt;p&gt;read the instruction for configuring .vimrc file&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">soorena776</dc:creator><pubDate>Sat, 06 Feb 2010 22:30:09 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-27195868</link><description>&lt;p&gt;Thanks, it worked for me. (gvim version 7.2)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mostafamahdieh</dc:creator><pubDate>Thu, 24 Dec 2009 08:54:32 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-25389007</link><description>&lt;p&gt;first time - comments are important more then the post&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sud</dc:creator><pubDate>Thu, 10 Dec 2009 03:23:18 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-16863481</link><description>&lt;p&gt;@Rick: you can use only one shortcut to toggle the line numbers also with the following line (note the ! after the number which mean "toggle" for vi):&lt;/p&gt;&lt;p&gt;nnoremap &amp;lt;silent&amp;gt; &amp;lt;f6&amp;gt; :set number!&amp;lt;cr&amp;gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cédric Bosdonnat</dc:creator><pubDate>Fri, 18 Sep 2009 04:10:19 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-16706920</link><description>&lt;p&gt;This is what I was looking for.&lt;/p&gt;&lt;p&gt;Here's what I did:&lt;/p&gt;&lt;p&gt;Edit ~/.vimrc&lt;/p&gt;&lt;p&gt;add these lines:&lt;/p&gt;&lt;p&gt;nnoremap &amp;lt;silent&amp;gt; &amp;lt;f6&amp;gt; :set number&amp;lt;cr&amp;gt;&lt;br&gt;nnoremap &amp;lt;silent&amp;gt; &amp;lt;s-f6&amp;gt; :set nonumber&amp;lt;cr&amp;gt;&lt;/p&gt;&lt;p&gt;Now, F6 turns line numbers on, Shift F6 turns them off.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rick Graham</dc:creator><pubDate>Wed, 16 Sep 2009 07:43:01 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-16201085</link><description>&lt;p&gt;sweet, thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Broder</dc:creator><pubDate>Tue, 08 Sep 2009 13:29:24 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-15122120</link><description>&lt;p&gt;that was so helpful. thanx...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dushi</dc:creator><pubDate>Thu, 20 Aug 2009 08:01:18 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-10998646</link><description>&lt;p&gt;You can also add:&lt;br&gt;set number&lt;br&gt;~/.vimrc&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ginetta</dc:creator><pubDate>Tue, 16 Jun 2009 13:37:22 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-9283659</link><description>&lt;p&gt;Good tip. I get horizontal lines underneath the numbers, is that supposed to happen?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James</dc:creator><pubDate>Wed, 13 May 2009 11:59:01 -0000</pubDate></item><item><title>Re: Show line numbers in vi or vim</title><link>http://www.tech-recipes.com/rx/402/show-line-numbers-in-vi-or-vim/#comment-7372592</link><description>&lt;p&gt;too easy.. :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave</dc:creator><pubDate>Fri, 20 Mar 2009 10:15:51 -0000</pubDate></item></channel></rss>