<?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>Transcending Frontiers &#187; vi mode inside your shell</title>
	<atom:link href="http://blog.thefrontiergroup.com.au/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thefrontiergroup.com.au</link>
	<description>Your peek inside the collective mind of The Frontier Group</description>
	<lastBuildDate>Tue, 03 Jan 2012 06:53:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>vi mode inside your shell</title>
		<link>http://blog.thefrontiergroup.com.au/2009/01/vi-mode-inside-your-shell/</link>
		<comments>http://blog.thefrontiergroup.com.au/2009/01/vi-mode-inside-your-shell/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 07:28:08 +0000</pubDate>
		<dc:creator>mlambie</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://thefrontiergroup.com.au/blog/?p=269</guid>
		<description><![CDATA[For as long as I can remember I&#8217;ve used vim (or vi) as my editor of choice when on Linux or UNIX systems. I&#8217;ve also used bash as my shell, except in circumstances where it wasn&#8217;t available. We&#8217;ve been using Macs for a long time now, and one of the things that I only recently [...]]]></description>
			<content:encoded><![CDATA[<p>For as long as I can remember I&#8217;ve used <code>vim</code> (or <code>vi</code>) as my editor of choice when on Linux or UNIX systems. I&#8217;ve also used <code>bash</code> as my shell, except in circumstances where it wasn&#8217;t available. We&#8217;ve been using Macs for a long time now, and one of the things that I only recently learnt was that you can use CTRL-a to take you to the beginning of a line in a terminal. This meant I no longer leant on the left arrow key to get me back to the beginning of a long command.</p>
<p>I use <code>screen</code> to maintain remote, active connections to our various servers, and with my setup the CTRL-a trick didn&#8217;t work. I&#8217;ve just found that setting vi mode in bash will allow me to hit ESC then shift-I and take me to the beginning of a line. ESC engages vi mode, and you can navigate around the command as you would inside vi. For example, shift-I or 0 takes you to the start of the line, shift-a or $ to the end and h, l, k and j act as cursor keys.</p>
<p>You can engage vi mode by executing the following code, or adding it to your <code>~/.profile</code> (or any other dot file that is executed upon login).</p>
<pre name="code" class="shell">set -o vi</pre>
<p>I always like finding new shortcuts, even if there&#8217;s some minor annoyance at my former lack of awareness. It&#8217;s like how we discovered syntax highlighting in vim after completing our uni degrees&#8230; very bittersweet.</p>
<script src="http://feeds.feedburner.com/~s/TranscendingFrontiers?i=http://blog.thefrontiergroup.com.au/2009/01/vi-mode-inside-your-shell/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://blog.thefrontiergroup.com.au/2009/01/vi-mode-inside-your-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

