<?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://cocobear.info/blog/tag/vim/feed/" rel="self" type="application/rss+xml" />
	<link>http://cocobear.info/blog</link>
	<description>K.I.S.S</description>
	<lastBuildDate>Sat, 10 Dec 2011 16:11:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>vim中使用sdcv(stardict CLI版)</title>
		<link>http://cocobear.info/blog/2008/05/19/vim-sdcv/</link>
		<comments>http://cocobear.info/blog/2008/05/19/vim-sdcv/#comments</comments>
		<pubDate>Mon, 19 May 2008 07:31:36 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[sdcv]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=280</guid>
		<description><![CDATA[这里介绍的vim中使用辞典查词的方法不错，利用了vim的一些特性，这样平时使用vim的时候就可以手不离键盘要完成查词了。 sdvc是命令行版的Stardict,可以在这里下载，目前最新的版本是0.4.2，不过在ADM64平台下编译会出错，我在网上找到了一个补丁，不过这个补丁是针对debain用户的，有些用不上，那些找不到文件的patch就可以直接忽略掉。 如果在gvim中使用则在~/.gvimrc中添加： function Mybln() let expl=system('sdcv -n ' . \ v:beval_text . \ '&#124;fmt -cstw 40') return expl endfunction set bexpr=Mybln() set beval 如果直接在vim中使用，则在~/.vimrc中添加： function! Mydict() let expl=system('sdcv -n ' . \ expand(&#34;&#60;cword&#62;&#34;)) windo if \ expand(&#34;%&#34;)==&#34;diCt-tmp&#34; &#124; \ q!&#124;endif 25vsp diCt-tmp setlocal buftype=nofile bufhidden=hide noswapfile 1s/^/\=expl/ 1 endfunction nmap F :call Mydict()&#60;cr&#62; gvim中鼠标移动到单词上就可以得到翻译，在vim中光标移动到单词上，使用shift＋f可以新分割出来一个窗口显示单词的翻译。 [...]]]></description>
		<wfw:commentRss>http://cocobear.info/blog/2008/05/19/vim-sdcv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用vim+cscope阅读源码</title>
		<link>http://cocobear.info/blog/2007/10/12/use-vim-cscope-read-code/</link>
		<comments>http://cocobear.info/blog/2007/10/12/use-vim-cscope-read-code/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 09:43:54 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cscope]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/2007/10/12/%e4%bd%bf%e7%94%a8vimcscope%e9%98%85%e8%af%bb%e6%ba%90%e7%a0%81/</guid>
		<description><![CDATA[vim与cscope安装就不说了，一般的发行版都会有的。不过如果你是源码编译的vim，请使用&#8211;enable-cscope选项。 -R: 在生成索引文件时，搜索子目录树中的代码 -b: 只生成索引文件，不进入cscope的界面 -q: 生成cscope.in.out和cscope.po.out文件，加快cscope的索引速度 -k: 在生成索引文件时，不搜索/usr/include目录 -i: 如果保存文件列表的文件名不是cscope.files时，需要加此选项告诉cscope到哪儿去找源文件列表。可以使用“-”，表示由标准输入获得文件列表。 -I dir: 在-I选项指出的目录中查找头文件 -u: 扫描所有文件，重新生成交叉索引文件 -C: 在搜索时忽略大小写 -P path: 在以相对路径表示的文件前加上的path，这样，你不用切换到你数据库文件所在的目录也可以使用它了。 在使用cscope之前需要先生成一个数据库，你可以使用cscope-indexer（如果多个目录你可以使用-R选项），它会在当前目前下生成一个cscope.files的文件，这个文件包含了cscope需要生成索引的全部文件，因为cscope-indexer不会自动查到cpp,java后缀的文件，因此最后使用find来生成cscope.files文件： [cocobear@cocobear src]$ find ./ -name &#8220;*.c&#8221; -or -name &#8220;*.h&#8221; -or -name &#8220;*.cpp&#8221; > cscope.files 上面的命令会把当前目录下所有.c,.h,.cpp文件列出并写入cscope.files文件中。接着使用cscope -bq来生成索引引。接着你就可以使用vim来打开一个文件来浏览代码了。使用cs(cscope写)命令来实现函数的调用，定义查找： s: 查找C语言符号，即查找函数名、宏、枚举值等出现的地方 g: 查找函数、宏、枚举等定义的位置，类似ctags所提供的功能 d: 查找本函数调用的函数 c: 查找调用本函数的函数 t: 查找指定的字符串 e: 查找egrep模式，相当于egrep功能，但查找速度快多了 f: 查找并打开文件，类似vim的find功能 i: 查找包含本文件的文 例如:cs [...]]]></description>
		<wfw:commentRss>http://cocobear.info/blog/2007/10/12/use-vim-cscope-read-code/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>vim进阶</title>
		<link>http://cocobear.info/blog/2007/09/30/advance-vim/</link>
		<comments>http://cocobear.info/blog/2007/09/30/advance-vim/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 05:46:38 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/2007/09/30/vim%e8%bf%9b%e9%98%b6/</guid>
		<description><![CDATA[/*摘自：http://edt1023.sayya.org/vim/index.html &#160; * &#160; *里面有很多非常好用的我用蓝色标记了一下，看看你都知道这些好用的功能吗？ &#160;* &#160;*/ Ctrl+f 即 PageDown 翻頁（Forward，向前、下翻頁）。 Crtl+b 即 PageUp 翻頁（Backward，向後、上翻頁)。 0 是數目字 0 而不是英文字母 o。移至行首，（含空白字元）。 W 移动一个符，但會忽略一些標點符號。 e 移至後一個字字尾。 E 同上，但會忽略一些標點符號。 b 移至前一個字字首。 B 同上，但會忽略一些標點符號。 H 移至螢幕頂第一個非空白字元。 M 移至螢幕中間第一個非空白字元。 L 移至螢幕底第一個非空白字元。 ) 移至下一個句子（sentence）首。 ( 移至上一個句子（sentence）首。sentence（句子）是以 . ! ? 為區格。 } 移至下一個段落（paragraph）首。 { 移至上一個段落（paragraph）首。paragraph（段落）是以空白行為區格。 R进入替换模式 I 在行首開始輸入文字。此之行首指第一個非空白字元處，要從真正的第一個字元處開始輸人文字，可使用 0i 或 gI(Vim 才有)。 [...]]]></description>
		<wfw:commentRss>http://cocobear.info/blog/2007/09/30/advance-vim/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

