<?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>beer planet &#187; key</title> <atom:link href="http://beerpla.net/tag/key/feed/" rel="self" type="application/rss+xml" /><link>http://beerpla.net</link> <description>where things have nothing to do with beer - tutorials, tips, how-tos, thoughts, hacks, and other techy nonsense</description> <lastBuildDate>Thu, 17 May 2012 22:50:53 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <atom:link rel='hub' href='http://beerpla.net/?pushpress=hub'/> <item><title>Mastering The Linux Shell &#8211; Bash Shortcuts Explained (Now With Cheat Sheets)</title><link>http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/</link> <comments>http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/#comments</comments> <pubDate>Mon, 22 Dec 2008 19:46:05 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[cheat sheet]]></category> <category><![CDATA[cheatsheet]]></category> <category><![CDATA[combination]]></category> <category><![CDATA[featured]]></category> <category><![CDATA[key]]></category> <category><![CDATA[keyboard]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[pdf]]></category> <category><![CDATA[shortcut]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/12/22/getting-around-bash-bash-shortcuts/</guid> <description><![CDATA[<p><img
style="margin: 0px 10px 10px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/GettingAroundBashBashShortcuts_BFF6/image_thumb_3.png" width="234" height="114" />During my day-to-day activities, I use the Bash shell a lot. My #1 policy is to optimize the most frequently used activities as much as possible, so I’ve compiled these handy bash shortcuts and hints (tested in SecureCRT on Windows and Konsole on Linux). The article only touches on the default bash mode – emacs, not vi. If you haven’t specifically assigned your shell mode to vi (set –o vi), you’re almost certainly using the emacs mode. Learn these and your shell productivity will skyrocket, I guarantee it.</p><p><div
class="note"><div
class="noteimportant"><strong>Update #1: </strong>In response to a few people saying this list is too short and “[he] could&#039;ve added something to it, to atleast make it look longer” (quote from one of <a
href="http://www.stumbleupon.com/url/beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/">Stumbleupon</a></div></div>...<div
class=clear></div> <a
href="http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p><img
style="margin: 0px 10px 10px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/GettingAroundBashBashShortcuts_BFF6/image_thumb_3.png" width="234" height="114" />During my day-to-day activities, I use the Bash shell a lot. My #1 policy is to optimize the most frequently used activities as much as possible, so I’ve compiled these handy bash shortcuts and hints (tested in SecureCRT on Windows and Konsole on Linux). The article only touches on the default bash mode – emacs, not vi. If you haven’t specifically assigned your shell mode to vi (set –o vi), you’re almost certainly using the emacs mode. Learn these and your shell productivity will skyrocket, I guarantee it.</p><p><div
class="note"><div
class="noteimportant"><strong>Update #1: </strong>In response to a few people saying this list is too short and “[he] could&#039;ve added something to it, to atleast make it look longer” (quote from one of <a
href="http://www.stumbleupon.com/url/beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/">Stumbleupon</a> reviewers), I want to clarify something. <strong>I deliberately did not include every single bash shortcut there is.</strong> I included what I personally thought were the best and most useful commands. I did not want to make the list too cluttered and wanted the cheat sheet to fit on one page without going to a smaller font size.</div></div></p><p><a
href="http://beerpla.net/downloads/Bash.Shortcuts.pdf" target="_blank"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/GettingAroundBashBashShortcuts_BFF6/image_6.png" width="640" height="248" /></a>&#160;</p><p><font
size="5"><strong>Download Version 1.3 (03/22/12):</strong></font></p><ul><li><a
href="http://beerpla.net/downloads/Bash.Shortcuts.pdf">Bash.Shortcuts.pdf for Adobe Acrobat</a> (305.8 kB) downloaded 7317 times</li><li><a
href="http://beerpla.net/downloads/Bash.Shortcuts.docx">Bash.Shortcuts.docx for Word 2007+</a> (22.5 kB) downloaded 2735 times</li><li><a
href="http://beerpla.net/downloads/Bash.Shortcuts.doc">Bash.Shortcuts.doc for Word 97-2003</a> (52.5 kB) downloaded 1928 times</li></ul><p>And, for quick reference, here&#039;s the ugly html version:</p><p><center><br
/><table
border="1" cellspacing="0" cellpadding="2" width="600"><tbody><tr><td
width="186"><p
align="center"><b>Keyboard shortcut</b></p></td><td
width="564"><p
align="center"><b>Action</b></p></td></tr><tr><td
width="750" colspan="2"><p
align="center"><strong>Navigation</strong></p></td></tr><tr><td
width="186"><p><b>Ctrl-A</b></p></td><td
width="564"><p><i>Go </i>to the beginning of the line (note that if you use GNU screen, you can use the Home button to do this, especially considering that Ctrl-A is a special control character in screen).</p></td></tr><tr><td
width="186"><p><b>Ctrl-E</b></p></td><td
width="564"><p><i>Go </i>to the end of the line (note that if you use GNU screen, you can use the End button to do this).</p></td></tr><tr><td
width="186"><p><b>Alt-B (or ESC, left arrow)</b></p></td><td
width="564"><p><i>Jump </i>back one word using a non-alphanumeric character as delimiter.</p></td></tr><tr><td
width="186"><p><b>Alt-F (or ESC, right arrow)</b></p></td><td
width="564"><p><i>Jump </i>forward one word using a non-alphanumeric character as delimiter.</p></td></tr><tr><td
width="186"><p><b>Ctrl-PGUP or Shift-PGUP</b></p></td><td
width="564"><p>This may or may not work, and it works differently on different console apps. It will either <i>scroll</i> up one line at a time, 1 page at a time, or it may not work at all. I&#039;m inclined to think it&#039;s not a bash shortcut at all.</p></td></tr><tr><td
width="186"><p><b>Ctrl-PGDN or Shift-PGDN</b></p></td><td
width="564"><p>Same as the above but <i>scrolling</i> is done in the opposite direction.</p></td></tr><tr><td
width="186"><p><b>Up/Down</b></p></td><td
width="564"><p><i>Previous/Next</i> command in history. This one is way too obvious but I&#039;m including it for completeness.</p></td></tr><tr><td
width="186"><p><b>Ctrl-R</b></p></td><td
width="564"><p>History <i>search</i>. For example, Ctrl-R svn Ctrl-R Ctrl-R … will cycle through all recently run commands with the ‘svn’ in them. It is one of the most useful shortcuts in bash.</p></td></tr><tr><td
width="186"><p><b>Ctrl-O</b></p></td><td
width="564"><p>Takes whatever line was after the line you selected with Ctrl-R and makes it your next command.</p></td></tr><tr><td
width="750" colspan="2"><p
align="center"><strong>Command Line Manipulation</strong></p></td></tr><tr><td
width="186"><p><b>Ctrl-W</b></p></td><td
width="564"><p><i>Cut </i>one word backwards<i> </i>using white space as delimiter.</p></td></tr><tr><td
width="186"><p><b>Alt-BACKSPACE</b></p></td><td
width="564"><p><i>Cut</i> one word backwards using a non-alphanumeric character as delimiter (different from Ctrl-W, for example, abc;bcd will cut to abc;).</p></td></tr><tr><td
width="186"><p><b>Ctrl-K</b></p></td><td
width="564"><p><i>Cut </i>everything forward<i> </i>to end of line.</p></td></tr><tr><td
width="186"><p><b>Ctrl-U</b></p></td><td
width="564"><p><i>Cut </i>everything backwards<i> </i>to beginning of line.</p></td></tr><tr><td
width="186"><p><b>Ctrl-T</b></p></td><td
width="564"><p><i>Transpose </i>the current character with the previous one. I almost never use this. Never mind, I never use it, but someone might find it useful.</p></td></tr><tr><td
width="186"><p><b>Alt-T</b></p></td><td
width="564"><p><i>Transpose</i> the word at cursor with the one before cursor. In other words, swap them around.</p></td></tr><tr><td
width="186"><p><b>Ctrl-Y</b></p></td><td
width="564"><p><i>Paste</i> whatever was cut by the last cut command.</p></td></tr><tr><td
width="186"><p><b>Ctrl-V</b></p></td><td
width="564"><p><i>Insert</i> the next character <i>literally</i>. For example, Ctrl-V TAB inserts the actual TAB character. This shortcut is often misunderstood because of mistyping Ctrl-V and not realizing what it does.</p></td></tr><tr><td
width="186"><p><b>Ctrl-_</b></p></td><td
width="564"><p><i>Undo </i>the last command. Don’t forget – it’s Ctrl-Shift-MINUS, not Ctrl-MINUS.</p></td></tr><tr><td
width="186"><p><b>Alt-R</b></p></td><td
width="564"><p><i>Revert </i>all changes to current line. Very useful if you accidentally modify a command in history.<i></i></p></td></tr><tr><td
width="186"><p><b>Alt-U/Alt-L/Alt-C</b></p></td><td
width="564"><p><i>Uppercase/lowercase/capitalize </i>from cursor to end of word and move cursor past end of word.</p></td></tr><tr><td
width="750" colspan="2"><p
align="center"><strong>Terminal control</strong></p></td></tr><tr><td
width="186"><p><b>Ctrl-L</b></p></td><td
width="564"><p><i>Clear</i> screen while keeping whatever is already typed in the command line intact.</p></td></tr><tr><td
width="186"><p><b>Ctrl-S</b></p></td><td
width="564"><p><i>Suspend</i> currently running terminal.</p></td></tr><tr><td
width="186"><p><b>Ctrl-Q</b></p></td><td
width="564"><p><i>Unsuspend</i> the terminal suspended by Ctrl-S. You need to be aware of this shortcut because 99% of the time you’ve accidentally pressed Ctrl-S and need to undo its effects.</p></td></tr><tr><td
width="186"><p><b>Ctrl-Z</b></p></td><td
width="564"><p><i>Suspend </i>the currently running process (usually followed by <i>bg</i> to resume it in the background or <i>fg</i> to resume in the foreground).</p></td></tr><tr><td
width="186"><p><b>TAB</b></p></td><td
width="564"><p><i>Autocomplete</i>. Start typing, then hit TAB. You will either get a list of possible completion values (2 TABs needed) or the only choice will be filled in (only 1 TAB is needed). This shortcut is quite obvious and well known, so I put it at the bottom of the list.</p></td></tr></tbody></table><p></center><p><div
class="note"><div
class="notetip"><strong>Tip:</strong> By the way, as duly noted in the comments, all of these tricks work on the mysql command line, so you can, for example, ctrl-R through your previously executed mysql commands.</div></div></p><p>Hope you guys will find this list helpful. I think it is relatively complete, but feel free to add any omissions.</p><p><center><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=B001GIOFNI&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0596009658&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0596526784&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0596005954&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe><iframe
style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=beepla-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=1565922255&amp;md=10FE9736YVPPT7A0FBG2&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe></center><div
class="post_blob_1">Get guaranteed <a
href="http://www.test-king.com/exams/70-270.htm">70-270</a> exam success with up to date <a
href="http://www.test-king.com/exams/642-982.htm">642-982</a> questions and <a
href="http://www.test-king.com/exams/642-504.htm">642-504</a> practice test.</div><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering+The+Linux+Shell+-+Bash+Shortcuts+Explained+%28Now+With+Cheat+Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Mastering%20The%20Linux%20Shell%20-%20Bash%20Shortcuts%20Explained%20%28Now%20With%20Cheat%20Sheets%29&amp;link=http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/&amp;notes=During%20my%20day-to-day%20activities%2C%20I%20use%20the%20Bash%20shell%20a%20lot.%20My%20%231%20policy%20is%20to%20optimize%20the%20most%20frequently%20used%20activities%20as%20much%20as%20possible%2C%20so%20I%E2%80%99ve%20compiled%20these%20handy%20bash%20shortcuts%20and%20hints%20%28tested%20in%20SecureCRT%20on%20Windows%20and%20Konsole%20on%20Linux%29.%20The%20article%20only%20touches%20on%20the%20default%20bas&amp;short_link=http://bit.ly/bGubfn&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/" rel="bookmark" title="April 9, 2008">Some Useful vim Commands &#8211; My vim Cheatsheet</a></li><li><a
href="http://beerpla.net/2009/04/11/essential-firefox-extensions-plugins-add-ons-and-tips-a-comprehensive-guide-part-1-tips/" rel="bookmark" title="April 11, 2009">Essential Firefox Extensions (Plugins, Add-Ons) And Tips &ndash; A Comprehensive Guide :: Part 1 :: Tips</a></li><li><a
href="http://beerpla.net/2009/10/06/supercharge-your-gnu-screen-with-a-power-taskbar-and-never-feel-lost-again/" rel="bookmark" title="October 6, 2009">Supercharge Your GNU Screen With A Power &quot;Taskbar&quot; And Never Feel Lost Again</a></li><li><a
href="http://beerpla.net/2009/11/04/android-auto-formatting-android-xml-files-with-eclipse/" rel="bookmark" title="November 4, 2009">[Android] Auto Formatting Android XML Files With Eclipse</a></li><li><a
href="http://beerpla.net/2008/03/12/mass-renaming-directories-and-files-using-total-commander/" rel="bookmark" title="March 12, 2008">Mass Renaming Directories And Files Using Total Commander</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F12%2F22%2Fmastering-the-linux-shell-bash-shortcuts-explained%2F&amp;title=Mastering%20The%20Linux%20Shell%20%26%238211%3B%20Bash%20Shortcuts%20Explained%20%28Now%20With%20Cheat%20Sheets%29" id="wpa2a_2"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/feed/</wfw:commentRss> <slash:comments>32</slash:comments> </item> <item><title>Debugging Weird sshd Connection Problems + What Happens When You Stop sshd</title><link>http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/</link> <comments>http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/#comments</comments> <pubDate>Fri, 15 Aug 2008 16:14:53 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[connection]]></category> <category><![CDATA[debug]]></category> <category><![CDATA[key]]></category> <category><![CDATA[keyboard interactive]]></category> <category><![CDATA[problem]]></category> <category><![CDATA[refuse]]></category> <category><![CDATA[sshd]]></category> <category><![CDATA[stop]]></category> <guid
isPermaLink="false">http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/</guid> <description><![CDATA[<p>So the other day I was setting up public key authentication for one of my users, which is usually very straightforward: generate a private/public key pair, stick the private key into user&#039;s .ssh dir, set dir permissions to 0700, private key permissions to 0600, stick the public key into the authorized_keys file on the server, and the job&#039;s done. However, this time, no matter what I was doing, the public key was being rejected or ignored and the system was moving on to the keyboard-interactive authentication.</p><p>Debugging on the client side with -v didn&#039;t help much:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td
class="code"><pre>artem@DeathStar:~/svn/b2/Fetch/LinkChecker&#62; ssh -v </pre></td></tr></table>...<div
class=clear></div> <a
href="http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></div>]]></description> <content:encoded><![CDATA[<p>So the other day I was setting up public key authentication for one of my users, which is usually very straightforward: generate a private/public key pair, stick the private key into user&#039;s .ssh dir, set dir permissions to 0700, private key permissions to 0600, stick the public key into the authorized_keys file on the server, and the job&#039;s done. However, this time, no matter what I was doing, the public key was being rejected or ignored and the system was moving on to the keyboard-interactive authentication.</p><p>Debugging on the client side with -v didn&#039;t help much:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td
class="code"><pre>artem@DeathStar:~/svn/b2/Fetch/LinkChecker&gt; ssh -v monkey@192.168.1.30
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
...
lots of boring shit
...
debug1: Found key in /home/artem/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
...
more boring shit
...
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key:
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Offering public key:
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Offering public key: /home/artem/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/artem/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:</pre></td></tr></table></div><p>After breaking my head over possible reasons why the pile of junk that thinks it&#039;s smarter than me next to my feet doesn&#039;t work, kicking it a few times, and observing the same result, I turned to debugging the ssh daemon itself &#8211; sshd.</p><ul><li>The -d option disables the daemon mode and enables debug mode, in which only 1 connection is accepted for the lifetime of the server, after which it simply quits.</li><li>-dd simply enables a more detailed output.</li><li>-e switches this debug output from a log file to STDOUT.</li></ul><p>However, to free up port 22, I had to stop the daemon that was already running, or else a &#034;Bind to port 22 on 0.0.0.0 failed: Address already in use.&#034; error appeared (duh). An interesting question though, especially for people doing this to remote boxes, what happens when one stops sshd? Ever thought of doing that but instead ran over to your mommy crying like a little girl? Well, fear no more, because I&#039;ll tell you exactly what happens:</p><ol><li>New users will have their connection refused.</li><li>Your own connection will not be interrrupted. sshd works by spawning a new instance of itself for every incoming connection, so your own sshd process will stay in memory.</li></ol><p> So where was I?</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre>/usr/sbin/sshd -dd -e</pre></td></tr></table></div><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
</pre></td><td
class="code"><pre>...
Authentication refused: bad ownership or modes for directory /home/monkey
...
Failed publickey for monkey from 192.168.1.30 port 56287 ssh2</pre></td></tr></table></div><p>AhA!! (emphasis on the last &#039;a&#039;). What have we here?</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td
class="code"><pre>artem@DeathStar:~&gt; cd /home/
artem@DeathStar:/home/&gt; l
drwxrwx--- 29 monkey  users 4096 2008-08-06 23:14 monkey/
&nbsp;
DeathStar:/home/ # chmod 755 monkey
drwxr-xr-x 29 monkey  users 4096 2008-08-06 23:14 monkey/
&nbsp;
artem@DeathStar:~/svn/b2/Fetch/LinkChecker&gt; ssh -v monkey@192.168.1.30
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.1.30 [192.168.1.30] port 22.
debug1: Connection established.
debug1: identity file /home/artem/.ssh/id_rsa type 1
debug1: identity file /home/artem/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.6
debug1: match: OpenSSH_4.6 pat OpenSSH*
...</pre></td></tr></table></div><p>Connection established, all systems are go, the key has been accepted.</p><p>Inspired by <a
href="http://linux.derkeiler.com/Mailing-Lists/Fedora/2005-08/1105.html">http://linux.derkeiler.com/Mailing-Lists/Fedora/2005-08/1105.html</a></p><p>P.S. Don&#039;t forget to /etc/init.d/sshd start. <img
src='http://beerpla.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging+Weird+sshd+Connection+Problems+%2B+What+Happens+When+You+Stop+sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Debugging%20Weird%20sshd%20Connection%20Problems%20%2B%20What%20Happens%20When%20You%20Stop%20sshd&amp;link=http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/&amp;notes=So%20the%20other%20day%20I%20was%20setting%20up%20public%20key%20authentication%20for%20one%20of%20my%20users%2C%20which%20is%20usually%20very%20straightforward%3A%20generate%20a%20private%2Fpublic%20key%20pair%2C%20stick%20the%20private%20key%20into%20user%27s%20.ssh%20dir%2C%20set%20dir%20permissions%20to%200700%2C%20private%20key%20permissions%20to%200600%2C%20stick%20the%20public%20key%20into%20the%20authoriz&amp;short_link=http://bit.ly/cy1sPs&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2010/03/01/the-most-awesome-vpn-tip-how-to-make-windows-automatically-use-your-local-wifilan-connection-directly-for-requests-that-dont-need-to-go-through-vpn/" rel="bookmark" title="March 1, 2010">The Most Awesome VPN Tip: How To Make Windows Automatically Use Your Local WiFi/LAN Connection Directly For Requests That Don&#039;t Need To Go Through VPN</a></li><li><a
href="http://beerpla.net/2010/01/09/how-to-exportimport-your-expandrivesftpdrive-drives-and-settings/" rel="bookmark" title="January 9, 2010">How To Export/Import Your ExpanDrive/SFTPDrive Drives And Settings</a></li><li><a
href="http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/" rel="bookmark" title="May 12, 2008">A Better diff Or What To Do When GNU diff Runs Out Of Memory (&quot;diff: memory exhausted&quot;)</a></li><li><a
href="http://beerpla.net/2007/03/24/beer-planet-hosting-moved-away-from-dreamhost-thank-god-finally/" rel="bookmark" title="March 24, 2007">Beer Planet Hosting Moved Away From Dreamhost (Thank God, Finally!)</a></li><li><a
href="http://beerpla.net/2006/10/03/youtube-custom-rss-search-results/" rel="bookmark" title="October 3, 2006">Youtube Custom RSS Search Results</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F08%2F15%2Fdebugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd%2F&amp;title=Debugging%20Weird%20sshd%20Connection%20Problems%20%2B%20What%20Happens%20When%20You%20Stop%20sshd" id="wpa2a_4"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Some Useful vim Commands &#8211; My vim Cheatsheet</title><link>http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/</link> <comments>http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/#comments</comments> <pubDate>Thu, 10 Apr 2008 04:07:24 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[My Favorites]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[cheatsheet]]></category> <category><![CDATA[combination]]></category> <category><![CDATA[command]]></category> <category><![CDATA[key]]></category> <category><![CDATA[shortcut]]></category> <category><![CDATA[vim]]></category> <guid
isPermaLink="false">http://beerpla.net/?p=330</guid> <description><![CDATA[<p>[WORK IN PROGRESS] Here is a list of commands that I use every day with vim, in no particular order. Out of a billion possible key combinations, I found these to be irreplaceable and simple enough to remember.<div
style="margin-top: 0.313in; margin-left: 0in; direction: ltr"><ul
style="margin-top: 0in; margin-bottom: 0in; margin-left: 0.074in; direction: ltr; unicode-bidi: embed"><p
style="font-size: 10pt; margin: 0in; font-family: verdana; text-align: center">&#160;</p><div
style="direction: ltr"><table
style="border-right: #a3a3a3 1pt solid; border-top: #a3a3a3 1pt solid; border-left: #a3a3a3 1pt solid; direction: ltr; border-bottom: #a3a3a3 1pt solid; border-collapse: collapse" cellspacing="0" cellpadding="0" border="1" valign="top"><tbody><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">*</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">search for the word under cursor (to the end of the file)</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">#</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">search for the word under cursor (to the top of the file)</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">ctrl-p</span>,<span
style="font-weight: bold">ctrl-n</span></p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">suggest (p)revious or (n)ext autocomplete from the list of existing keywords in the file or included files (!).</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">:go</span> NNN</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">go to byte NNN</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">.</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">redo last command</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">/</span>SEARCH TERM</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">search document for SEARCH TERM</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">:%s/</span>FOO<span
style="font-weight: bold">/</span>BAR<span
style="font-weight: bold">/gci</span></p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">replace FOO with BAR (g)lobally, case (i)insensitively, and asking for (c)onfirmation</p></td></tr></tbody></table></div></ul></div>...<div
class=clear></div> <a
href="http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p>[WORK IN PROGRESS] Here is a list of commands that I use every day with vim, in no particular order. Out of a billion possible key combinations, I found these to be irreplaceable and simple enough to remember.<div
style="margin-top: 0.313in; margin-left: 0in; direction: ltr"><ul
style="margin-top: 0in; margin-bottom: 0in; margin-left: 0.074in; direction: ltr; unicode-bidi: embed"><p
style="font-size: 10pt; margin: 0in; font-family: verdana; text-align: center">&nbsp;</p><div
style="direction: ltr"><table
style="border-right: #a3a3a3 1pt solid; border-top: #a3a3a3 1pt solid; border-left: #a3a3a3 1pt solid; direction: ltr; border-bottom: #a3a3a3 1pt solid; border-collapse: collapse" cellspacing="0" cellpadding="0" border="1" valign="top"><tbody><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">*</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">search for the word under cursor (to the end of the file)</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">#</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">search for the word under cursor (to the top of the file)</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">ctrl-p</span>,<span
style="font-weight: bold">ctrl-n</span></p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">suggest (p)revious or (n)ext autocomplete from the list of existing keywords in the file or included files (!).</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">:go</span> NNN</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">go to byte NNN</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">.</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">redo last command</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">/</span>SEARCH TERM</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">search document for SEARCH TERM</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">:%s/</span>FOO<span
style="font-weight: bold">/</span>BAR<span
style="font-weight: bold">/gci</span></p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">replace FOO with BAR (g)lobally, case (i)insensitively, and asking for (c)onfirmation</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">n</span> (<span
style="font-weight: bold">N</span>)</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">next (previous) search result</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">%</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">find and jump to a matching brace or parenthesis</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">u</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">undo</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">ctrl-r</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">redo</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">r</span> CHAR</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">replace character under curson with CHAR</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">i</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">start editing before current character</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">I</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">start editing in the beginning of current line</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">a</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">start editing after current character</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">A</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">start editing at the end of current line</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">o</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">start editing on the next line</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">O</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">start editing on the previous line</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">:wq</span> or <span
style="font-weight: bold">ZZ</span></p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">write file and exit</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">ctrl-v</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">visual block select (rectangular)</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">shift-v</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">visual line select</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">ctrl</span>(or <span
style="font-weight: bold">shift</span>)<span
style="font-weight: bold">-v</span> <span
style="font-weight: bold">y</span> or <span
style="font-weight: bold">d</span></p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">copy or delete selected text</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">yy</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">yank (copy) current line</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">y</span>NNN<span
style="font-weight: bold"> </span>arrow up/down</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">yank NNN lines above or below</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">p</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">paste the yanked buffer</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-weight: bold; font-size: 10pt; margin: 0in; font-family: verdana">cw</p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">change word (delete word under cursor and go into edit mode)</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">c</span>N<span
style="font-weight: bold">w</span></p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466"><p
style="font-size: 10pt; margin: 0in; font-family: verdana">change N words</p></td></tr><tr><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 1.868in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid"><p
style="font-size: 10pt; margin: 0in; font-family: verdana"><span
style="font-weight: bold">e!</span></p></td><td
style="border-right: #a3a3a3 1pt solid; padding-right: 3pt; border-top: #a3a3a3 1pt solid; padding-left: 3pt; padding-bottom: 1.95pt; vertical-align: top; border-left: #a3a3a3 1pt solid; width: 4.768in; padding-top: 1.95pt; border-bottom: #a3a3a3 1pt solid" width="466">reload the file (revert)</td></tr></tbody></table></div></ul></div><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Some+Useful+vim+Commands+-+My+vim+Cheatsheet&amp;link=http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/&amp;notes=%5BWORK%20IN%20PROGRESS%5D%20Here%20is%20a%20list%20of%20commands%20that%20I%20use%20every%20day%20with%20vim%2C%20in%20no%20particular%20order.%20Out%20of%20a%20billion%20possible%20key%20combinations%2C%20I%20found%20these%20to%20be%20irreplaceable%20and%20simple%20enough%20to%20remember.%20%20%20%20%26nbsp%3B%20%20%20%20%20%20%2A%20%20search%20for%20the%20word%20under%20cursor%20%28to%20the%20end%20of%20the%20file%29%20%20%20%23%20%20search%20fo&amp;short_link=http://bit.ly/cWsBSC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Some+Useful+vim+Commands+-+My+vim+Cheatsheet&amp;link=http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/&amp;notes=%5BWORK%20IN%20PROGRESS%5D%20Here%20is%20a%20list%20of%20commands%20that%20I%20use%20every%20day%20with%20vim%2C%20in%20no%20particular%20order.%20Out%20of%20a%20billion%20possible%20key%20combinations%2C%20I%20found%20these%20to%20be%20irreplaceable%20and%20simple%20enough%20to%20remember.%20%20%20%20%26nbsp%3B%20%20%20%20%20%20%2A%20%20search%20for%20the%20word%20under%20cursor%20%28to%20the%20end%20of%20the%20file%29%20%20%20%23%20%20search%20fo&amp;short_link=http://bit.ly/cWsBSC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Some+Useful+vim+Commands+-+My+vim+Cheatsheet&amp;link=http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/&amp;notes=%5BWORK%20IN%20PROGRESS%5D%20Here%20is%20a%20list%20of%20commands%20that%20I%20use%20every%20day%20with%20vim%2C%20in%20no%20particular%20order.%20Out%20of%20a%20billion%20possible%20key%20combinations%2C%20I%20found%20these%20to%20be%20irreplaceable%20and%20simple%20enough%20to%20remember.%20%20%20%20%26nbsp%3B%20%20%20%20%20%20%2A%20%20search%20for%20the%20word%20under%20cursor%20%28to%20the%20end%20of%20the%20file%29%20%20%20%23%20%20search%20fo&amp;short_link=http://bit.ly/cWsBSC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Some+Useful+vim+Commands+-+My+vim+Cheatsheet&amp;link=http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/&amp;notes=%5BWORK%20IN%20PROGRESS%5D%20Here%20is%20a%20list%20of%20commands%20that%20I%20use%20every%20day%20with%20vim%2C%20in%20no%20particular%20order.%20Out%20of%20a%20billion%20possible%20key%20combinations%2C%20I%20found%20these%20to%20be%20irreplaceable%20and%20simple%20enough%20to%20remember.%20%20%20%20%26nbsp%3B%20%20%20%20%20%20%2A%20%20search%20for%20the%20word%20under%20cursor%20%28to%20the%20end%20of%20the%20file%29%20%20%20%23%20%20search%20fo&amp;short_link=http://bit.ly/cWsBSC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Some+Useful+vim+Commands+-+My+vim+Cheatsheet&amp;link=http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/&amp;notes=%5BWORK%20IN%20PROGRESS%5D%20Here%20is%20a%20list%20of%20commands%20that%20I%20use%20every%20day%20with%20vim%2C%20in%20no%20particular%20order.%20Out%20of%20a%20billion%20possible%20key%20combinations%2C%20I%20found%20these%20to%20be%20irreplaceable%20and%20simple%20enough%20to%20remember.%20%20%20%20%26nbsp%3B%20%20%20%20%20%20%2A%20%20search%20for%20the%20word%20under%20cursor%20%28to%20the%20end%20of%20the%20file%29%20%20%20%23%20%20search%20fo&amp;short_link=http://bit.ly/cWsBSC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Some+Useful+vim+Commands+-+My+vim+Cheatsheet&amp;link=http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/&amp;notes=%5BWORK%20IN%20PROGRESS%5D%20Here%20is%20a%20list%20of%20commands%20that%20I%20use%20every%20day%20with%20vim%2C%20in%20no%20particular%20order.%20Out%20of%20a%20billion%20possible%20key%20combinations%2C%20I%20found%20these%20to%20be%20irreplaceable%20and%20simple%20enough%20to%20remember.%20%20%20%20%26nbsp%3B%20%20%20%20%20%20%2A%20%20search%20for%20the%20word%20under%20cursor%20%28to%20the%20end%20of%20the%20file%29%20%20%20%23%20%20search%20fo&amp;short_link=http://bit.ly/cWsBSC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Some+Useful+vim+Commands+-+My+vim+Cheatsheet&amp;link=http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/&amp;notes=%5BWORK%20IN%20PROGRESS%5D%20Here%20is%20a%20list%20of%20commands%20that%20I%20use%20every%20day%20with%20vim%2C%20in%20no%20particular%20order.%20Out%20of%20a%20billion%20possible%20key%20combinations%2C%20I%20found%20these%20to%20be%20irreplaceable%20and%20simple%20enough%20to%20remember.%20%20%20%20%26nbsp%3B%20%20%20%20%20%20%2A%20%20search%20for%20the%20word%20under%20cursor%20%28to%20the%20end%20of%20the%20file%29%20%20%20%23%20%20search%20fo&amp;short_link=http://bit.ly/cWsBSC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Some%20Useful%20vim%20Commands%20-%20My%20vim%20Cheatsheet&amp;link=http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/&amp;notes=%5BWORK%20IN%20PROGRESS%5D%20Here%20is%20a%20list%20of%20commands%20that%20I%20use%20every%20day%20with%20vim%2C%20in%20no%20particular%20order.%20Out%20of%20a%20billion%20possible%20key%20combinations%2C%20I%20found%20these%20to%20be%20irreplaceable%20and%20simple%20enough%20to%20remember.%20%20%20%20%26nbsp%3B%20%20%20%20%20%20%2A%20%20search%20for%20the%20word%20under%20cursor%20%28to%20the%20end%20of%20the%20file%29%20%20%20%23%20%20search%20fo&amp;short_link=http://bit.ly/cWsBSC&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2008/12/22/mastering-the-linux-shell-bash-shortcuts-explained/" rel="bookmark" title="December 22, 2008">Mastering The Linux Shell &#8211; Bash Shortcuts Explained (Now With Cheat Sheets)</a></li><li><a
href="http://beerpla.net/2008/03/12/mass-renaming-directories-and-files-using-total-commander/" rel="bookmark" title="March 12, 2008">Mass Renaming Directories And Files Using Total Commander</a></li><li><a
href="http://beerpla.net/2009/11/04/android-auto-formatting-android-xml-files-with-eclipse/" rel="bookmark" title="November 4, 2009">[Android] Auto Formatting Android XML Files With Eclipse</a></li><li><a
href="http://beerpla.net/2007/08/04/watch-a-useful-linux-command-you-may-have-never-heard-of/" rel="bookmark" title="August 4, 2007">Watch &#8211; A Useful Linux Command You May Have Never Heard Of</a></li><li><a
href="http://beerpla.net/2009/05/11/mysql-deletingupdating-rows-common-to-2-tables-speed-and-slave-lag-considerations/" rel="bookmark" title="May 11, 2009">[MySQL] Deleting/Updating Rows Common To 2 Tables &#8211; Speed And Slave Lag Considerations</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2008%2F04%2F09%2Fsome-useful-vim-commands-my-vim-cheatsheet%2F&amp;title=Some%20Useful%20vim%20Commands%20%26%238211%3B%20My%20vim%20Cheatsheet" id="wpa2a_6"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2008/04/09/some-useful-vim-commands-my-vim-cheatsheet/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> </channel> </rss>
