<?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>PHPプログラマのバリ・ポジ情報ブログ &#187; vim</title>
	<atom:link href="http://blog.veryposi.info/tag/vim/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.veryposi.info</link>
	<description>PHP,JavaScriptやサーバーの設定などのプログラミングに関する情報をバリ・ポジティブに発信しているプログラマのブログ、『バリ・ポジ』</description>
	<lastBuildDate>Thu, 10 May 2012 06:23:01 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>PHPを書くときに、vimでctagsを使用する方法</title>
		<link>http://blog.veryposi.info/programing/php/php-ctags-vim/</link>
		<comments>http://blog.veryposi.info/programing/php/php-ctags-vim/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 11:59:22 +0000</pubDate>
		<dc:creator>gensan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ctags]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.veryposi.info/?p=1229</guid>
		<description><![CDATA[symfonyで仕事していて、オブジェクト指向プログラミングなのでたくさんのファイルに処理が移動するので 処理を追いかけるだけでたいへん ということで、ctagsを使用することにしました。 まずは、インストール 1 su [...]]]></description>
			<content:encoded><![CDATA[<p>symfonyで仕事していて、オブジェクト指向プログラミングなのでたくさんのファイルに処理が移動するので</p>
<p>処理を追いかけるだけでたいへん<img src="http://blog.veryposi.info/wp-content/plugins/fckeditor-for-wordpress-plugin/smiles/typepad/down.gif" alt="" /></p>
<p>ということで、ctagsを使用することにしました。</p>
<p>まずは、インストール</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="bash"><span style="color: rgb(194, 12, 185); font-weight: bold;">sudo</span> apt-get <span style="color: rgb(194, 12, 185); font-weight: bold;">install</span> exuberant-ctags</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>これでインストール完了します。</p>
<p>で、ctagsを使用する為のtagsファイルの作成</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="bash">
ctags -a -f ~/.tags -R --<span style="color: rgb(0, 120, 0);">langmap=</span>PHP:.php.inc --php-<span style="color: rgb(0, 120, 0);">types=</span>c+f+d+v+i ./</pre>
</td>
</tr>
</tbody>
</table>
</div>
<ul>
<li>-a：既存のtagsファイルが存在した場合、追加登録します。</li>
<li>-f：tagsファイルの名前を指定します。</li>
<li>&#8211;langmap：対象にする拡張子を設定します。<br />
    デフォルト値は</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="div">
ctags --list-maps</pre>
</td>
</tr>
</tbody>
</table></div>
<p>    で調べることができます。</li>
<li>&#8211;php-types：tagsファイルを作成する時の種類を指定します。<br />
    種類は</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="div">
ctags --list-kinds=php</pre>
</td>
</tr>
</tbody>
</table></div>
<p>    で調べることができます。</li>
<li>-R：再帰的に処理を行います。</li>
</ul>
<p>これで、tagsファイルを使用できます。</p>
<p>上記内容でtagsファイルを作成した場合、「~/.tags」に内容が書き込まれます。</p>
<p>ですのでvimでそのファイルを使用できるように.vimrcに以下の設定を追加します。</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="div">
set tags+=~/.tags</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>&nbsp;これでvimで作成したtagsファイルを読み込むことができます。</p>
<h3>vimでの使用方法</h3>
<p>Ctrl＋]：タグを進む</p>
<p>Ctrl＋T：タグを戻る</p>
<p>:pop：タグを戻る</p>
<p>:tags：移動経路を確認</p>
<p>:ts：他の候補を呼び出す</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.veryposi.info/programing/php/php-ctags-vim/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntuでvimのsyntaxが効かない場合の解決方法！！</title>
		<link>http://blog.veryposi.info/server/server-setup/ubuntu-vim-syntax/</link>
		<comments>http://blog.veryposi.info/server/server-setup/ubuntu-vim-syntax/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 09:13:32 +0000</pubDate>
		<dc:creator>gensan</dc:creator>
				<category><![CDATA[設定]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.veryposi.info/?p=962</guid>
		<description><![CDATA[ずんwikiさんから.vimrcを拝借して.vimrcを設定して使っていたのですがどうも、vimのsyntaxがきいていない どうも、Ubuntuをデフォルトでインストールした時にインストールされるvimのせいみたいとい [...]]]></description>
			<content:encoded><![CDATA[<p>ずんwikiさんから.vimrcを拝借して.vimrcを設定して使っていたのですがどうも、vimのsyntaxがきいていない<img src="http://blog.veryposi.info/wp-content/plugins/fckeditor-for-wordpress-plugin/smiles/typepad/sweat01.gif" alt="" /></p>
<p>どうも、Ubuntuをデフォルトでインストールした時にインストールされるvimのせいみたいということで</p>
<p>vimをインストール</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="bash"><span style="color: rgb(194, 12, 185); font-weight: bold;">sudo</span> apt-get <span style="color: rgb(194, 12, 185); font-weight: bold;">install</span> vim</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>するとsyntaxがちゃんと動作しました<img src="http://blog.veryposi.info/wp-content/plugins/fckeditor-for-wordpress-plugin/smiles/typepad/happy01.gif" alt="" /><img src="http://blog.veryposi.info/wp-content/plugins/fckeditor-for-wordpress-plugin/smiles/typepad/scissors.gif" alt="" /></p>
<p><a href="http://blog.veryposi.info/wp-content/uploads/2009/03/vimrc.png" rel="lightbox[962]"><img height="300" width="224" class="aligncenter size-medium wp-image-963" title="vimのsyntax" alt="vimのsyntax" src="http://blog.veryposi.info/wp-content/uploads/2009/03/vimrc-224x300.png" /></a></p>
<p>よかった。</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.veryposi.info/server/server-setup/ubuntu-vim-syntax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.vimrcの設定</title>
		<link>http://blog.veryposi.info/server/server-setup/vimrc/</link>
		<comments>http://blog.veryposi.info/server/server-setup/vimrc/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 08:25:38 +0000</pubDate>
		<dc:creator>gensan</dc:creator>
				<category><![CDATA[設定]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.veryposi.info/?p=960</guid>
		<description><![CDATA[Ubuntuを使っていてそろそろ、.vimrcもちゃんとしないとと思いいつもお世話になっているサイトずんwikiさんからvimrcを拝借しました いつもここの設定をいじくって使っています。 .vimrcの設定で困っている [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntuを使っていてそろそろ、.vimrcもちゃんとしないとと思いいつもお世話になっているサイト<a href="http://www.kawaz.jp/pukiwiki/?vim">ずんwiki</a>さんからvimrcを拝借しました<img alt="" src="http://blog.veryposi.info/wp-content/plugins/fckeditor-for-wordpress-plugin/smiles/typepad/coldsweats01.gif" /></p>
<p>いつもここの設定をいじくって使っています。</p>
<p>.vimrcの設定で困っている方がいたらここのサイトの設定を参考にしたら<img alt="" src="http://blog.veryposi.info/wp-content/plugins/fckeditor-for-wordpress-plugin/smiles/typepad/ok.gif" />だと思います。</p>
<p>&nbsp;</p>
<p>一応、自分が使ってる内容です。</p>
<div class="syntax">
<table>
<tbody>
<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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
</pre>
</td>
<td class="code">
<pre class="bash"><span style="color: rgb(255, 0, 0);">&quot; vim: set ts=4 sw=4 sts=0:
&quot;</span>-----------------------------------------------------------------------------
<span style="color: rgb(255, 0, 0);">&quot; 文字コード関連
&quot;</span>
<span style="color: rgb(0, 0, 0); font-weight: bold;">if</span> &amp;encoding !=<span style="color: rgb(128, 128, 128); font-style: italic;"># </span><span style="color: rgb(255, 0, 0);">'utf-8'</span>
	<span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> <span style="color: rgb(0, 120, 0);">encoding=</span>japan
	<span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> <span style="color: rgb(0, 120, 0);">fileencoding=</span>japan
endif
<span style="color: rgb(0, 0, 0); font-weight: bold;">if</span> has<span style="color: rgb(122, 8, 116); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">'iconv'</span><span style="color: rgb(122, 8, 116); font-weight: bold;">)</span>
	<span style="color: rgb(122, 8, 116); font-weight: bold;">let</span> s:enc_euc = <span style="color: rgb(255, 0, 0);">'euc-jp'</span>
	<span style="color: rgb(122, 8, 116); font-weight: bold;">let</span> s:enc_jis = <span style="color: rgb(255, 0, 0);">'iso-2022-jp'</span>
	<span style="color: rgb(255, 0, 0);">&quot; iconvがeucJP-msに対応しているかをチェック
	if iconv(&quot;</span>\x87\x64\x87\x6a<span style="color: rgb(255, 0, 0);">&quot;, 'cp932', 'eucjp-ms') ==# &quot;</span>\xad\xc5\xad\xcb<span style="color: rgb(255, 0, 0);">&quot;
		let s:enc_euc = 'eucjp-ms'
		let s:enc_jis = 'iso-2022-jp-3'
	&quot;</span> iconvがJISX0213に対応しているかをチェック
	elseif iconv<span style="color: rgb(122, 8, 116); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&quot;<span style="color: rgb(0, 0, 153); font-weight: bold;">\x</span>87<span style="color: rgb(0, 0, 153); font-weight: bold;">\x</span>64<span style="color: rgb(0, 0, 153); font-weight: bold;">\x</span>87<span style="color: rgb(0, 0, 153); font-weight: bold;">\x</span>6a&quot;</span>, <span style="color: rgb(255, 0, 0);">'cp932'</span>, <span style="color: rgb(255, 0, 0);">'euc-jisx0213'</span><span style="color: rgb(122, 8, 116); font-weight: bold;">)</span> ==<span style="color: rgb(128, 128, 128); font-style: italic;"># </span><span style="color: rgb(255, 0, 0);">&quot;<span style="color: rgb(0, 0, 153); font-weight: bold;">\x</span>ad<span style="color: rgb(0, 0, 153); font-weight: bold;">\x</span>c5<span style="color: rgb(0, 0, 153); font-weight: bold;">\x</span>ad<span style="color: rgb(0, 0, 153); font-weight: bold;">\x</span>cb&quot;</span>
		<span style="color: rgb(122, 8, 116); font-weight: bold;">let</span> s:enc_euc = <span style="color: rgb(255, 0, 0);">'euc-jisx0213'</span>
		<span style="color: rgb(122, 8, 116); font-weight: bold;">let</span> s:enc_jis = <span style="color: rgb(255, 0, 0);">'iso-2022-jp-3'</span>
	endif
	<span style="color: rgb(255, 0, 0);">&quot; fileencodingsを構築
	if &amp;encoding ==# 'utf-8'
		let s:fileencodings_default = &amp;fileencodings
		let &amp;fileencodings = s:enc_jis .','. s:enc_euc .',cp932'
		let &amp;fileencodings = &amp;fileencodings .','. s:fileencodings_default
		unlet s:fileencodings_default
	else
		let &amp;fileencodings = &amp;fileencodings .','. s:enc_jis
		set fileencodings+=utf-8,ucs-2le,ucs-2
		if &amp;encoding =~# '^<span style="color: rgb(0, 0, 153); font-weight: bold;">\(</span>euc-jp<span style="color: rgb(0, 0, 153); font-weight: bold;">\|</span>euc-jisx0213<span style="color: rgb(0, 0, 153); font-weight: bold;">\|</span>eucjp-ms<span style="color: rgb(0, 0, 153); font-weight: bold;">\)</span>$'
			set fileencodings+=cp932
			set fileencodings-=euc-jp
			set fileencodings-=euc-jisx0213
			set fileencodings-=eucjp-ms
			let &amp;encoding = s:enc_euc
			let &amp;fileencoding = s:enc_euc
		else
			let &amp;fileencodings = &amp;fileencodings .','. s:enc_euc
		endif
	endif
	&quot;</span> 定数を処分
	unlet s:enc_euc
	unlet s:enc_jis
endif
<span style="color: rgb(255, 0, 0);">&quot; 日本語を含まない場合は fileencoding に encoding を使うようにする
if has('autocmd')
	function! AU_ReCheck_FENC()
		if &amp;fileencoding =~# 'iso-2022-jp' &amp;&amp; search(&quot;</span><span style="color: rgb(122, 8, 116); font-weight: bold;">[</span>^\x01-\x7e<span style="color: rgb(122, 8, 116); font-weight: bold;">]</span><span style="color: rgb(255, 0, 0);">&quot;, 'n') == 0
			let &amp;fileencoding=&amp;encoding
		endif
	endfunction
	autocmd BufReadPost * call AU_ReCheck_FENC()
endif
&quot;</span> 改行コードの自動認識
<span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> <span style="color: rgb(0, 120, 0);">fileformats=</span>unix,dos,mac
<span style="color: rgb(255, 0, 0);">&quot; □とか○の文字があってもカーソル位置がずれないようにする
if exists('&amp;ambiwidth')
	set ambiwidth=double
endif
&nbsp;
&quot;</span>-----------------------------------------------------------------------------
<span style="color: rgb(255, 0, 0);">&quot; 編集関連
&quot;</span>
<span style="color: rgb(255, 0, 0);">&quot;オートインデントする
set autoindent
&quot;</span>バイナリ編集<span style="color: rgb(122, 8, 116); font-weight: bold;">(</span>xxd<span style="color: rgb(122, 8, 116); font-weight: bold;">)</span>モード（vim -b での起動、もしくは *.bin で発動します）
<span style="color: rgb(255, 0, 0);">&quot;augroup BinaryXXD
&quot;</span>	autocmd!
<span style="color: rgb(255, 0, 0);">&quot;	autocmd BufReadPre  *.bin let &amp;binary =1
&quot;</span>	autocmd BufReadPost * <span style="color: rgb(0, 0, 0); font-weight: bold;">if</span> &amp;binary | silent %!xxd -g <span style="color: rgb(0, 0, 0);">1</span>
<span style="color: rgb(255, 0, 0);">&quot;	autocmd BufReadPost * set ft=xxd | endif
&quot;</span>	autocmd BufWritePre * <span style="color: rgb(0, 0, 0); font-weight: bold;">if</span> &amp;binary | %!xxd -r | endif
<span style="color: rgb(255, 0, 0);">&quot;	autocmd BufWritePost * if &amp;binary | silent %!xxd -g 1
&quot;</span>	autocmd BufWritePost * <span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> nomod | endif
<span style="color: rgb(255, 0, 0);">&quot;augroup END
&nbsp;
&quot;</span>-----------------------------------------------------------------------------
<span style="color: rgb(255, 0, 0);">&quot; 検索関連
&quot;</span>
<span style="color: rgb(255, 0, 0);">&quot;検索文字列が小文字の場合は大文字小文字を区別なく検索する
set ignorecase
&quot;</span>検索文字列に大文字が含まれている場合は区別して検索する
<span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> smartcase
<span style="color: rgb(255, 0, 0);">&quot;検索時に最後まで行ったら最初に戻る
set wrapscan
&quot;</span>検索文字列入力時に順次対象文字列にヒットさせない
<span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> noincsearch
&nbsp;
<span style="color: rgb(255, 0, 0);">&quot;-----------------------------------------------------------------------------
&quot;</span> 装飾関連
<span style="color: rgb(255, 0, 0);">&quot;
&quot;</span>シンタックスハイライトを有効にする
<span style="color: rgb(0, 0, 0); font-weight: bold;">if</span> has<span style="color: rgb(122, 8, 116); font-weight: bold;">(</span><span style="color: rgb(255, 0, 0);">&quot;syntax&quot;</span><span style="color: rgb(122, 8, 116); font-weight: bold;">)</span>
	syntax on
endif
<span style="color: rgb(255, 0, 0);">&quot;行番号を表示しない
set number
&quot;</span>タブの左側にカーソル表示
<span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> <span style="color: rgb(0, 120, 0);">listchars=</span>tab:\ \
<span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> list
<span style="color: rgb(255, 0, 0);">&quot;タブ幅を設定する
set tabstop=4
set shiftwidth=4
&quot;</span>入力中のコマンドをステータスに表示する
<span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> showcmd
<span style="color: rgb(255, 0, 0);">&quot;括弧入力時の対応する括弧を表示
set showmatch
&quot;</span>検索結果文字列のハイライトを有効にする
<span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> hlsearch
<span style="color: rgb(255, 0, 0);">&quot;ステータスラインを常に表示
set laststatus=2
&quot;</span>ステータスラインに文字コードと改行文字を表示する
<span style="color: rgb(0, 0, 0); font-weight: bold;">set</span> <span style="color: rgb(0, 120, 0);">statusline=</span>%&lt;%f\ %m%r%h%w%<span style="color: rgb(122, 8, 116); font-weight: bold;">{</span><span style="color: rgb(255, 0, 0);">'['</span>.<span style="color: rgb(122, 8, 116); font-weight: bold;">(</span>&amp;fenc!=<span style="color: rgb(255, 0, 0);">''</span>?&amp;fenc:&amp;enc<span style="color: rgb(122, 8, 116); font-weight: bold;">)</span>.<span style="color: rgb(255, 0, 0);">']['</span>.&amp;ff.<span style="color: rgb(255, 0, 0);">']'</span><span style="color: rgb(122, 8, 116); font-weight: bold;">}</span>%=%l,%c%V%8P
&nbsp;
&nbsp;
<span style="color: rgb(255, 0, 0);">&quot;-----------------------------------------------------------------------------
&quot;</span> マップ定義
<span style="color: rgb(255, 0, 0);">&quot;
&quot;</span>バッファ移動用キーマップ
<span style="color: rgb(255, 0, 0);">&quot; F2: 前のバッファ
&quot;</span> F3: 次のバッファ
<span style="color: rgb(255, 0, 0);">&quot; F4: バッファ削除
map &lt;F2&gt; &lt;ESC&gt;:bp&lt;CR&gt;
map &lt;F3&gt; &lt;ESC&gt;:bn&lt;CR&gt;
map &lt;F4&gt; &lt;ESC&gt;:bw&lt;CR&gt;
&quot;</span>表示行単位で行移動する
nnoremap j gj
nnoremap k gk
<span style="color: rgb(255, 0, 0);">&quot;フレームサイズを怠惰に変更する
map &lt;kPlus&gt; &lt;C-W&gt;+
map &lt;kMinus&gt; &lt;C-W&gt;-</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.veryposi.info/server/server-setup/vimrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: blog.veryposi.info @ 2026-04-17 00:37:12 -->