<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://www.itecfun.com/extern.php?action=feed&amp;fid=42&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[个人知识管理站 / 编辑器]]></title>
		<link>http://www.itecfun.com/index.php</link>
		<description><![CDATA[个人知识管理站 最近发表的主题。]]></description>
		<lastBuildDate>Wed, 03 Jun 2015 07:25:59 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Sublime Text 3 中实现编译C语言程序]]></title>
			<link>http://www.itecfun.com/viewtopic.php?id=3154&amp;action=new</link>
			<description><![CDATA[<p><a href="http://www.itecfun.com/viewtopic.php?id=3150" rel="nofollow">本论坛</a></p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 03 Jun 2015 07:25:59 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?id=3154&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Sublime Text 3中配置编译和运行Java的两个方法]]></title>
			<link>http://www.itecfun.com/viewtopic.php?id=3152&amp;action=new</link>
			<description><![CDATA[<p>在用Sublime Text 3编辑 Java程序 按网上的教程进行设置之后，对中文的支持仍然不尽人意，在编译窗口往往将中文显示为空白甚至报错。<br />一直在用cmd命令行手动编译运行，不胜其烦。今天调试了各步聚的参数，终于完美解决此问题。<br /><strong>说明：前提是本机已经配置好java运行环境。</strong><br />以下步骤依据网友的心得修改而成：</p><p>方法一：<br />打开Sublime Text 3，依次点击Preference, Browse Packages，在打开的窗口中双击User文件夹，新建文件JavaC.sublime-build，用记事本打开，粘贴下面的代码并保存关闭：<br />{<br />&quot;cmd&quot;: [&quot;javac&quot;,&quot;-encoding&quot;,&quot;UTF-8&quot;,&quot;-d&quot;,&quot;.&quot;,&quot;$file&quot;],<br />&quot;file_regex&quot;: &quot;^(...*?):([0-9]*):?([0-9]*)&quot;,<br />&quot;selector&quot;: &quot;source.java&quot;,<br />&quot;encoding&quot;:&quot;GBK&quot;,<br />//执行完上面的命令就结束</p><p>// 下面的命令需要按Ctrl+Shift+b来运行<br />&quot;variants&quot;:<br />&#160; &#160; [<br />&#160; &#160; &#160; &#160; {<br />&#160; &#160; &#160; &#160; &#160; &#160; &quot;name&quot;: &quot;Run&quot;,<br />&#160; &#160; &#160; &#160; &#160; &#160; &quot;shell&quot;: true,<br />&#160; &#160; &#160; &#160; &#160; &#160; &quot;cmd&quot; :&#160; [&quot;start&quot;,&quot;cmd&quot;,&quot;/c&quot;, &quot;java ${file_base_name} &amp;echo. &amp; pause&quot;],<br />&#160; &#160; &#160; &#160; &#160; &#160; // /c是执行完命令后关闭cmd窗口,<br />&#160; &#160; &#160; &#160; &#160; &#160; // /k是执行完命令后不关闭cmd窗口。<br />&#160; &#160; &#160; &#160; &#160; &#160; // echo. 相当于输入一个回车<br />&#160; &#160; &#160; &#160; &#160; &#160; // pause命令使cmd窗口按任意键后才关闭<br />&#160; &#160; &#160; &#160; &#160; &#160; &quot;working_dir&quot;: &quot;${file_path}&quot;,<br />&#160; &#160; &#160; &#160; &#160; &#160; &quot;encoding&quot;:&quot;GBK&quot;<br />&#160; &#160; &#160; &#160; }<br />&#160; &#160; ]<br />}</p><p>ctrl+B编译，Ctrl+shift+b运行。</p><p>方法二：<br />1.安装JDK并配置环境变量<br />2.在JDK的bin目录下新建runJava.bat文件，右键选编辑，复制粘贴如下代码并保存：<br />@echo off<br />cd %~dp1<br />echo Compiling %~nx1......<br />if exist %~n1.class (<br />del %~n1.class<br />)<br />javac -encoding UTF-8 %~nx1<br />if exist %~n1.class (<br />echo ------Output------<br />java %~n1<br />)<br />3.打开Sublime Text 3，依次点击Preference, Browse Packages，在打开的窗口中双击User文件夹，新建文件JavaC.sublime-build，用记事本打开，粘贴下面的代码并保存关闭：<br />{<br />&quot;shell_cmd&quot;: &quot;runJava.bat \&quot;$file\&quot;&quot;,<br />&quot;file_regex&quot;: &quot;^(...*?):([0-9]*):?([0-9]*)&quot;,<br />&quot;selector&quot;: &quot;source.java&quot;,<br />&quot;encoding&quot;: &quot;GBK&quot;<br />}</p><p>保存后即可在Sublime Text 3中按Ctrl+B编译Java运行文件，这种方法的缺点是无法在控制台输入，如果程序需要输入内容，则直接报错</p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 03 Jun 2015 07:14:23 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?id=3152&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Sublime text3 插件使用]]></title>
			<link>http://www.itecfun.com/viewtopic.php?id=3128&amp;action=new</link>
			<description><![CDATA[<p><a href="http://xlbd.net/xlbd/1662.html" rel="nofollow">Sublime Text 3 快捷键大全</a></p>]]></description>
			<author><![CDATA[dummy@example.com (osborn)]]></author>
			<pubDate>Tue, 02 Jun 2015 10:01:21 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?id=3128&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[notepad++ 中文乱码（空方块）]]></title>
			<link>http://www.itecfun.com/viewtopic.php?id=98&amp;action=new</link>
			<description><![CDATA[<p>中文：<br />菜单-》设置-》语言格式设置-》字体格式-》字体名称：宋体<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; -》使用全局字体&#160; &#160; &#160; &#160; &#160;<br />Eng:<br />Menue-&gt;Settings-&gt;Style Configurator-&gt;Font Style-&gt;Font name:宋体<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;-》Select: Enable global font</p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Mon, 09 Feb 2015 05:52:45 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?id=98&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[一些vim插件]]></title>
			<link>http://www.itecfun.com/viewtopic.php?id=24&amp;action=new</link>
			<description><![CDATA[<p><strong>1. Pathogen 或者是 Vundle</strong><br />Vim插件管理工具，就是可以让你的vim插件管理更高效，不用把vim插件凌乱的放置到.vim/plugin文件夹下面，而是通过每个插件一个文件夹放在.vim/bundle/xxxplugin下面。这样，但你需要删除某个插件的时候，直接把那个xxxplugin文件夹删掉就可以了（其实，就我个人使用下来说，也就是当你发现一个插件，想试用的时候比较有用；如果试用下来合你的心意你就留着，当你觉得不好，就直接删掉。但是，大部分情况下，我还是都保留了我选择的插件）。</p><p>个人还是比较喜欢用pathogen的，虽然Vundle提供了更丰富的功能，但是我感觉pathogen提供给我的功能足够我使用了。至于更新功能，只有当自己真的有特别需要更新的时候才去vim.org或者github上去找更新，其他更多时间够用就好。</p><p>Pathogen：<a href="https://github.com/vim-scripts/pathogen.vim" rel="nofollow">https://github.com/vim-scripts/pathogen.vim</a></p><p>Vundle：<a href="https://github.com/gmarik/vundle" rel="nofollow">https://github.com/gmarik/vundle</a></p><p><strong>2. taglist&amp; tagbar</strong><br />taglist自然不用说，应该很多人都介绍过，就是函数列表了，用过notepad++的用户，一定知道那个function list。需要说明一点的是，这两个插件都是需要ctags来配合的，所以请务必确认你使用的机器上也安装了ctags。<br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/edite/20130831071809625.png" alt="20130831071809625.png" /></span></p><br /><p>如上图，这个是一个cpp文件，可以看到，它清楚了列出了各个函数还有一些成员变量，在后面还列出了他们所属的类。</p><p>Taglist好是好，特别是针对C。但是对于c++，java等一些面向对象语言，我觉得还是需要tagbar来配合，tagbar的呈现方式更接近UML的方式。<br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/edite/20130831071852312.png" alt="20130831071852312.png" /></span></p><p>从图中（这个是个头文件）可以看出，共有成员或是变量前面都有+号，私有的都是-号，而且对于只有声明没有定义的函数都在prototypes下，有了定义的函数就放到了functions下，members一栏自然是要放它的成员变量了。</p><p>所以这两个插件相补充，可以让你看代码更迅速。</p><p>Taglist：<a href="https://github.com/vim-scripts/taglist.vim" rel="nofollow">https://github.com/vim-scripts/taglist.vim</a></p><p>Tagbar：<a href="https://github.com/majutsushi/tagbar" rel="nofollow">https://github.com/majutsushi/tagbar</a></p><p><strong>3. MRU（MostlyRecently Used）</strong><br />顾名思义，这个就是可以列出你最近使用过的文件。如果你用的是gvim的话，它还会在你的file菜单中添加一个菜单项，但是我还是主要适用vim的。</p><p>MRU:https://github.com/vim-scripts/mru.vim</p><p><strong>4.easymotion</strong><br />Vim的快捷键真的是很多，很多区块跳转的快捷键自己真的记不住，有的时候还真的就是用上下左右来把光标移动到想要去的位置。知道遇到这个插件，快速移动光标的任务就交给easymotion啦，很酷的哦。</p><p><span class="postimg"><img src="http://www.itecfun.com/img/tec/edite/20130831071920203.png" alt="20130831071920203.png" /></span></p><p>看到了吧，当你适用easymotion的时候，它会自动帮你标注出每个单词的其实位置，这个时候只要你选择相应的字母，光标就会跳到那个单词，很快的哦！！</p><br /><p>Easymotion：<a href="https://github.com/Lokaltog/vim-easymotion" rel="nofollow">https://github.com/Lokaltog/vim-easymotion</a></p><p><strong>5. locate</strong><br />就像作者在它的介绍中说的，The :lvimgrep you&#039;vealways dreamed of. 是的，我觉得他的确做到了。在当前文件中查找，的确是我们经常使用的功能，特别是当你修改代码的时候，这样可以确保你没有遗漏掉你要改动的地方。还有另外一些各种各样的user case我就不多说了。</p><p><span class="postimg"><img src="http://www.itecfun.com/img/tec/edite/20130831071946187.png" alt="20130831071946187.png" /></span></p><p>Locate：<a href="https://github.com/mtth/locate.vim" rel="nofollow">https://github.com/mtth/locate.vim</a></p><p><strong>6. Mark</strong><br />在接触到linux之前，俺是使用windows的。那个时候看代码，使用的sourceinsight。看代码的时候，使用最多的就是那个shift+F8，高亮某一个关键字；但是经常的需求是你需要同时高亮好几个关键字，而sourceinsight确只能用同一种颜色来高亮关键字，有的时候必须很好的区分这个高亮下面到底是哪个关键字。后来使用了linux+vim，这个问题同样碰到，好在强大的hacker们开发出了Mark这个插件，可以用不同的颜色高亮不同的关键字。超爱这个插件，每天都会用到它。如下图，看，小伙伴们，知道它的威力了吧！<br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/edite/20130831071958875.png" alt="20130831071958875.png" /></span></p><p>Mark：<a href="https://github.com/vim-scripts/Mark--Karkat" rel="nofollow">https://github.com/vim-scripts/Mark--Karkat</a></p><p><strong>7. tabular</strong><br />好的代码格式，会让你的代码看起来更赏心悦目，而且在调试的时候更舒服。而tabular就是这样一款可以让你做文本对其的插件。这个我就不多做介绍了，有个视频大家可以看http://vimcasts.org/episodes/aligning-text-with-tabular-vim/，而且后面还有很详细的使用介绍。</p><p>Tabular：<a href="https://github.com/godlygeek/tabular" rel="nofollow">https://github.com/godlygeek/tabular</a></p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Thu, 29 Jan 2015 01:51:16 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?id=24&amp;action=new</guid>
		</item>
	</channel>
</rss>
