<?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>Sexy Sexy Penguins &#187; vim</title>
	<atom:link href="http://sexysexypenguins.com/tag/vim/feed/" rel="self" type="application/rss+xml" />
	<link>http://sexysexypenguins.com</link>
	<description>I love the smell of &#34;Free Software&#34; in the morning</description>
	<lastBuildDate>Sat, 19 May 2012 20:27:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Editing command line with $EDITOR</title>
		<link>http://sexysexypenguins.com/2010/08/06/editing-command-line-with-editor/</link>
		<comments>http://sexysexypenguins.com/2010/08/06/editing-command-line-with-editor/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 20:17:02 +0000</pubDate>
		<dc:creator>herlo</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://sexysexypenguins.com/?p=742</guid>
		<description><![CDATA[Recently, I&#8217;ve been working on a huge command line that I wanted to edit over and over.  However, the problem was that I didn&#8217;t want to use the prompt to edit the command.  It took me a while to realize &#8230; <a href="http://sexysexypenguins.com/2010/08/06/editing-command-line-with-editor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve been working on a huge command line that I wanted to edit over and over.  However, the problem was that I didn&#8217;t want to use the prompt to edit the command.  It took me a while to realize what I wanted, but finally, I realized that <strong>most</strong>﻿ of the Emacs bindings are very useful in bash, so I went to work.</p>
<p>I use VIM for all of my editing when I can.  I don&#8217;t much care for Emacs, but since bash uses the bindings, it&#8217;s good to know a few of the commands.  Like Ctrl+k, Ctrl+u, Ctrl+e, Ctrl+a (try them out with text on the bash command if you don&#8217;t know what they do&#8230;).  The thing is, the default editor in many of my CentOS systems at work is Emacs.  I clearly didn&#8217;t want that, so I had to change two variables in my ~/.bashrc file.  It now looks better:</p>
<p><code>$ cat ~/.bashrc<br />
.. snip ..<br />
EDITOR=/usr/bin/vim<br />
VISUAL=/usr/bin/vim<br />
export EDITOR VISUAL<br />
.. snip ..</code></p>
<p>After setting these variables up, it&#8217;s very easy to edit the command line with vim.  First, source the ~/.bashrc file.</p>
<p><code>$ source ~/.bashrc</code></p>
<p>Then bring up the command to edit:</p>
<p><code>$ yum remove -y NetworkManager.i?86 NetworkManager-glib.i?86 alsa-lib.i?86 apr.i?86 aspell.i?86 audit-libs.i?86 coolkey.i?86 cracklib.i?86 cryptsetup-luks.i?86 cyrus-sasl-lib.i?86 cyrus-sasl-plain.i?86 db4.i?86 dbus-glib.i?86 dbus-libs.i?86 device-mapper.i?86 e2fsprogs-libs.i?86 ecryptfs-utils.i?86 expat.i?86 fipscheck.i?86 freetype.i?86 giflib.i?86 glib2.i?86 gpm.i?86 hal.i?86 java-1.6.0-openjdk.i?86 keyutils-libs.i?86 krb5-libs.i?86 libICE.i?86 libSM.i?86 libX11.i?86 libXau.i?86 libXdmcp.i?86 libXext.i?86 libXi.i?86 libXt.i?86 libXtst.i?86 libXxf86vm.i?86 libaio.i?86 libcap.i?86 libdaemon.i?86 libdrm.i?86 libgcc.i?86 libgcrypt.i?86 libgpg-error.i?86 libhugetlbfs.i?86 libjpeg.i?86 libpng.i?86 libselinux.i?86 libsepol.i?86 libstdc++.i?86 libtermcap.i?86 libusb.i?86 libutempter.i?86 libvolume_id.i?86 mesa-libGL.i?86 mkinitrd.i?86 ncurses.i?86 neon.i?86 nspr.i?86 nss.i?86 nss_db.i?86 nss_ldap.i?86 numactl.i?86 openldap.i?86 openssl.i?86 openssl-devel.i?86 pam.i?86 pam_ccreds.i?86 pam_krb5.i?86 pam_passwdqc.i?86 pam_pkcs11.i?86 pam_smb.i?86 parted.i?86 readline.i?86 redhat-lsb.i?86 sqlite.i?86 tcp_wrappers.i?86 wireless-tools.i?86 zlib.i?86</code></p>
<p>As can be seen, this is pretty long and cumbersome.  It&#8217;d be nice to be able to edit the line without having to use bash, plus, if I accidentally mistype and hit &#8216;Enter&#8217;, it could be executed before the command is ready.  To edit the command, hit the following:</p>
<p><code>Ctrl+x, Ctrl+e</code></p>
<p>The command will then be opened in your $EDITOR (probably /usr/bin/vim if you followed the instructions above).  Edit away, when you save and quit (:wq in VIM), the command will be executed.  If you don&#8217;t want to execute the command after all, just quit without saving (:q in VIM).</p>
<p>Enjoy,</p>
<p>Herlo</p>
]]></content:encoded>
			<wfw:commentRss>http://sexysexypenguins.com/2010/08/06/editing-command-line-with-editor/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SLLUG Daytime: Vim 101 and Beyond</title>
		<link>http://sexysexypenguins.com/2010/02/02/sllug-daytime-vim-101-and-beyond/</link>
		<comments>http://sexysexypenguins.com/2010/02/02/sllug-daytime-vim-101-and-beyond/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 18:23:27 +0000</pubDate>
		<dc:creator>herlo</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[LUGs]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[daytime]]></category>
		<category><![CDATA[february]]></category>
		<category><![CDATA[sllug]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://sexysexypenguins.com/?p=657</guid>
		<description><![CDATA[Well, it&#8217;s that time of month again, time to come to BetaLoftSLC, eat some lunch (brown bagging is encouraged) and listen to a good technical talk.  This month, we have Mr. Adam Barrett, a Senior Software Developer at SOS Staffing &#8230; <a href="http://sexysexypenguins.com/2010/02/02/sllug-daytime-vim-101-and-beyond/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s that time of month again, time to come to BetaLoftSLC, eat some lunch (brown bagging is encouraged) and listen to a good technical talk.  This month, we have Mr. Adam Barrett, a Senior Software Developer at SOS Staffing in Salt Lake City, who will be taking some time to talk with us about Vim.  Here is a little snippet from Adam:</p>
<h2>Vim 101 and Beyond</h2>
<p>Vim is the editor of choice for many developers and power users. It&#8217;s a &#8220;modal&#8221; text editor based on the vi editor written by Bill Joy in the 1970s for a version of UNIX. It inherits the key bindings of vi, but also adds a great deal of functionality and extensibility that are missing from the original vi. This session will cover the beginnings (101) and the first set of intermediate (201) modes and commands for vim.</p>
<p>If you would like to join us, just head on down via train, car (parking is free on the street for two hours just east and west of BetaLoftSLC), walk or bike to:</p>
<h4>WHEN</h4>
<p>Wednesday, February 10, 2010<br />
11:30am-1:00pm</p>
<h4>WHERE</h4>
<address>BetaLoft SLC</address>
<address>357 W 200 S #201</address>
<address>Salt Lake City, Utah</address>
<address><a href="http://snipr.com/betaloft-slc-map">Map</a></address>
<p>Come learn some tips and tricks about Vim.  We hope to see you all there.</p>
<p>Cheers,</p>
<p>Clint</p>
]]></content:encoded>
			<wfw:commentRss>http://sexysexypenguins.com/2010/02/02/sllug-daytime-vim-101-and-beyond/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

