<?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://blog.upsuper.org/tag/vim/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.upsuper.org</link>
	<description>the place where there are some ghost appearing...</description>
	<lastBuildDate>Wed, 19 Oct 2011 13:21:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>解决vim退出后终端乱码的问题</title>
		<link>http://blog.upsuper.org/solve-the-problem-of-terminal-becoming-messy-after-exit-vim/</link>
		<comments>http://blog.upsuper.org/solve-the-problem-of-terminal-becoming-messy-after-exit-vim/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 12:53:12 +0000</pubDate>
		<dc:creator>upsuper</dc:creator>
				<category><![CDATA[探究学习]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.upsuper.org/?p=805</guid>
		<description><![CDATA[这个问题很早就有了，一直没解决，而且也不知道很多人所说的“reset”命令，每次都是关掉重开。最近几天因为编辑新首页的缘故，实在不满于这个问题，于是便想办法解决了，在这里写出来，给大家也给自己以后做个参考。 网上有很多诡异的做法，其中最诡异的莫过于在默认标题前后加上空格，而且很多人称这很有效，但我试了却没有用。找了半天，发现一个帖子有一个比较奇特的解决方法：vim编辑退出后提示符乱码解决 &#8211; LinuxSir.Org 其中提到了重设vim连接到的程序。我根据man手册里vim相关的命令给出下面几个命令： 1 2 3 4 sudo update-alternatives --config vim sudo update-alternatives --config vi sudo update-alternatives --config ex sudo update-alternatives --config view 每个命令中都选择“/usr/bin/vim.basic”，结果就可以了…… 看来是gvim的问题。当然，如果从来不用，直接 1 sudo apt-get remove vim-gnome 或许是最直接简便的方案~]]></description>
			<content:encoded><![CDATA[<p>这个问题很早就有了，一直没解决，而且也不知道很多人所说的“reset”命令，每次都是关掉重开。最近几天因为编辑新首页的缘故，实在不满于这个问题，于是便想办法解决了，在这里写出来，给大家也给自己以后做个参考。</p>
<p>网上有很多诡异的做法，其中最诡异的莫过于在默认标题前后加上空格，而且很多人称这很有效，但我试了却没有用。找了半天，发现一个帖子有一个比较奇特的解决方法：<a href="http://www.linuxsir.com/bbs/thread333819.html">vim编辑退出后提示符乱码解决 &#8211; LinuxSir.Org</a></p>
<p>其中提到了重设vim连接到的程序。我根据man手册里vim相关的命令给出下面几个命令：</p>

<div class="wp_codebox"><table><tr id="p8053"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p805code3"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> update-alternatives <span style="color: #660033;">--config</span> <span style="color: #c20cb9; font-weight: bold;">vim</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> update-alternatives <span style="color: #660033;">--config</span> <span style="color: #c20cb9; font-weight: bold;">vi</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> update-alternatives <span style="color: #660033;">--config</span> ex
<span style="color: #c20cb9; font-weight: bold;">sudo</span> update-alternatives <span style="color: #660033;">--config</span> view</pre></td></tr></table></div>

<p>每个命令中都选择“/usr/bin/vim.basic”，结果就可以了……</p>
<p>看来是gvim的问题。当然，如果从来不用，直接</p>

<div class="wp_codebox"><table><tr id="p8054"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p805code4"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> remove vim-gnome</pre></td></tr></table></div>

<p>或许是最直接简便的方案~</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.upsuper.org/solve-the-problem-of-terminal-becoming-messy-after-exit-vim/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu之旅（十一）——探索VIM</title>
		<link>http://blog.upsuper.org/ubuntu-trip-11-explore-vim/</link>
		<comments>http://blog.upsuper.org/ubuntu-trip-11-explore-vim/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 10:37:50 +0000</pubDate>
		<dc:creator>upsuper</dc:creator>
				<category><![CDATA[探究学习]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.upsuper.org/?p=772</guid>
		<description><![CDATA[很久没写日志了，前段时间本来想写一个安装 CoreAVC for Linux 的，结果它未能成功拯救我的福音战士新剧场版1080P，于是就放下了…… 这次由于对 Scribes 测试版 bug 重重的不满和随时可能丢失修改的担忧，在看了一部分《开源世界旅行手册》后，毅然决定试一试传说中的 vim。 vim 在传说中是强大的，不过说起来也还是不那么容易入门的。查了很多关于 vim 配置和操作的文章。在操作方面，vim 自带的指导、开源世界旅行手册中的相关章节和 LinuxToy 上的《高效率编辑器 VIM》让我受益匪浅。vim 自带的指导只要在终端里输入 vimtutor 就可以了，一边看着指导一边操作，学得还是挺快的，只不过指导只有繁体中文，看了不大舒服，幸好还都看懂了…… 至于配置，也看了不少地方，现在的配置文件大概是这样的： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 filetype indent on set nocompatible set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 syntax on colorscheme freya set [...]]]></description>
			<content:encoded><![CDATA[<p>很久没写日志了，前段时间本来想写一个安装 CoreAVC for Linux 的，结果它未能成功拯救我的福音战士新剧场版1080P，于是就放下了……</p>
<p>这次由于对 Scribes 测试版 bug 重重的不满和随时可能丢失修改的担忧，在看了一部分《<a href="http://linuxtoy.org/docs/guide/">开源世界旅行手册</a>》后，毅然决定试一试传说中的 vim。<br />
<span id="more-772"></span><br />
vim 在传说中是强大的，不过说起来也还是不那么容易入门的。查了很多关于 vim 配置和操作的文章。在操作方面，vim 自带的指导、开源世界旅行手册中的<a href="http://linuxtoy.org/docs/guide/ch24.html">相关章节</a>和 <a href="http://linuxtoy.org">LinuxToy</a> 上的《<a href="http://linuxtoy.org/archives/efficient-editing-with-vim.html">高效率编辑器 VIM</a>》让我受益匪浅。vim 自带的指导只要在终端里输入 vimtutor 就可以了，一边看着指导一边操作，学得还是挺快的，只不过指导只有繁体中文，看了不大舒服，幸好还都看懂了……</p>
<p>至于配置，也看了不少地方，现在的配置文件大概是这样的：</p>

<div class="wp_codebox"><table><tr id="p7726"><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
</pre></td><td class="code" id="p772code6"><pre class="vim" style="font-family:monospace;"><span style="color: #804040;">filetype</span> <span style="color: #25BB4D;">indent</span> <span style="color: #25BB4D;">on</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">nocompatible</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">fileencodings</span>=utf<span style="color: #000000;">-</span><span style="color: #000000; font-weight:bold;">8</span>,ucs<span style="color: #000000;">-</span>bom,gb18030,gbk,gb2312,cp936
<span style="color: #804040;">syntax</span> <span style="color: #25BB4D;">on</span>
<span style="color: #804040;">colorscheme</span> freya
<span style="color: #804040;">set</span> <span style="color: #668080;">shortmess</span>=atI
<span style="color: #804040;">set</span> <span style="color: #668080;">autoindent</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">complete</span>=<span style="color: #000000;">.</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">smartindent</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">smarttab</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">expandtab</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">tabstop</span>=<span style="color: #000000; font-weight:bold;">2</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">softtabstop</span>=<span style="color: #000000; font-weight:bold;">2</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">shiftwidth</span>=<span style="color: #000000; font-weight:bold;">2</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">foldmethod</span>=<span style="color: #25BB4D;">indent</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">number</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">ambiwidth</span>=double
&nbsp;
nmap <span style="color: #668080;">&lt;F2&gt;</span> <span style="color: #000000;">:</span>tabprevious<span style="color: #000000;">&lt;</span>CR<span style="color: #000000;">&gt;</span>
nmap <span style="color: #668080;">&lt;F3&gt;</span> <span style="color: #000000;">:</span>tabnext<span style="color: #000000;">&lt;</span>CR<span style="color: #000000;">&gt;</span></pre></td></tr></table></div>

<p>其实到处都有很多 vim 的配置文件，我现在这个还算很短的，而且很简陋的，估计还会不断增加，暂且放在这里做一个纪念吧，看看以后会到怎样的境界……</p>
<p>现在用 vim 慢慢适应了不用方向键的操作了，不过不知道到底是好是坏呢……只能慢慢适应咯</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.upsuper.org/ubuntu-trip-11-explore-vim/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

