最后更新:Sunday May 13, 2007 03:22 pm
文章有点老了,不过还是很有参考价值,偶当初入门 Vim 也就是从这几篇文章开始的,说起来接触 Vim 也没有多长时间,但是已经深深的被迷住了,那些貌似功能强劲界面又花哨的 IDE 在 Vim 面前基本都是 HelloWorld 级别的。
虽然偶没有用过 emacs,但根据一些文档的了解,能和 Vim 比肩的也就只有 emacs 了。
- 程序员的编辑器–Vim
- 世界第二的 Vim: 普通人的编辑利器(上)
- 世界第二的 Vim: 普通人的编辑利器(下)
- Vim 实用技术,第 1 部分: 实用技巧
- Vim 实用技术,第 2 部分: 常用插件
- Vim 实用技术,第 3 部分: 定制 Vim
“爸爸,我们为什么要躲避那些警察?”
“因为我们用 Vi,孩子,而他们用 emacs!”
在 Cygwin 上面编译一些 Unix 软件时,比如 ffmpeg, gvim 等,由于 Unix / DOS 系统的差异经常会出现一些莫名奇妙的问题,最近经常碰到的一个问题就是:
1
| line 9: $'\r': command not found |
这样的错误,初步判断可能是因为 \r\n 的区别引起的,遇到这种情况,可以使用 dos2unix 来修复。
执行: dos2unix configure configure,之后再运行: ./configure ,就不会再出现上面的错误了。
Vim 7.1b 发布了,您可以查阅 Bram 在 Yahoo Tech Group 的公告:
http://tech.groups.yahoo.com/group/vim/message/80175
Changes since 7.1a:
- Lots of spelling mistakes fixed.
- Several runtime files updated. Somehow people tend to send me updates
_after_ doing a release…
- Bug in downloading a missing spell file fixed. Could wipe out a
buffer with your text when downloading failed.
- Building with MingW fixed (and now Win32s version also builds).
- Editing compressed files didn’t work when folding enabled.
或者直接到这里下载可直接安装的二进制版本:
ftp://ftp.vim.org/pub/vim/unstable/
安装的时候,请注意备份相关的配置文件,以防止意外丢失。
这种意外我遇到两次了…狂点 Next @_@
一个简单的 Vim Twitter 插件,可以从 Vim 中直接 Update Twitter Status,原版的下载地址是:
http://www.vim.org/scripts/script.php?script_id=1853
一个 22 岁的国外小朋友做的,不过真的是比较简单,文字传递到 Python 中并没有编码,所以无法发送中文的 Status 信息,我修改了一下,加了一个 encoding 选项,设定你使用的文字编码,转换后,就可以正常发送中文了。
下载地址:
http://www.phpvim.net/files/vim/scripts/twitter.7z
解压缩把文件放在 vimfiles/plugin 目录下面,然后打开 _vimrc (或者 .vimrc)文件,加入如下选项:
let g:twitterusername = 'your_twitter_id'
let g:twitterpassword = 'your_twitter_pwd'
let g:twitterencoding = 'gb2312'
rmap tp :let g:twitterpassword=inputsecret('password? ')
nmap tw :execute 'TwitterStatusUpdate ' . inputdialog('Enter
a Twitter status message:')
nmap tf :TwitterFriendsTimeline
OK 了,体验一下吧~