<?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>Next Door Hacker &#187; usability</title>
	<atom:link href="http://www.nextdoorhacker.com/tag/usability/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nextdoorhacker.com</link>
	<description>I&#039;m just your friendly neighborhood hacker</description>
	<lastBuildDate>Mon, 05 Apr 2010 09:44:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to edit cygwin files using notepad++</title>
		<link>http://www.nextdoorhacker.com/2009/07/how-to-edit-cygwin-files-using-notepad/</link>
		<comments>http://www.nextdoorhacker.com/2009/07/how-to-edit-cygwin-files-using-notepad/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 17:57:26 +0000</pubDate>
		<dc:creator>Prasanna</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.nextdoorhacker.com/?p=164</guid>
		<description><![CDATA[So, I’ve been using windows on my new Netbook. This is the first time I’ve really decided to use cygwin for day to day stuff and actually trying to make it productive is quite a work. One of the things I noticed was that the regular editors like vim and emacs had a lot of [...]]]></description>
			<content:encoded><![CDATA[<p>So, I’ve been using windows on my new Netbook. This is the first time I’ve really decided to use cygwin for day to day stuff and actually trying to make it productive is quite a work. One of the things I noticed was that the regular editors like vim and emacs had a lot of trouble adapting to cygwin. For example, backspace doesn’t work for vim and Ctrl-X, Ctrl-C combination didn’t work for emacs for me (I even double checked with google to check if my fingers lost their mojo).</p>
<p>I name this file np (in true Unix fashion of naming things as shortly as possible ) and place in my ~/bin for maximum adaptability.</p>
<pre class="brush: bash;">
#!/bin/bash
# Edit your cygwin files in notepad++, the best windows editor.
# Vim and emacs don't seem to work too well in cygwin.
ROOT_DIR_WINDOWS=D:\\\\cygwin
expandToWindows() {
	y=`echo $1| sed -e 's/\//\\\\/g'`

	echo $ROOT_DIR_WINDOWS\\$y
}
expArg=`expandToWindows $1`
echo $expArg
/cygdrive/c/Program\ Files/Notepad++/notepad++.exe $expArg
 </pre>
<p>Just copy this script into your ~/bin or /usr/bin and make it executable to run as</p>
<blockquote><p>np &lt;file you want to edit&gt;</p></blockquote>
<p>So, this runs just like any other unix script. I don’t know if you can pass multiple arguments for notepad, if so feel free to extend this piece of code and give me a howler so that I can improve too.</p>
<p>Of course, you can do the same for any other windows application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nextdoorhacker.com/2009/07/how-to-edit-cygwin-files-using-notepad/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
