<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>橋本雄の技術ブログ &#187; linux</title>
	<atom:link href="http://labs.asunochikara.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.asunochikara.com</link>
	<description>橋本雄がvim、ubuntu、phpなどの技術情報をまとめています</description>
	<lastBuildDate>Fri, 14 May 2010 14:17:59 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://labs.asunochikara.com/category/linux/feed/" />
		<item>
		<title>XREAにmercurialをインストールして利用する方法</title>
		<link>http://labs.asunochikara.com/2010/01/mercurial/</link>
		<comments>http://labs.asunochikara.com/2010/01/mercurial/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 04:07:28 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[XREA]]></category>

		<guid isPermaLink="false">http://labs.asunochikara.com/?p=233</guid>
		<description><![CDATA[いろいろとやりたくなってmercurialをインストールしてみました
まずは、
http://www.selenic.com/mercurial/release/
から、最新のバージョンを確認してダウンロードします。

 [...]]]></description>
			<content:encoded><![CDATA[<p>いろいろとやりたくなってmercurialをインストールしてみました</p>
<p>まずは、</p>
<p>http://www.selenic.com/mercurial/release/</p>
<p>から、最新のバージョンを確認してダウンロードします。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.selenic.com<span style="color: #000000; font-weight: bold;">/</span>mercurial<span style="color: #000000; font-weight: bold;">/</span>release<span style="color: #000000; font-weight: bold;">/</span>mercurial-1.4.1.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvzf mercurial-1.4.1.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> mercurial-1.4.1</pre></div></div>

<p>すぐにインストールを開始したいところですが、pythonの実行環境を準備しないといけません。<br />
.bashrcに以下を記載します</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/local/bin:<span style="color: #007800;">$PATH</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TERM</span>=xterm-256color
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PYTHONPATH</span>=<span style="color: #000000; font-weight: bold;">/</span>virtual<span style="color: #000000; font-weight: bold;">/</span>ユーザーID<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>python
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">view</span>=<span style="color: #ff0000;">&quot;vim -R&quot;</span></pre></td></tr></table></div>

<p>これで実行環境が準備できました。インストール実行します</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">source</span> .bashrc
python sup.py <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">--home</span>=<span style="color: #000000; font-weight: bold;">/</span>virtual<span style="color: #000000; font-weight: bold;">/</span>ユーザーID<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span></pre></div></div>

<p>これで、完了です。<br />
続いてHTTPで公開するため、公開ディレクトリに　~/local/src/mercurial-1.4.1にできた<br />
hgwebdir.cgi<br />
をコピー、新たに<br />
hgweb.configを以下のように作成します</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
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>collections<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">;;</span> レポジトリを作ってから、ここに記載します。
<span style="color: #000000; font-weight: bold;">/</span>virtual<span style="color: #000000; font-weight: bold;">/</span>ユーザーID<span style="color: #000000; font-weight: bold;">/</span>xxxx = <span style="color: #000000; font-weight: bold;">/</span>virtual<span style="color: #000000; font-weight: bold;">/</span>ユーザーID<span style="color: #000000; font-weight: bold;">/</span>xxxx<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>web<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">style</span>=gitweb
<span style="color: #7a0874; font-weight: bold;">&#91;</span>extensions<span style="color: #7a0874; font-weight: bold;">&#93;</span>
hgext.keyword =
<span style="color: #007800;">color</span>=
<span style="color: #7a0874; font-weight: bold;">&#91;</span>keyword<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">*</span> =
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>ui<span style="color: #7a0874; font-weight: bold;">&#93;</span>
username = My Name <span style="color: #000000; font-weight: bold;">&lt;</span>email at example dot com<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>を作成します<br />
さらに、便利に使うため、.htaccessを作成</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">Options +ExecCGI
RewriteEngine on
RewriteRule ^hgwebdir.cgi - <span style="color: #7a0874; font-weight: bold;">&#91;</span>L<span style="color: #7a0874; font-weight: bold;">&#93;</span>
RewriteRule ^<span style="color: #7a0874; font-weight: bold;">&#40;</span>.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">/</span>hgwebdir.cgi<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span>
&nbsp;
AuthUserFile <span style="color: #000000; font-weight: bold;">/</span>virtual<span style="color: #000000; font-weight: bold;">/</span>ユーザーID<span style="color: #000000; font-weight: bold;">/</span>.htpasswd
AuthGroupFile <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
AuthName MembersOnly
AuthType Basic
<span style="color: #000000; font-weight: bold;">&lt;</span>limit GET POST PUT<span style="color: #000000; font-weight: bold;">&gt;</span>
require valid-user
<span style="color: #000000; font-weight: bold;">&lt;/</span>limit<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>基本認証のパスワードを.htpasswdとして、<br />
/virtual/ユーザーID/<br />
に保存します<br />
以上で、インストールと環境は完成です！</p>
<p>つづいてレポジトリを作成<br />
管理したいディレクトリにて、</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">hg init</pre></div></div>

<p>これで完成です<br />
レポジトリごとにいろいろな設定が可能です。<br />
バージョン管理から除外するファイルの設定を<br />
レポジトリの管理ディレクトリに、.hgignore　というファイルを作成します。以下はサンプル</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="ini" style="font-family:monospace;">syntax: glob
*.log
.htaccess
*/tmp/*
*/config/*</pre></td></tr></table></div>

<p>これでOKです。<br />
あとは、hgコマンドを使って操作してください。</p>
<p>続いてクライアント側の操作です<br />
クライアント側にも同様にして、mercurialのインストールが必要です。まあ、クライアントもサーバーもないのがmercurialなんですけれど。<br />
インストールが終わったら、サーバー側のレポジトリから情報を引っ張ってきます</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> hg clone http:<span style="color: #000000; font-weight: bold;">//</span>example.com<span style="color: #000000; font-weight: bold;">/</span>xxxxxx yyyy
<span style="color: #000000; font-weight: bold;">//</span> xxxxxxxには、設定したレポジトリ名が入ります
<span style="color: #000000; font-weight: bold;">//</span>yyyyには、クライアント側に作成するレポジトリ名が入ります</pre></div></div>

<p>これでOKです。<br />
あとは、hg add hg ci などとやっていけばバージョン管理完成です</p>
<p>追記<br />
mercurial本が出ていました<br />
<div class="tmkm-amazon-view">
	<p><a href="http://www.amazon.co.jp/%E5%85%A5%E9%96%80Mercurial-Linux-Windows%E5%AF%BE%E5%BF%9C-%E8%97%A4%E5%8E%9F-%E5%85%8B%E5%89%87/dp/4798021741%3FSubscriptionId%3DAKIAJ2A52NNQKO2QRHRQ%26tag%3Dfleuraison-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4798021741"><img src="http://ecx.images-amazon.com/images/I/41ZoE4KHVqL._SL160_.jpg" border="0" alt="" /></a></p>
	<p><a href="http://www.amazon.co.jp/%E5%85%A5%E9%96%80Mercurial-Linux-Windows%E5%AF%BE%E5%BF%9C-%E8%97%A4%E5%8E%9F-%E5%85%8B%E5%89%87/dp/4798021741%3FSubscriptionId%3DAKIAJ2A52NNQKO2QRHRQ%26tag%3Dfleuraison-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D4798021741">入門Mercurial Linux/Windows対応</a></p>
	<p><em>著者／訳者：</em>藤原 克則</p>
	<p><em>出版社：</em>秀和システム( 2009-01 )</p>
	<p><em>定価：</em>￥ 2,310</p>
	<p><em>Amazon価格：</em>￥ 2,310</p>
	<p>単行本 ( 307 ページ )</p>
	<p>ISBN-10 : 4798021741</p>
	<p>ISBN-13 : 9784798021744</p>
<hr class="tmkm-amazon-clear" /></div>
]]></content:encoded>
			<wfw:commentRss>http://labs.asunochikara.com/2010/01/mercurial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://labs.asunochikara.com/2010/01/mercurial/" />
	</item>
		<item>
		<title>coreserverのSSH登録を自動化するスクリプト</title>
		<link>http://labs.asunochikara.com/2009/11/coreserver%e3%81%aessh%e7%99%bb%e9%8c%b2%e3%82%92%e8%87%aa%e5%8b%95%e5%8c%96%e3%81%99%e3%82%8b%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88/</link>
		<comments>http://labs.asunochikara.com/2009/11/coreserver%e3%81%aessh%e7%99%bb%e9%8c%b2%e3%82%92%e8%87%aa%e5%8b%95%e5%8c%96%e3%81%99%e3%82%8b%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 12:47:55 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://labs.asunochikara.com/?p=193</guid>
		<description><![CDATA[coreserverのSSH登録を自動化するスクリプトを作ろうかと思っていたのですが、
まてよ、必ずだれかやっているはず。。。と思いググとすぐに出てきました。
さすがです。
http://d.hatena.ne.jp/i [...]]]></description>
			<content:encoded><![CDATA[<p>coreserverのSSH登録を自動化するスクリプトを作ろうかと思っていたのですが、<br />
まてよ、必ずだれかやっているはず。。。と思いググとすぐに出てきました。<br />
さすがです。</p>
<p>http://d.hatena.ne.jp/int128/20090113/1231850343</p>
<p>使わせてもらいました。<br />
ありがとうございます。</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.asunochikara.com/2009/11/coreserver%e3%81%aessh%e7%99%bb%e9%8c%b2%e3%82%92%e8%87%aa%e5%8b%95%e5%8c%96%e3%81%99%e3%82%8b%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://labs.asunochikara.com/2009/11/coreserver%e3%81%aessh%e7%99%bb%e9%8c%b2%e3%82%92%e8%87%aa%e5%8b%95%e5%8c%96%e3%81%99%e3%82%8b%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88/" />
	</item>
		<item>
		<title>poderosaでパスワードなしで自動ログイン</title>
		<link>http://labs.asunochikara.com/2009/02/poderosa/</link>
		<comments>http://labs.asunochikara.com/2009/02/poderosa/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 00:37:55 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[poderosa]]></category>

		<guid isPermaLink="false">http://labs.asunochikara.com/2009/02/poderosa%e3%81%a7%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e3%81%aa%e3%81%97%e3%81%a7%e8%87%aa%e5%8b%95%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3/</guid>
		<description><![CDATA[http://www.lovy-studio.com/blog/?p=31
によると、

ツール⇒詳細プリファレンスエディタから
org.poderosaprotocols.readSerializedPassword  [...]]]></description>
			<content:encoded><![CDATA[<p>http://www.lovy-studio.com/blog/?p=31</p>
<p>によると、</p>
<ol>
<li>ツール⇒詳細プリファレンスエディタから<br />
org.poderosaprotocols.readSerializedPassword をTrueにする</li>
<li> 作成したショートカットをテキストエディタで開く</li>
<li> account=　なんちゃら　の後ろに　passphrase=”XXXXXX”　という形でパスワードを記述して保存。</li>
</ol>
<p>でいける。最近うまくいかないなぁと漠然と思っていましたが、知らないだけでした。</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.asunochikara.com/2009/02/poderosa/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://labs.asunochikara.com/2009/02/poderosa/" />
	</item>
		<item>
		<title>coLinuxをインストールする</title>
		<link>http://labs.asunochikara.com/2008/07/colinux-install/</link>
		<comments>http://labs.asunochikara.com/2008/07/colinux-install/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 06:03:10 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[colinux]]></category>

		<guid isPermaLink="false">http://labs.asunochikara.com/?p=13</guid>
		<description><![CDATA[windowsで開発、linuxで運用、でもクライアントはwindowsというLAMPなシステム開発を行っている方も多くいらっしゃると思っております。
そんな方へ。
自分のPCだけで、開発、デバックが実際の環境と限りなく [...]]]></description>
			<content:encoded><![CDATA[<p>windowsで開発、linuxで運用、でもクライアントはwindowsというLAMPなシステム開発を行っている方も多くいらっしゃると思っております。<br />
そんな方へ。<br />
自分のPCだけで、開発、デバックが実際の環境と限りなく同じくできるものがあるとすれば、使ってみる価値があるのではないでしょうか？</p>
<p>さて、実際には、<br />
<a href="http://scratchpad.fc2web.com/colinux/install-0.7/">http://scratchpad.fc2web.com/colinux/install-0.7/</a><br />
を参考にインストールさせてもらっています。ここでは、それをベースに、今からやるには、こうしたら便利というものを記載してみます。<br />
<strong>その１</strong><br />
cygwinは、個人的には使わないので、colinuxをインストールするために入れるのは、面倒というか、邪魔かなと思っています。もっともそれ以外で使う目的があれば、別に問題ないかと思います。<br />
高速ダミーファイル作成ツール makedummyも不要です。今は、windowsXPとかを皆さんお使いですので。<br />
ダウンロードするのは、<br />
coLinux-0.7.3.exe<br />
Ubuntu-7.10.ext3.2GB.7z<br />
です。<br />
あとは、7z形式を解凍できる解凍ソフト（フリーであります）<br />
<strong>その２</strong><br />
swapファイルは、以下のように作成します。<br />
512Mのswapファイルの場合は<br />
C:\＞ fsutil file createnew swap.img 536870912<br />
これでOKです。<br />
<strong>その３</strong><br />
上で、swapについては展開済みなので、OKです。7z形式を解凍するには、<br />
<a href="http://www.7-zip.org/">http://www.7-zip.org/</a>から、ファイルをダウンロードして解凍できます。<br />
cygwinやmakedummy.exeは不要です。<br />
<strong>その４</strong><br />
そのままでいけます。<br />
<strong>その５</strong><br />
4つのやり方が掲載されていますが、そこに書いてあるとおり、<br />
coLinux(0.7.x)のインストール [TAP-Win32でのNAT接続]<br />
がお薦めです。<br />
安定性と設定のしやすさなど、多少の犠牲はあるけれど、自分でコーディング、テストするには十分です。<br />
ubuntuでは少しファイル名が違う部分があります。</p>
<pre code="bash">
# cd /etc/network
# editor interfaces
</pre>
<p>となります。<br />
<strong>その６</strong><br />
そのままでいけます。<br />
ただ、ubuntuでやる場合は、多少違います。ディストリビューションが違うのでそれは、仕方ありません。</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.asunochikara.com/2008/07/colinux-install/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://labs.asunochikara.com/2008/07/colinux-install/" />
	</item>
		<item>
		<title>再びvimまとめ（プラグイン）</title>
		<link>http://labs.asunochikara.com/2008/07/vim-plugins/</link>
		<comments>http://labs.asunochikara.com/2008/07/vim-plugins/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 05:49:20 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://labs.asunochikara.com/?p=11</guid>
		<description><![CDATA[vimをメインで利用する上で、便利プラグインの説明です。
しかも、これで面白いのは、windowsでもlinuxでもいけるものがほとんどだということです。

php-doc.vim
vtreeexplorer.vim
s [...]]]></description>
			<content:encoded><![CDATA[<p>vimをメインで利用する上で、便利プラグインの説明です。<br />
しかも、これで面白いのは、windowsでもlinuxでもいけるものがほとんどだということです。</p>
<ul>
<li>php-doc.vim</li>
<li>vtreeexplorer.vim</li>
<li>snippetsEmu.vim</li>
</ul>
<p>。。。説明はのちほど。</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.asunochikara.com/2008/07/vim-plugins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://labs.asunochikara.com/2008/07/vim-plugins/" />
	</item>
		<item>
		<title>再びvimまとめ（設定編）</title>
		<link>http://labs.asunochikara.com/2008/07/vim-vimrc/</link>
		<comments>http://labs.asunochikara.com/2008/07/vim-vimrc/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 05:28:19 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://labs.asunochikara.com/?p=12</guid>
		<description><![CDATA[vimも.vimrcの設定次第でかなり使いやすいものとなります。
（windows版の場合は、_vimrcを追加・編集すればOkです)
以下は私がやっている例です。
肝となる部分だけ解説です。
シンタックス表示

syn [...]]]></description>
			<content:encoded><![CDATA[<p>vimも.vimrcの設定次第でかなり使いやすいものとなります。<br />
（windows版の場合は、_vimrcを追加・編集すればOkです)<br />
以下は私がやっている例です。<br />
肝となる部分だけ解説です。</p>
<p>シンタックス表示</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">syntax enable</pre></div></div>

<p>行番号表示</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">set number</pre></div></div>

<p>タブをソフトタブで、実施する</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">set tabstop<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"><span style="">2</span> softtabstop<span style="color: #000066; font-weight:bold;">=</span><span style="">2</span> shiftwidth<span style="color: #000066; font-weight:bold;">=</span>2</span></pre></div></div>

<p>記号文字の表示がおかしくならないように</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">set ambiwidth<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">double</span></pre></div></div>

<p>バックアップファイルを作らない</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">set nobackup</pre></div></div>

<p>など、</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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
</pre></td><td class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #ff0000;">&quot; vim:set tabstop=2 enc=utf8 :
syntax enable
set modeline
set number
set tabstop=2 softtabstop=2 shiftwidth=2
set foldmethod=marker
set laststatus=2
&quot;</span> 記号文字の表示がおかしくならないように
<span style="color: #b1b100;">set</span> ambiwidth<span style="color: #66cc66;">=</span>double
filetype on
filetype indent on
filetype plugin on
colorscheme ron
<span style="color: #b1b100;">set</span> nobackup
<span style="color: #b1b100;">set</span> enc<span style="color: #66cc66;">=</span>utf-8set fileencodings<span style="color: #66cc66;">=</span>iso-<span style="color: #cc66cc;">2022</span>-jp<span style="color: #66cc66;">,</span>sjis<span style="color: #66cc66;">,</span>euc-jp<span style="color: #66cc66;">,</span>utf-<span style="color: #cc66cc;">8</span>
autocmd FileType php  <span style="color: #66cc66;">:</span><span style="color: #b1b100;">set</span> omnifunc<span style="color: #66cc66;">=</span>phpcomplete#CompletePHP
autocmd FileType html<span style="color: #66cc66;">,</span>javascript <span style="color: #66cc66;">:</span><span style="color: #b1b100;">set</span> omnifunc<span style="color: #66cc66;">=</span>javascriptcomplete#CompleteJSautocmd Filetype *
        \   <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&amp;</span>omnifunc <span style="color: #66cc66;">==</span> <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">|</span>
        \       setlocal omnifunc<span style="color: #66cc66;">=</span>syntaxcomplete#Complete <span style="color: #66cc66;">|</span>
        \   endif
<span style="color: #ff0000;">&quot;-----------------------------------------------------------------------------&quot;</span>
source ~/<span style="color: #66cc66;">.</span>vim/vtreeexplorer<span style="color: #66cc66;">.</span>vim
<span style="color: #b1b100;">let</span> g<span style="color: #66cc66;">:</span><span style="color: #555;">treeExplVertical</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span>
<span style="color: #b1b100;">let</span> g<span style="color: #66cc66;">:</span><span style="color: #555;">treeExplWinSize</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">30</span>
<span style="color: #ff0000;">&quot;
source ~/.vim/php-doc.vim
inoremap &lt;c-P&gt; &lt;esc&gt;:call PhpDocSingle()&lt;cr&gt;i
nnoremap &lt;c-P&gt; :call PhpDocSingle()&lt;cr&gt;
vnoremap &lt;c-P&gt; :call PhpDocRange()&lt;cr&gt;
source ~/.vim/php-doc.vim
inoremap &lt;c-P&gt; &lt;esc&gt;:call PhpDocSingle()&lt;cr&gt;i
nnoremap &lt;c-P&gt; :call PhpDocSingle()&lt;cr&gt;
vnoremap &lt;c-P&gt; :call PhpDocRange()&lt;cr&gt;
let g:pdv_cfg_Author   = &quot;</span>HASHIMOTO <span style="color: #66cc66;">&lt;</span>hashimoto at vone dot jp<span style="color: #66cc66;">&gt;</span><span style="color: #ff0000;">&quot;
let g:pdv_cfg_Copyright= &quot;</span>xxxxx INC<span style="color: #66cc66;">.</span>2008 All rights reservied<span style="color: #66cc66;">.</span><span style="color: #ff0000;">&quot;
&quot;</span> phpファイルの場合 下矢印で文法チェックをする
autocmd FileType php <span style="color: #66cc66;">:</span><span style="color: #555;">map</span> <span style="color: #66cc66;">&lt;</span>down<span style="color: #66cc66;">&gt;</span> <span style="color: #66cc66;">&lt;</span>esc<span style="color: #66cc66;">&gt;:!</span>clear<span style="color: #66cc66;">&lt;</span>cr<span style="color: #66cc66;">&gt;:!</span>php -<span style="color: #b1b100;">l</span> <span style="color: #66cc66;">%&lt;</span>cr<span style="color: #66cc66;">&gt;</span>
autocmd FileType php <span style="color: #66cc66;">:</span><span style="color: #555;">map</span> <span style="color: #66cc66;">&lt;</span>c-E<span style="color: #66cc66;">&gt;</span> <span style="color: #66cc66;">&lt;</span>esc<span style="color: #66cc66;">&gt;:!</span>php <span style="color: #66cc66;">%&lt;</span>cr<span style="color: #66cc66;">&gt;</span>
<span style="color: #ff0000;">&quot; phpファイルの場合 =functionと打ち込むとちょっと便利にfunctionがかける
autocmd FileType php :map! =function //{{{&lt;cr&gt;&lt;left&gt;&lt;left&gt;&lt;del&gt;&lt;del&gt;function  {&lt;cr&gt;}&lt;cr&gt;//}}}&lt;up&gt;&lt;up&gt;&lt;right&gt;&lt;right&gt;&lt;right&gt;&lt;right&gt;
&quot;</span> phpファイルの場合 <span style="color: #66cc66;">=</span>varと打ち込むとちょっと便利にvarがかける
autocmd FileType php <span style="color: #66cc66;">:</span><span style="color: #555;">map</span><span style="color: #66cc66;">!</span> <span style="color: #66cc66;">=</span>var //<span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&lt;</span>cr<span style="color: #66cc66;">&gt;&lt;</span>left<span style="color: #66cc66;">&gt;&lt;</span>left<span style="color: #66cc66;">&gt;&lt;</span>del<span style="color: #66cc66;">&gt;&lt;</span>del<span style="color: #66cc66;">&gt;</span>var <span style="color: #66cc66;">&lt;</span>cr<span style="color: #66cc66;">&gt;</span>//<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&lt;</span>up<span style="color: #66cc66;">&gt;</span>
<span style="color: #ff0000;">&quot;autocmd FileType php :set tabstop=4 softtabstop=4 shiftwidth=4
&nbsp;
map &lt;f12&gt; &lt;esc&gt;:!php /home/hashimoto/tools/ftp.php %:p 1&lt;cr&gt;
&nbsp;
map! =vimh // vim: set expandtab tabstop=2 softtabstop=2 shiftwidth=2 enc=utf8 :
map &lt;left&gt; &lt;esc&gt;:bp&lt;cr&gt;
map &lt;right&gt; &lt;esc&gt;:bn&lt;cr&gt;
map &lt;up&gt; &lt;esc&gt;:ls&lt;cr&gt;
&nbsp;
&quot;</span>
<span style="color: #b1b100;">function</span> InsertTabWrapper<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #b1b100;">if</span> pumvisible<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\&lt;</span>c-n&gt;&quot;</span>
    endif
    <span style="color: #b1b100;">let</span> col <span style="color: #66cc66;">=</span> col<span style="color: #66cc66;">&#40;</span>'<span style="color: #66cc66;">.</span>'<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;"> - </span><span style="color: #cc66cc;">1</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">!</span>col <span style="color: #66cc66;">||</span> getline<span style="color: #66cc66;">&#40;</span>'<span style="color: #66cc66;">.</span>'<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span>col<span style="color: #66cc66;"> - </span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>~ '\k\<span style="color: #66cc66;">|&lt;</span>\<span style="color: #66cc66;">|</span>/'
        <span style="color: #b1b100;">return</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\&lt;</span>tab&gt;&quot;</span>
    elseif exists<span style="color: #66cc66;">&#40;</span>'<span style="color: #66cc66;">&amp;</span>omnifunc'<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #66cc66;">&amp;</span>omnifunc <span style="color: #66cc66;">==</span> ''
        <span style="color: #b1b100;">return</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\&lt;</span>c-n&gt;&quot;</span>
    else
        <span style="color: #b1b100;">return</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\&lt;</span>c-x&gt;<span style="color: #000099; font-weight: bold;">\&lt;</span>c-o&gt;&quot;</span>
    endif
endfunction</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://labs.asunochikara.com/2008/07/vim-vimrc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://labs.asunochikara.com/2008/07/vim-vimrc/" />
	</item>
		<item>
		<title>再びvimまとめ（デフォルト機能）</title>
		<link>http://labs.asunochikara.com/2008/07/vim-default/</link>
		<comments>http://labs.asunochikara.com/2008/07/vim-default/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 02:24:26 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://labs.asunochikara.com/?p=10</guid>
		<description><![CDATA[入力モード a
入力モード（挿入）i
閲覧モードESCキー
保存：w
コピー y
ペースト p
アンドゥ u
置換 s

:5,20s/abc/def/g  //5行目から20行目のahhhhhをuhyaaaaに変換する [...]]]></description>
			<content:encoded><![CDATA[<p>入力モード <strong><em>a</em></strong><br />
入力モード（挿入）<strong><em>i</em></strong><br />
閲覧モード<strong><em>ESCキー</em></strong><br />
保存<strong><em>：w</em></strong><br />
コピー <strong><em>y</em></strong><br />
ペースト <strong><em>p</em></strong><br />
アンドゥ <strong><em>u</em></strong><br />
置換 <strong><em>s</em></strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">:<span style="color: #000000;">5</span>,20s<span style="color: #000000; font-weight: bold;">/</span>abc<span style="color: #000000; font-weight: bold;">/</span>def<span style="color: #000000; font-weight: bold;">/</span>g  <span style="color: #000000; font-weight: bold;">//</span><span style="color: #000000;">5</span>行目から<span style="color: #000000;">20</span>行目のahhhhhをuhyaaaaに変換するもの。
:s<span style="color: #000000; font-weight: bold;">/</span>abc<span style="color: #000000; font-weight: bold;">/</span>def<span style="color: #000000; font-weight: bold;">/</span>g         <span style="color: #000000; font-weight: bold;">//</span>またビジュアルモードで範囲指定をしている場合は、
:<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #000000; font-weight: bold;">/</span>abc<span style="color: #000000; font-weight: bold;">/</span>def<span style="color: #000000; font-weight: bold;">/</span>g      <span style="color: #000000; font-weight: bold;">//</span>ファイル全体でやるなら
:<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #000000; font-weight: bold;">/</span>^M<span style="color: #000000; font-weight: bold;">//</span>g <span style="color: #7a0874; font-weight: bold;">&#40;</span>^MはCTRL+V、CTRL+M<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">//</span>CR+LFの改行コードの一括</pre></div></div>

<p>※C オプション（confirm確認しながら、置換するかどうかを選択できる）<br />
改行をなくして連結する(各行末に空白あり）　<strong><em>shift</em></strong> <strong>+</strong> <strong><em>j</em></strong><br />
改行をなくして連結する(各行末に空白なし） <strong><em>g</em></strong>  <strong><em>shift</em></strong> <strong>+</strong> <strong><em>j</em></strong><br />
コメントアウト（※繰り返すと消えます！ので、注意が必要です）<strong><em>\x</em></strong><br />
コメントアウト（確実）　<strong><em>CTRL</em></strong>+<strong><em>V</em></strong>で矩形選択後<em><strong>SHIFT</strong></em>+<strong><em>i</em></strong> <strong>//</strong> + <strong><em>ESC</em></strong><br />
これで、ちょっとだけ待つと、矩形全体にコメントが入ります。<br />
マクロ（記録開始）<em><strong>:qa</strong></em>　aは任意のアルファベット<br />
マクロ（記録終了）<em><strong>:q</strong></em><br />
マクロ（実行）<em><strong>:@a</strong></em> aは記録したマクロのキー<br />
畳み込み　<em><strong>set fdm=marker</strong></em><br />
&nbsp;開く. 大文字だと中も再起的に. <em><strong>zo, zO </strong></em><br />
&nbsp;たたむ. 大文字だと外まで再起的に.# zc, zC &#8211; close, </strong></em><br />
&nbsp;foldの作成.<em><strong>zf</strong></em><br />
&nbsp;全部開く.<em><strong>zR</strong></em><br />
&nbsp;全体的に１段開く(foldlevel+=1). <em><strong>zr</strong></em><br />
&nbsp;全体的に１段閉じる(foldlevel-=1).<em><strong>zm</strong></em><br />
&nbsp;全部閉じる(foldlevel=0). <em><strong>zM</strong></em><br />
php的な畳み込み <em><strong>let php_folding=1</strong></em>あんまりお薦めではありません<br />
インデント <strong><em>&gt;</em></strong>とか、<strong><em>&lt;</em></strong><br />
コピペ対策自動インデント <strong><em>=</em></strong><br />
そもそもインデントが崩れないようにコピペする<strong><em>:a</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://labs.asunochikara.com/2008/07/vim-default/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://labs.asunochikara.com/2008/07/vim-default/" />
	</item>
	</channel>
</rss>
