<?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/tag/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/tag/linux/feed/" />
		<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-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>
