<?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>暖暖的梦 &#187; vim</title>
	<atom:link href="http://wqos.net/tag/vim/feed/" rel="self" type="application/rss+xml" />
	<link>http://wqos.net</link>
	<description>梦中我微笑着 梦着我的记忆</description>
	<lastBuildDate>Mon, 23 Jan 2012 09:12:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>hello world</title>
		<link>http://wqos.net/2010/07/hello-world-2/</link>
		<comments>http://wqos.net/2010/07/hello-world-2/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 12:02:45 +0000</pubDate>
		<dc:creator>婉秋</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://wqos.net/?p=615</guid>
		<description><![CDATA[用GTK+写出的第一个“hello world”，纪念下 居然区别大小写……哎，很不方便，因为要切换大小写。]]></description>
			<content:encoded><![CDATA[<p>用GTK+写出的第一个“hello world”，纪念下 <img src='http://wqos.net/wp-includes/images/smilies/icon_neutral.gif' alt=':neutral:' class='wp-smiley' /> </p>
<p>居然区别大小写……哎，很不方便，因为要切换大小写。</p>
<p style="text-align: center;"><a href="http://lugphg.blu.livefilestore.com/y1pcGythy8E5nOpMZTOUB3I4NOwcN90vea_RBp7--lmG77a2bIMDxqPJnlTeuAH9XI7AA48YDUvJOtZZUywz7_-wPFGDqxh4-Tw/gtk_helloworld.png" rel="shadowbox[sbpost-615];player=img;" target="_blank"><img class="aligncenter" src="http://lugphg.blu.livefilestore.com/y1pcGythy8E5nOpMZTOUB3I4NOwcN90vea_RBp7--lmG77a2bIMDxqPJnlTeuAH9XI7AA48YDUvJOtZZUywz7_-wPFGDqxh4-Tw/gtk_helloworld.png" alt="" width="1152" height="720" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://wqos.net/2010/07/hello-world-2/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>.vimrc</title>
		<link>http://wqos.net/2010/06/my-vimrc/</link>
		<comments>http://wqos.net/2010/06/my-vimrc/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 16:04:27 +0000</pubDate>
		<dc:creator>婉秋</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://wqos.net/?p=565</guid>
		<description><![CDATA[为了C语言而设置，我的.vimrc文件内容（vim版本7.2.330，在ubuntu10.04下安装的） 我也是个初学者，不想照搬网络上已有的配置文件，因此先从最简单的开始吧，离好用还有很大差距。 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 &#34;显示行号 set [...]]]></description>
			<content:encoded><![CDATA[<p>为了C语言而设置，我的.vimrc文件内容（vim版本7.2.330，在ubuntu10.04下安装的）</p>
<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
</pre></td><td class="code"><pre class="vim" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;">&quot;显示行号</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">nu</span><span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; C的编译和运行，按F5</span>
<span style="color: #804040;">map</span> <span style="color: #668080;">&lt;F5&gt;</span> <span style="color: #000000;">:</span><span style="color: #804040;">call</span> CompileRunGcc<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #804040;">func</span><span style="color: #000000;">!</span> CompileRunGcc<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #804040;">exec</span> <span style="color: #C5A22D;">&quot;w&quot;</span>
<span style="color: #804040;">exec</span> <span style="color: #C5A22D;">&quot;!gcc -Wall -g % -o %&amp;lt;&quot;</span>
<span style="color: #804040;">exec</span> <span style="color: #C5A22D;">&quot;! ./%&amp;lt;&quot;</span>
endfunc<span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; C++的编译和运行，按F6</span>
<span style="color: #804040;">map</span> <span style="color: #668080;">&lt;F6&gt;</span> <span style="color: #000000;">:</span><span style="color: #804040;">call</span> CompileRunGpp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #804040;">func</span><span style="color: #000000;">!</span> CompileRunGpp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #804040;">exec</span> <span style="color: #C5A22D;">&quot;w&quot;</span>
<span style="color: #804040;">exec</span> <span style="color: #C5A22D;">&quot;!g++ -Wall -g % -o %&amp;lt;&quot;</span>
<span style="color: #804040;">exec</span> <span style="color: #C5A22D;">&quot;! ./%&amp;lt;&quot;</span>
endfunc<span style="color: #adadad; font-style: italic;">
&nbsp;
&quot;自动缩进相关</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">autoindent</span>
<span style="color: #804040;">set</span> <span style="color: #25BB4D;">cindent</span><span style="color: #adadad; font-style: italic;">
&nbsp;
&quot;配色</span>
<span style="color: #804040;">colorscheme</span> desert<span style="color: #adadad; font-style: italic;">
&nbsp;
&quot;自动括号补全不一定特别方便，但至少不会把括号忘记了</span>
<span style="color: #000000;">:</span>inoremap <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>i
<span style="color: #000000;">:</span>inoremap <span style="color: #000000;">&#41;</span> =ClosePair<span style="color: #000000;">&#40;</span><span style="color: #C5A22D;">')'</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">:</span>inoremap <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>i
<span style="color: #000000;">:</span>inoremap <span style="color: #000000;">&#125;</span> =ClosePair<span style="color: #000000;">&#40;</span><span style="color: #C5A22D;">'}'</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">:</span>inoremap <span style="color: #000000;">&#91;</span> <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span>i
<span style="color: #000000;">:</span>inoremap <span style="color: #000000;">&#93;</span> =ClosePair<span style="color: #000000;">&#40;</span><span style="color: #C5A22D;">']'</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">:</span>inoremap <span style="color: #000000;">&amp;</span>lt; <span style="color: #000000;">&amp;</span>lt;<span style="color: #000000;">&amp;</span>gt;i
<span style="color: #000000;">:</span>inoremap <span style="color: #000000;">&amp;</span>gt; =ClosePair<span style="color: #000000;">&#40;</span><span style="color: #C5A22D;">'&amp;gt;'</span><span style="color: #000000;">&#41;</span>
<span style="color: #804040;">function</span> ClosePair<span style="color: #000000;">&#40;</span>char<span style="color: #000000;">&#41;</span>
<span style="color: #804040;">if</span> <span style="color: #25BB4D;">getline</span><span style="color: #000000;">&#40;</span><span style="color: #C5A22D;">'.'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span><span style="color: #25BB4D;">col</span><span style="color: #000000;">&#40;</span><span style="color: #C5A22D;">'.'</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">-</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#93;</span> == a<span style="color: #000000;">:</span>char
<span style="color: #804040;">return</span> <span style="color: #C5A22D;">&quot;<span style="">\&quot;</span>
else
return a:char
endif
endf
&nbsp;
&quot;</span>Taglist插件和winmanager的设置（需要下载安装这两个插件），按F4显示winmanager<span style="color: #adadad; font-style: italic;">
&quot;据说Taglist需要安装ctags（总之我装了，没验证过），在ubuntu10.04中为exuberant-ctags软件包</span>
<span style="color: #804040;">let</span> g<span style="color: #000000;">:</span>Tlist_Use_Left_Window=<span style="color: #000000; font-weight:bold;">1</span>
<span style="color: #804040;">let</span> g<span style="color: #000000;">:</span>Tlist_Show_One_File=<span style="color: #000000; font-weight:bold;">1</span>
<span style="color: #804040;">let</span> g<span style="color: #000000;">:</span>Tlist_Compact_Format=<span style="color: #000000; font-weight:bold;">1</span>
<span style="color: #804040;">let</span> Tlist_Exit_OnlyWindow=<span style="color: #000000; font-weight:bold;">1</span>
<span style="color: #804040;">let</span> g<span style="color: #000000;">:</span>winManagerWindowLayout=<span style="color: #C5A22D;">'FileExplorer|TagList'</span>
nmap <span style="color: #668080;">&lt;F4&gt;</span> <span style="color: #000000;">:</span>WMToggle</pre></td></tr></table></div>

<p style="text-align: center;">++++++++++++++++++++++++++++++++++++++++++++++++++++</p>
<p style="text-align: center;">插件</p>
<p style="text-align: center;">++++++++++++++++++++++++++++++++++++++++++++++++++++</p>
<p><a href="http://www.vim.org/scripts/script.php?script_id=1338" target="_blank">TabBar</a> 打开多个文档时可以像UE一样有标签的效果..通过alt+1,2,3切换，见<strong>效果图3</strong></p>
<p><a href="  	http://www.vim.org/scripts/script.php?script_id=95" target="_blank">WinManager</a> 文件管理和窗口管理器，见<strong>效果图3</strong></p>
<p><a href="http://www.vim.org/scripts/script.php?script_id=273" target="_blank">TagList</a> 显示代码中的函数、类、变量等等，见<strong>效果图3</strong></p>
<p><span id="more-565"></span></p>
<p>效果图1（设置了行号，C语言自动缩进，配色是desert；默认有括号配对和语法高亮），程序是随便写的，为了演示下而已，功能是取20个数的最大最小值。</p>
<p style="text-align: center;"><a href="http://ptm4qq.blu.livefilestore.com/y1p-NUVi-Liu8OUhn5cI4LBinTUO8F-E1CWrKUqEBFCbysXVnucR8W3CwKxoCRN5s7saeDbXgvVzPgrtAPxiQL6P1zAKHlTBzCD/2010-06-13_234253.png" rel="shadowbox[sbpost-565];player=img;" target="_blank"><img class="aligncenter" src="http://ptm4qq.blu.livefilestore.com/y1p-NUVi-Liu8OUhn5cI4LBinTUO8F-E1CWrKUqEBFCbysXVnucR8W3CwKxoCRN5s7saeDbXgvVzPgrtAPxiQL6P1zAKHlTBzCD/2010-06-13_234253.png" alt="" width="610" height="458" /></a></p>
<p>效果图2（按F5，调用gcc编译并运行，直接在GVIM的窗口内运行，还是蛮方便的）</p>
<p style="text-align: center;"><a href="http://ptm4qq.blu.livefilestore.com/y1p-NUVi-Liu8Nw1xTq1-vRrsGsVoxYZlE6gdHLUgmNXTKPOQbNr-k2fYdNoH7zBhzclP66a56riXPXjt-Je7cO5l8I3T7aVs9A/2010-06-13_234333.png" rel="shadowbox[sbpost-565];player=img;" target="_blank"><img class="aligncenter" src="http://ptm4qq.blu.livefilestore.com/y1p-NUVi-Liu8Nw1xTq1-vRrsGsVoxYZlE6gdHLUgmNXTKPOQbNr-k2fYdNoH7zBhzclP66a56riXPXjt-Je7cO5l8I3T7aVs9A/2010-06-13_234333.png" alt="" width="610" height="458" /></a></p>
<p>效果图3，按F4，调出winmanager，上半部分是文件浏览器，下半部分是Taglist，同时编辑多个文件，上方还有TabBar，用Alt+number来切换各个编辑文件。</p>
<p style="text-align: center;"><a href="http://ptm4qq.blu.livefilestore.com/y1pwR8pf7nYMRYW_KAzaBKARzUn9bDIeiMolPvGIYrZI_IN8jE0yOW6VHhFQoIe6yBTDw8QhHpNqDFhZMBqk4FoUHFLXlP4OSOH/2010-06-14_161533.png" rel="shadowbox[sbpost-565];player=img;" target="_blank"><img class="aligncenter" src="http://ptm4qq.blu.livefilestore.com/y1pwR8pf7nYMRYW_KAzaBKARzUn9bDIeiMolPvGIYrZI_IN8jE0yOW6VHhFQoIe6yBTDw8QhHpNqDFhZMBqk4FoUHFLXlP4OSOH/2010-06-14_161533.png" alt="" width="625" height="458" /></a></p>
<p>先暂时这样，功能好多，乱……慢慢来吧</p>
]]></content:encoded>
			<wfw:commentRss>http://wqos.net/2010/06/my-vimrc/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
	</channel>
</rss>

