2006/12/04

天地可以不仁,大道可以不仁,圣人可以不仁,甚而本心可以不仁。但你此时即非情不得已,亦非攫取利益,更非立威之时,行此不仁之事,不过一得权小人嚣张竖子耳,安得与天下英雄谋?若无仁戮力相助,你又如何成得大事? Technorati Tags:

2006/09/09

留个纪念再

Windows XP自动登录设置

方法:单击“开始/运行”,输入“rundll32 netplwiz.dll,UsersRunDll”,按回车键后弹出“用户帐户”窗口,看清楚,这可跟“控制面板”中打开的“用户账户”面板窗口不同哦!然后取消选定“要使用本机,用户必须输入用户名和密码”选项,单击确定,在弹出的对话框中输入你想让电脑每次自动登录的账户和密码即可。

2006/08/21

记一笔

wordpress database 导入用phpmyadmin或者mysql命令行,
数据编码尽管是utf-8但直接bin编码导入


Technorati Tags: , ,

2006/08/17

犯了一个低级错误 在此记录之:mysql Root 密码

如果 MySQL 正在运行,首先杀之: killall -TERM mysqld。 启动 MySQL :mysqld_safe --skip-grant-tables & 就可以不需要密码就进入 MySQL 了。 然后就是 >use mysql >update user set password=password("new_pass") where user="root"; >flush privileges; 重新杀 MySQL ,用正常方法启动 MySQL

2006/07/14

离开

离开成都;离开网络;下周回来。

ps:齐达内顶人的秃头怎么和窦唯点火时候的脑袋有点像啊?




Technorati Tags:

2006/06/10

06世界杯Google Calender版 日程表

害怕上网上的忘记看世界杯? 有了这个 06世界杯Google Calender版 日程表就不会了。 不管你是用Google DesktopCalendar Notifer还是firefox的Calendar Notifer 都可以方便的添加这个 日程表,这样就可以随时提醒你想看的那场球马上就要开始咯!

当然,如果你比较讨厌英文的话,可以在Add Other Calender里边来搜你喜欢的语言的Calender,这里就是一个繁体中文的世界杯日程表。 Technorati Tags: ,

Google web服务快捷键大全

一直以来都喜欢用键盘,在使用了Launchy 这样的工具后更加有了扔掉鼠标的冲动,唯一的顾虑就是Web应用中快捷键忒少了点,庆幸的是我喜欢的Google的绝大多数服务都有快捷键的设置。想要以最高的效率办最多的事情的话,看看下边吧。

Google Mail

注意,在按住Shift后将会在新窗口弹出应用。

Key Name Action
c Compose 写信
/ Search 移动鼠标至搜索栏
k Newer conversation 移动到下一个conversation
j Older conversation 移动到上一个conversation
n Next message 在同一Conversation中的下条信息
p Previous message 在同一Conversation中的上条信息
o Open 打开
u Conversation list 回到Conversation 列表
y Archive 归档,要么就是撤销Star或者撤销labels。这主要取决与你所选conversation的状态
x Select conversation 选择邮件成为下一步操作的对象
s Star Star邮件或conversation
! Report spam 提交并删除垃圾
r Reply 回复当前消息
a Reply to all 回复所有
f Forward 转发当前消息
<esc> Deselect 离开当前输入区
g then a All mail 切换到all 邮件视图
g then s Starred mail 切换到starred 邮件视图
g then c Contacts 显示通讯录
g then d Drafts 切换到草稿箱
g then i Inbox 切换到收件箱
<tab> then <Enter> Send 发信

Google Calendar

Key Name Action
c Create event 显示添加时间窗口
/ Search 搜索
p Previous date range 上一个时间段
n Next date range 下一个时间段
t Jump to “Today” 切换到当天
d Day view 切换以天为单位的视图
w Week view 切换以周为单位的视图
m Month view 切换以月为单位的视图
x Customised view 切换自定义的视图
a Agenda view 显示所有事件
q Quick Add 唤出QuickAdd窗口并将鼠标定位与此
Esc Back to calendar 回到默认窗口

Google Reader

Key Name Action
j Next 切换到阅读列表的下一项
k Previous 切换到阅读列表的上一项
n Scan down 切换到阅读列表的上一项单并不在阅读区打开
p Scan up 切换到阅读列表的下一项单并不在阅读区打开
shift + n Page down 滚动到下一屏
shift + p Page up 滚动到上一屏
o Open 在阅读区打开消息
h Top 回到阅读列表顶部
r Refresh 刷新并获取新消息
s Star Star消息
l Label 切换到lable页面
v View original 在新窗口查看原始消息
g then h Home 回到home
g then s Starred items 回到starred 消息项
g then u Subscriptions 打开订阅单
g then r Read items 打开正在阅读条目
g then l Label selector 切换到某一个 label 的阅读列表中

Writely

Note: 基本上和平常的word之类文字处理的快捷键差不多,基本上都是用 ctrl + 来实现, 这些字母有可能是 b = 粗体, u = 带下拉线, i = 斜体, x, c , v , s 分别是剪切,复制,粘贴和保存。

Key Name Action
ctrl + z Undo 撤销
ctrl + y Redo 重做
ctrl + p Print 打开打印窗口
ctrl + m Add comment 对所选文字添加注释

Google Video

Key Name Action
space Play / pause 开始/ 暂停切换
Right arrow Skip forward 快进5%
Left arrow Skip backward 后退5%
Up arrow Increase volume 音量大5%
Down arrow Decrease volume 音量小5%
m Mute 静音切换
f Full screen 全屏切换

Google Maps

Key Name Action
Arrow keys Pan 在地图上移动
Page Up / Down Pan wider 在地图大幅上下移动
Home / End Pan wider 在地图大幅上左右移动
+ Zoom in 放大
- Zoom out 缩小
有新发现要告诉我哈!感谢此文,还有 这里的Gmail快捷键的cheatsheet。 p.s. 有不少的User.script来帮助实现快捷键,添加更方便快捷键,让web服务来适应你的使用习惯,例如这个Gmail Macros尽管会带来很炫的效果,尽管已经是修订版,但是或多或少会仍与原先的快捷键有冲突。 Technorati Tags: , ,

2006/06/02

珍爱生命,远离IT

在外表的光鲜下都隐藏了些什么? 当发现那个逝去的生命离自己的生活是如此之近的时候,在自己亲身体验过加班如切菜的经历之后,难道仅仅留给我们 “IT就是I'm Tired” 的体会而已?! 珍爱生命,远离IT Technorati Tags: ,

2006/06/01

伟大的GFW

不能访问google, wikipedia早已被挂,所以,改host吧 145.97.39.132 en.wikipedia.org 145.97.39.132 zh.wikipedia.org 145.97.39.132 jp.wikipedia.org 145.97.39.132 upload.wikimedia.org 64.233.171.99 www.google.com 216.239.53.99 google.com 至于host在那里? 从C:\WINDOWS\system32\drivers\etc下边那个hosts就是了。

倘若想要进一步来访问被GFW的网站的话,用代理吧!对于懒人来说有了torproxy这样的代理软件了会方便很多了…… Technorati Tags: ,

2006/05/16

Google Notebook 初探

Google Notebook上线。广大GFans又有的玩了。

  • 界面一如既往的干净。
  • 笔记编辑。有各种字体设置,链接编辑,WYSIWYG方式,简单,直接。有共享或私人笔记的设定。
  • 笔记管理。AJAX拖拽,能够脉络清晰的梳理所记录的笔记的关系。Google Notebook这里采用的Notebook相当于定层目录或分类,而该Notebook下的heading相当于下一级的Note。
  • 笔记采集。两种方式。Web界面Ctrl+C &Ctrl+V 既可。对于使用IE和firefox的用户,可以通过首次登陆Google Notebook是下载Google Note的插件、扩展来简单方便的实现笔记的添加。和以往一样,google对使用opera的用户没有提供客户端的支持,暂时还没有方法通过插件或扩展的形式使用此服务。对于添加笔记来说,使用Notebook插件并打开‘Enable Note This Button’选项是个极其方便的选则。
  • 现在对于firefox的用户,有Scrapbook这样的强力工具来实现Web信息的采集收录,然而笔记分享却比较麻烦。如今有了Google的推动,Web已经成为了一个聚宝盆(好俗的比喻o_O||) 再想想Googel Book这些应用,我想:信息,分享,一直都是Google所秉承的理念吧! Technorati Tags: ,,

2006/05/12

时间

spikewatch, originally uploaded by lanier67.

最近焦头烂额,功放预失真两套方案都弄出来了,效果跟预期相差不少;DSP控制那边还有不少问题,算法看来还没有进展。看来做产品跟纸上谈兵相差还是不少啊…… 半 个多月,基本上没几天是11点以前回的家,就像压缩饼干一样;虽说学到不少东西,但是缺少那种酣畅淋漓的感觉,有时候真还有点力不从心("体力"的"力 ")。很多计划只能在心里念道念道了,都没胆量说出来,害怕一说出来就是:“要是有时间的话,我就…………”,多半就泡汤了。 算了,想想还是把自己半年内的想要完成的计划列一下,就算给自己壮胆,哪怕是留下个脚印,真等自己有空的时候再…… ;-) 我这么说也就意味着,想做的是排在该做的事情后边。无奈。

  1. 参加Google SOC 2006 python 社区scipy的课题,计划做电磁仿真的数值计算。可行度: 10%;工作量:80%;期望度:90%
  2. 计划用Turbogears搭自己的blog发布系统,当然,成形的话将会很快,然而考虑到和blogger同步、多用户管理、主题切换这些功能只能等等了。可行度:90%;工作量:20%;期望度:50%
  3. DIY手持无线电。可行度: 80%; 工作量: 60%; 期待度:60%
所以,时间真的是个好东西。 update: 原本这篇早该发了,花了两天时间和Honey一起把新Blog搭了起来。嘿嘿。遗憾的是,计划1已然过期了,可惜。 Technorati Tags: , plan

2006/04/27

踩个脚印

最近干活很辛苦,今晚就是1点才回来……

享受痛苦的每一天,踩个脚印先


Technorati Tags: ,

2006/04/23

盗亦有道?!

Honey提醒 发现今天竟然是版权日!是联合国教科文组织确定“世界图书与版权日”,于是继续漫谈开来:

  • 早上还和Honey扯到图书和传统平面媒体必然将(或者如今已经?)成为不折不扣夕阳产业。挠头想了好久没有相处来上次买报纸杂志是什么时候就是一个很好的证明吧。如今除了经典的有收藏意义的书籍外对任何纸质的东西有种生疏感,随便拿起笔在纸上写出的汉字也是越看越别扭(靠,刚才“汉字”都打成“焊字”了,看来是电烙铁拿多了),总觉的是错别字,似乎从键盘上输入的字符更有安全感一些;写出来稍微顺溜的也就是10个阿拉伯数字和26个字母了,字母组合起来的话也总怀疑拼写有误,平常打开拼写检查似乎就像买了保险一样……是在退化?还是进化?这是个问题。
  • 版权,我想说,盗亦有道。
    1. 从历史上来讲,copyright 出于商业发展的需要伴随的刺鼻的铜臭而产生的,于是有一帮充满理想主义色彩梦想的嬉皮士弄出来个copyleft来嘲讽这种没有人文道德的商业机制,成立的FSF等组织来维护人人生而平等的享有知识的权利。我想,他们是为了道而“盗”,孤身对抗沉积数世纪的庞大而健全的商业体制,对这些家伙们,只有钦佩。
    2. 在我们生活的周围,同样没有版权的概念。各种各样的盗版,最低级的就是我们家楼下时常在菜市孤身蹬破车,后座架一对劣质喇叭(奇怪的是如此破烂的喇叭声音却如此之大)及无数纸质包装破碟,车前挂破牌,上写“流行金曲500首;时尚音乐3元钱”,招摇过市,怡然自得……诸如此类盗版,不想说啥了……
    3. 从目前来看,中国IT业应感谢盗版。毫无疑问,如果没有盗版,我想90%以上得个人用户是无法享受到目前得IT产品得,这点大家心知肚明,不必多言。然而,出来混迟早要还的,联想微软签约12亿大单才刚刚是个开始……似乎听说,连神六都采用了windows ,什么是饮鸩止渴?!
盗亦有道,没有尊严的盗不仅可恨,而且可耻。 结局,必然可怜。 附伟大的GNU斗士、Free software布道者、我心中永远的Punk Richard Stallman照片一张,希望copyleft、free software的乌托邦早点到来。
http://colombia.indymedia.org/images/gnurevolution-small.png
Technorati Tags: , , ,

2006/04/20

读书学习中

oreilly
最近抽空狂看书,于是连O'Reilly的回执卡片都新收集了3片,于是我又增加了3个书签。 好笑的是由东南大学出版社的影印版的赠送的书签(右下)下边那只老鼠纹理分明,体态优美;与之相对应的中国电力出版社的中文版赠送的书签(右上)的那老鼠经过“翻译”以后变成了球状硕鼠,不仅胡子多了不少,而且其四肢完全隐藏在鼓鼓囊囊的身体里边,留下的只有四只爪子…… Technorati Tags: ,

2006/04/17

vim jde note

原本打算使用eclipse,无奈内存有限,所以用vim投身java。以下为摘录: 配置篇

  • 启用或者禁用java在用户输入括号后自动提示参数
let g:vjde_cfu_java_para=0
  • 启用或者禁用 用户在用<c-x> <c-u>时显示预览
let g:vjde_show_preview=0
  • 启用或者禁用 在用户输入 . 时自动提示后面的部分
let g:vjde_cfu_java_dot=0
  • 启用或才禁用 使用一个图形化的提示窗口.(不推荐,太难看)
let g:vjde_preview_gui=1
  • 以下做为c++使用
let g:vjde_iab_exts='.cpp;.c;.vim;.rb'
  • 对指定名字的窗口进行调整,如下表示:
  • 对以__Tag_List__为标题的窗口,在垂直方向变化,进入时40宽,离开后变成20宽
  • 对以.prj为标题的窗口,在垂直方向变化,进入时24宽,离开后变为1
let g:floatingwindows= "'__Tag_List__',1,40,20;'.prj',1,24,1;'.vimproject',1,24,1;"

Photo

工程创建篇 在开始写一个java程序的时候,如果是一个简单程序,一切都无所谓.如果是一个比较大的项目.需要工程支持.在vjde的配合下,可以这样做.
  • 创建目录 project1 在你的工作目录上.
  • 打开 vim 并切换到 project1
:cd project1
  • 存储一个工程模板
:Vjdesave .vjde
  • 在.vjde里面,会有一个参数,你可自行打开并修改.如我的一个配置文件中,编译时的输出文件夹
let g:vjde_out_path='classes'
  • 源代码目录
let g:vjde_src_path='src'
  • 编译时使用的路径,用于代码补全时类查找,也是编译时使用,最好把输出文件夹加在此处.
let g:vjde_lib_path='lib/servlet.jar:lib/images.jar:class'
  • 如果有jsp类型文件,放在这里
let g:vjde_web_app='webapps'
  • 测试源代码路径
let g:vjde_test_path='test'
  • 系统中java命令的命令名字,默认在windows下为javaw,linux下java,理论上可以修改成为jikes
let g:vjde_java_command='java'
  • 修改完成后,你可以用
:Vjdeload .vjde
  • 或者这样加载
:source .vjde

Photo

编程开始篇 使用vjde,就可以使用已经存在的模板进行创建你的程序: 在图形界面下,可以从菜单Vim JDE->Wizard->New Class(with main) 开始创建一个你自己的类.它还包括一个main 方法. vjde提供了很多的代码模板可以使用,第一个模板被定义为在当前的位置添加模板的全部内容. 同时,你可以自己定义你自己的模板为你的每一类文件.它们都会被列在 Vim JDE->Wizzard的子菜里面. 你只需要把自己定义的模板放到 ~/.vim/vjde/java.vjde 即可被当作java类型文件的模板 ~/.vim/vjde/cpp.vjde 即被当作cpp类型文件的模板 关于文件类型,打开一个文件,然后用 :set filetype 即可知道当前文件的类型. 高级技巧: 各类模板是可以互相引用的.但是,我不作递归检查.
if !exists('g:vjde_iab_refs') let g:vjde_iab_refs={} endif if !has_key(g:vjde_iab_refs,'jsp') let g:vjde_iab_refs['jsp']=[ 'java', 'html' ] endif if !has_key(g:vjde_iab_refs,'cpp') let g:vjde_iab_refs['cpp']=[ 'c' ] endif
即是说 jsp引用 java 和 html的模板 cpp引用了c的模板. 当然,也可定义自己的引用.

Photo

编程日常工作篇
  • 代码补全
在默认的情况下,在gui环境下,用户在任何时候按下<c-space>即可进行代码提示. 如果要改变这个定义,请定义 g:vjde_completion_key let g:vjde_completion_key="<c-l>"
  • 添加引用的包.
通常,我们编辑的时候,比如,使用了 Vector numbers; 我们已经知道了 Vector 在 java.util里,或者一些类,我们不知道在什么地方,这个时候, 把Shu标话在 Vector 上, 在通常模式下,使用 <leader>ai 在我系统上,是 \ai 这个组合.即可自动添加 java.util.Vector 到你的 文件上. 如果有多个,则提示你选择一个你要使用的. 或者使用使用菜单 Vim JDE->Add import
  • 如果在编译时发现一个错误,就是无法找到一个类的定义,这时,可以使用:
Vim JDE->fixerror with import 来把当前这个没有添加的类添加到文件中来. 这个,必须使用 :make 或者 :Vjdec 编译时才能使用.
  • 对编译时提示的没有捕获的异常,也可以根据需要来使用 Vim JDE->fixerror with try/catch , 这会把当前的错误行包含在一个适当的try-catch块里.
使用 Vim JDE->fixerror with throws 则把这个异常定义为 throws ,添加到函数定义上.
  • 重载方法 Vim JDE->Source->override methods...
列出父类的方法,选择重载
  • 实现接口 Vim JDE->Source->Implement interfaces...
列出类的接口中要实现的方法,用户选择实现.
  • 生成构造函数 Vim JDE->Soruce->Generate Con...
把已经编译过的类中每一个成员变量做为参数,生成一个构造函数.
  • 添加 Singleton 接口 Vim JDE->Source->Add single...
在当前位置为类生成一个Singlton接口.包括一个私有构造函数,一个getInstance()方法,一个实例变量.
  • 把变量变成成员变量,局部变量,静态变量的小工具.
Vim JDE->Source->Extract ....
  • 把引用的要排序的包选中,然后,执行此命令
Vim JDE->Source->Sort import ...
Photo
编程提高篇 通常,在我们写代码的时候,我们会写很多重复的代码,如一个数据循环结构,一个Vector的遍历,一个System.out.println() , 甚至很多很多的,每天都要写很多遍的代码. 怎么办? vjde 提供了一个方法. vjde 提供了一个iab的扩展.目前,是在输入模式下输入 <c-j>即激活这个功能. 在使用这个功能前.你可以定义好自己的要使用的一个模板:如果要用java 使用,存储为 ~/.vim/vjde/java.iab, 为c++使用,存储为~/.vim/vjde/cpp.iab , 在 .iab 前是文件类型.你可以为你使用的每一种文件类型创建一种模板 如,一个java 的模板按如下定义:
template out ; system out body System.out.println(|); endt template err; Sysetm.err body System.err.println(|); endt template fa ; for loop for array body for ( int i = 0 ; i < |.length ; i++) { } endt
这样,当你输入
out<c-J>
时,自动把本行展开成为:
System.out.println();
并把光标放在第一个 | 的位置. 更多的定义和使用,请参考
:h vjde-iabbr
Technorati Tags: , , , ,

2006/04/12

4月12日工作日志

11:00 西科微波通知联合调试预失真模块和放大器。 14:00 继续联调,并初步解决了预失真模块的下变频部分,还未测试下变频部分相关参数(周老师拿走了一台信号源)。 17:00 联调结束。测试结果如下: 功放特性: 输出43dBm 三阶交调 45dBc 增益59.6dB 五阶七届基本于三阶持平 加预失真模块后功放特性: 输出43dBm 三阶交调 48 dBc 改善度非常小,频谱上显示可调范围很有限,没有交调非常恶化的点,也没有交调改善非常明显的点。预失真模块S21可以在-1dB—— -15dB调整。 整个联调由于交调改善非常有限,并没有测试ACPR改善。 就这样,结束了繁忙而又毫无成就感的失落的一天。

http://www.babyanimalz.com/images/4.jpg 继续坚持!
Technorati Tags: ,

2006/04/07

heroes V

3DO时代的英雄无敌已经成为永远的回忆了。 在Ubi麾下的HEROES V 居然除了mini在线版。 注册、登陆、选择英雄种族、城市、装备部队、出城挑战、等email回复战争结果。就是这么简单的一个流程。

http://www.planet3dgames.de/images/content/Heroes_V_First_Facts_411x50.jpg 为了纪念那逝去的游戏时光,试的玩了一下 可惜的是,第一仗就败了……
update: 继续探索了一下,发现了好多类似的基于brower的在线游戏: Technorati Tags: ,

2006/04/06

firebird 涅磐 firefox 重生

在我的印象中,Firefox是继承了Mozilla以前一个叫做Firebird的浏览器衣钵的。从前一直不温不火的,改名之后 火鸟重生为火狐,这下真火了。在M$垄断控制浏览器市场的现状下,大概有10%的市场占有率。 Firefox的强大是基于强大的可扩展性基础上的,武装到牙齿的firefox是无所不能的! 我使用的Portable Firefox,为的就是在异地主机保持安装、配置的同步,免去每台电脑都要重新配置的痛苦,简单的将PortableFirefox目录下拷贝既可。 下面使我用MR Tech生成的Firefox信息,对照这些来介绍一下使用情况罢: Generated: Wed Apr 05 2006 23:50:44 GMT+0800 User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Firefox1.5以上有自动升级的功能,也就是说出现新版本后自动下载安装,无缝升级。 Build ID: 2006011112 Enabled Extensions: [57]

  • Aardvark 1.1 类似 Platypus,单不能生成用户脚本。但可以方便的了解网页构架,浏览网页元素的属性
  • Adblock Plus 0.5.11.3 广告拦截。支持白名单,支持单正则表达式的匹配模式常常会出现梦幻一般的拦截效果。
  • All-in-One Gestures 0.17.4 鼠标手势扩扩展
  • All-In-One Sidebar 0.6.4 象opera一样的侧边栏,有强大的制定功能。让浏览器变得更干净
  • Bloglines Toolkit 1.6.0 Bloglines的工具。现在迷上了Google Reader,打算卸咯
  • BugMeNot 1.3 共享精神的延伸,自动从BugMeNot网站取出别人贡献出来的收费网站的用户名和密码。不过最近发现好多假帐号,艾,还好能够自动重试
  • Cacheout! 1.10 从google cache和coralcdn 里取出数据,右键点cacheout后就能看到从cache里取出的网页。可以当个代理来用
  • Codetch 0.3.6.20051230 让firefox成为类似dreamwave一样的网页设计平台.
  • ColorZilla 0.8.3.1 网页取色,网页设计者必备
  • CSSViewer 1.0.1 快速浏览CSS,有些鸡肋,准备卸了
  • CustomizeGoogle 0.45 基础上的一个扩展,让Google满足你的需要
  • del.icio.us 1.1 方便的使用del.icio.us的tag等功能
  • DOM Inspector 1.8.0.1 DOM查看器
  • East Asian Translator 1.1.1 东亚语言翻译,虽然转中文的比较少
  • EditCSS 0.3.5 在调整CSS后想立即看看效果的话,嘿嘿
  • Extension Developer 0.2.2.20050505 网页设计者必备!
  • Fasterfox 1.0.3 firefox加速工具
  • Feed Your Reader 1.5.1 替换Firefox中将RSS加入Live Bookmark图标功能的小工具,自动使用你指定的外部RSS reader订阅当前页面的RSS
  • FireBug 0.3.1 DOM查看 网页元件监视工具。网页设计必备工具。通过firebug的xmlhttprequest Spy功能可以获得xmlhttprequest传输的数据。哈哈,是不是很方便。在升级至0.3.1后界面漂亮多了
  • Firefox Extension Backup Extension (FEBE) 2.0 RC2 减轻重新安装扩展的痛苦
  • FireFTP 0.90.1.1 ^_^,在firefox中的ftp工具,其实还有一个IRC的扩展:chatzilla
  • FlashGot 0.5.9.993 调用本机下载工具
  • Flickr Sidebar 0.1.1
  • FlickrFox 1.0.0 和上边的差不多,在sidebar里边方便的浏览flickr的pp,FlickrFox的显示效果更好些,Flickr Sidebar的选项更多谢罢了
  • Forecastfox 0.8.5.3 天气预报
  • FoxyTunes 1.2 控制本地的音频播放器,支持mediamonkey、winmap、foobar、iTune等十数种音频播放器。告别在播放器和浏览器中切换的痛苦
  • FoxyTunes Skin - FS Aqua 2.0 FoxyTunes的皮肤,严格来说不能算扩展吧
  • Gmail Notifier 0.5.5.2 Gmail提醒
  • Google Safe Browsing 1.1 让那些流氓垃圾网站见鬼去吧
  • Google Web Accelerator 1.0.62.80 网页加速,代价再是多付出些内存
  • Greasemonkey 0.6.4 天才级别的插件,使用它可以改变网页在本地外观,添加附加功能……有极其丰富的用户脚本库。配合Platypus这些工具甚至可以在不懂编程的情况下实现这些功能!很多扩展都是建立在Greasemonkey的基础之上的,当然,你也可以利用它来创造自己的扩展。可以看看Dive into greasemonkey这本书
  • IE Tab 1.0.8 无可奈何,还是不得不在某些场合使用IE,譬如网上银行、考试报名之类。这就是现实啊 T_T
  • Image Zoom 0.2.3 方便的使用左键三击调出放大器放大图像,进一步放大在该状态下使用滚轮;也可以用右键和滚轮放大图像。
  • Live HTTP Headers 0.12 网页设计中检测HTTP报头的工具
  • LiveLines 0.4.5 实时发现feeds,并且自动加入所设定的feeds阅读器中
  • MeasureIt 0.3.5 网页设计者能够快速测量网页部件的大小
  • MediaPlayerConnectivity 0.5.5 强大的媒体播放工具,可以让在线播放调用本机播放器在firefox外部播放
  • MinimizeToTray 0.0.1.2006022107+ 让firefox最小化到状态栏
  • MR Tech Local Install 4.6 强大的扩展安装管理扩展(好像很绕口啊 )
  • OperaView 0.4.1 对于网页设计者来说,可以方便的比较网页在opera中的浏览效果
  • PDF Download 0.6 避免在firefox中调用Acrobat打开PDF造成的假死
  • Pearl Crescent Page Saver 1.0 网页截图
  • Performancing 1.1.1 极其好用的blogger客户端,支持Wordpress、MSN space、Blogger…………几乎所有的主流blog系统
  • Platypus 0.64 配合Greasemonkey来使用,以所见及所得WYSIWYG的方式生成greasemonkey user script来改变在本地浏览状况。譬如干掉那些讨厌的跳动广告和sidebar
  • Reveal 1.0.6 按下Alt+`新打开一个tab,是所有tab的缩页预览,动画效果。mazing,无愧为今年最佳扩展之一
  • Sage 1.3.6 rss阅读器,自从用上Google Reader之后,就受冷落了。
  • ScrapBook 1.0pre 网页抓取到本地,并能够深层挖掘,制定文件类型……而且抓取之后在本地可以加入笔记之类的功能…………完美的东西,我使用firefox最离不开的扩展之一
  • SessionSaver .2 0.2.1.031 保存对话。比较鸡肋
  • SiteAdvisor Firefox Extension 20.0 MIT开发的安全浏览扩展,让那些流氓垃圾网站继续见鬼去吧
  • Séparé 0.1.3 新生成一个tab —— separe包括上个separe之后、左右两边的tab的预览,有了Reveal后也准备卸咯。一点比较体贴的功能就是可以用它来分隔所浏览tab,并对其分类
  • Tab Mix Plus 0.3.0.5 Tab浏览增强工具
  • tor-proxy 0.2.1 懒人代理工具,不必添加代理类表并认证,点击一下图标自动帮你设置好,代价是为了使用tor再多付出些内存
  • Venkman JavaScript Debugger 0.9.86 超强JavaScript调试工具,有详细的资料在这里 中文的看
  • View Rendered Source Chart 1.5.02 方便美观的看网页源代码,层次关系一目了然,自动着色,配色很漂亮
  • Web Developer 1.0.2 网页设计者必备
  • WebmailCompose 0.6.6 调用webmail来作为系统默认邮件。
  • xyzproxy 1.14 代理工具,若想手动设置代理的话可以使用。
Installed Themes: [7]
  • amalgam 1.0.3 仿safri,质感不够
  • Firefox (default)
  • iFox 1.6.6
  • iFox Smooth 1.6.7 iFox系列是仿safri的,但是不太兼容ScrapBook。姑且留机查看
  • iPox 0.52 我的最爱,iPod风格的界面,简洁清爽干净
  • PimpZilla 3.18 太花哨了,准备卸了
  • Pinstripes, Grapes, and Apples 0.2 仿safri,老问题,质感不够,在用过真正safri甚至是Opera仿Safri的主题后,发现firefox上的界面太软,莫非是XUL和Gecko的问题?
这部分主要根据主机上所安装的软件而定,印象中我没有主动去安装过什么plugin
  • Adobe Acrobat
  • Java Plug-in
  • Microsoft? DRM
  • Mozilla Default Plug-in
  • PCMan's IE Tab Plug-in for Mozilla/Firefox
  • QuickTime Plug-in 7.0.4
  • RealJukebox NS Plugin
  • RealPlayer Version Plugin
  • RealPlayer(tm) G2 LiveConnect-Enabled Plug-In (32-bit)
  • Shockwave Flash
  • Windows Media Player Plug-in Dynamic Link Library
这就基本上就是我使用的Firefox了,其他的以后想到了补充~另附传说中的firefox 照片一张
http://i7.photobucket.com/albums/y261/tstuff/realfirefox2dv.jpg
它就是传说中的:FireFox!我喜欢它的莫西干,好彻底啊,从头到尾。彻底! Technorati Tags: ,

2006/04/05

自由是种投资

对享受自由的人来讲,自由是种压力 ;对赋予自由的人来讲:自由是种很奢侈的投资。 真正有能力这样做的公司有几家?有实力的又有谁正在这样做? 一位曾在微软工作过,现在在Google的工程师Joe这样认为:
Can 20% time work at other companies? I'm sure that there are going to be others that try. However, I think that it is important to realize that it is a result of an environment and philosophy to development more than a cause. I don't think that it is something that can be imposed in an independent way.
即使正在这样做的Google,为何不让80%的员工做本职,20%的员工去享受spare time?要么,来个40% 、50%岂不是更加活力激荡? 除了公认的二八定律之外,即使Google也只能将这种奢侈投资控制在一定范围内,毕竟作为一家成熟的公司,投资跟赌资是两码事。 既然是投资,那么必然有收益了:
  1. 原本效率较低的垃圾时间,现在可以投入自己喜欢的事情。使员工创意勃发、脑力激荡、少时高效;在这20%自驱动的时间内将得到天才员工们的20正常工作时间+无穷自由时间,据说Gulp就是Urs Hoelzle 去玻利维亚和秘鲁交界处的亚热带雨林从事植物学研究从而诞生的
  2. 20%似乎已然成为Google文化符号之一。其标榜的创意、自由、灵感早已深入人心,googleplex成为诸多geek朝圣之地,flickr更上不乏google spy在google内部偷拍的照片
  3. 员工向心力增强,内部透明、intranet共享机制同20% time 也脱不开关系
  4. 创意源头。在这20% time 诞生了n多产品:Gmail、Google Books、Google Earth、Orkut、Google“功能饮料”Gulp ……
当然,也有不买Google 20% time帐 的,比如这位微软工程师Robert 对一位Google员工tony 20% time的回应:Tony brags about Google's 20% time 颇含意味的这样说道:
So, why doesn't Microsoft have 20% time? Well, speaking for myself, if Bill Gates told me I could have 20% time I'd say "that's nice Bill, but I'm already working on what I want to work on."
不管怎样,让business充满人情味是挺好的一件事,相信没有人在获得自由的同时希望听到背后的算盘声。
Technorati Tags: ,

2006/04/04

自恋否?

http://static.flickr.com/43/121948323_15045ea6d5.jpg 答案将在回复中揭晓~

2006/03/26

用上了OPERA TP2

看到了一场无聊的、可笑的争吵,为什么总有无聊的问题让无聊的家伙们争来争去? 喜欢firefox的,趁争吵的功夫写点userscript或者插件 喜欢opera的,OPERA TP2现在可以自己来写Widgets http://my.opera.com/mark_poleon/homes/images/kill_firefox.gif——————这可不是我说得哈! 对于'opera vs firefox' 'opera 和firefox谁好' 这样无聊的问题,我的答案对于只会争吵的家伙们,就别糟蹋了,用IE去吧;对于不需要这种问题答案的人用这俩brower都一样,看心情,看场合了。 同理,对于'perl 、python、ruby、java等等等等 谁更棒?' '用ADS还是MWO?'之类问题的答案就是: 殊途同归、因势利导、随遇而安、两面三刀、过河拆桥,就是别把所有的时间都花在选择上…… P.S. 利用js、html和CSS能开发出OperaWidgets如此精致的东西,是种实在特别的诱惑啊! Technorati Tags: , , ,

2006/03/22

lifehacker

从发现了delicious popular发现了 lifehacker ,其内容包罗万象,诸如如何使 耳机线不再乱成一团、怎样快速做一个吸管杯等等等等,好玩,有趣,有的还冒了点聪明的傻气。
http://blogumentary.typepad.com/photos/uncategorized/lifehacker.jpg
用Sage订阅了它的RSS后发现它的介绍,发人深省: Computers make us more productive. Yeah, right. Lifehacker recommends the downloads, web sites and shortcuts that actually save time. Don't live to geek; geek to live. 从它的推荐列表又发现了这样几个地方: Slacker ManagerThe Lazy Way to SuccessWorking Smartlifehacker.org 崇尚的一种Smart Lazzy Hard work is passé. The paradigm-shifting concept is "Smart Laziness" – where success comes through cleverly avoiding work but still getting the job done. In this oasis, we celebrate those magical ways where doing less accomplishes more. 看来,重要的是Smart,并不是Lazzy 人类需要hacker Technorati Tags: , , ,

2006/03/21

TrackBack from my honey

听出来了,夸我呢~嘿嘿! 病快点好吧 fox就要掉毛了 喷嚏有得打的 Technorati Tags: ,

新书到手

http://images.amazon.com/images/P/0596002815.01._SCLZZZZZZZ_.jpg
找了很久的书拿在手里的感觉 真的很舒服 想起疯子读书的怪僻;想到从前写了很多的代码,可是从来没有从头到尾看完一本教材。也许看的最多的就是代码和pydoc,给自己一个机会看完一本书吧。 恩,真的很舒服 非借不能读的不仅仅是书;不能的的书也不一定不是借的 PS: O'REILLY、ARTECH 这些出版商的东西有好多值得收藏的精品,可是,哪来那么多银子啊?有银子上哪卖啊?决心自己卖台牛x打印机,把喜欢的书都印出来…… Technorati Tags: , ,

2006/03/19

VIM TIP32

VimTip 32: Write your own vim function(scripts) 编写自己的vim函数 compare to C and shell(bash), herein is some vim specifics about vim-script: 相对于C和shell(bash)编程,这里有些vim脚本的细节要注意: 1. A function name must be capitalized. 1. 函数名必须大写 hex2dec is invalid Hex2dec is valid hex2dex是非法的 Hex2dec是合法的 while in c and shell(bash), both lowercase and uppercase is allowed. 但是在C或bash shell中,无论大小写都是可以的。 2. how to reference the parameters 2.如何传递参数

fu! Hex2dec(var1, var2) let str=a:var1 let str2=a:var2
you must prefix the parameter name with "a:", and a:var1 itself is read-only 你必须在参数前加前缀a:,并且a:var1是只读的 in c, you reference the parameter directly and the parameter is writable. 在C中,你直接调用参数并且参数是可读的 3. how to implement variable parameter 3. 如何执行变量
fu! Hex2dec(fixpara, ...)
a:0 is the real number of the variable parameter when you invoke the function, with :Hex2dec("asdf", 4,5,6), a:0=3, and a:1=4 a:2=5 a:3=6 当调用函数,a:0 是实数变量 you can combine "a:" and the number to get the value 你可以混合“a:"和数字来取得函数值
while i exe "let num=a:".i let i=i+1 endwhile
in c, the function get the real number by checking the additional parameter such as printf family, or by checking the special value such as NULL c中,函数取值是通过检验额外得参数比如printf族,或者检测特定得值是否为空 4. where is the vim-library 4.vim的库在哪? yes, vim has its own function-library, just like *.a in c :help functions 是的,vim有它自己的函数库,就像c语言中的*.a文件 :help functions 5. can I use += or ++ operator? 5.我可以使用+=或者++这样的操作符吗? Nop, += and ++ (and -=, -- and so on)operator gone away in vim. 遗憾的是vim没有类似+=和++这样的操作符(-=,--这些也是) 6. How can I assign a value to a variables and fetch its value? 6.如何分配变量置并取取其值呢?
let var_Name=value let var1=var2
like it does in c, except you must use let keyword 除了必须用关键字let以外,就像在c中做的一样。 7. Can I use any ex-mode command in a function? 7. 我可以在ex模式下调用函数吗? As I know, yes, just use it directly, as if every line you type appears in the familar : 据我所知,是的,可以直接用,就像每行都是你在熟悉的后输入的一样 8. Can I call a function recurse? 8. 可以使用递归调用吗? Yes, but use it carefully to avoid infinte call. 可以,但是要小心,避免无穷调用! 9. Can I call another function in a function? 9. 可以在函数中调用函数吗? Course, like C does. 当然,就像C一样 10. Must I compile the function? 10. 我必须编译函数吗? No, you needn't and you can't, just :so script_name, after this you can call the function freely. 不,你没必要也不能,仅仅:so script_name,之后就可以自由调用该函数了 11. Is it has integer and char or float data type? 11. 有整型,字符,浮点这样的数据类型吗? No, like perl, vim script justify the variable type depend upon the context 没有,就像perl,vim脚本自动根据变量值调整变量类型
:let a=1 :let a=a."asdf" :echo a
you'll get `1asdf' 将得到 `1asdf'
:let a=1 :let a=a+2 :echo a
you'll get 3 将得到 3 But it differs from perl. 但是它和perl有区别 12. Must I append a `;' in every statement? 必须在每一句后边加';'吗? No, never do that. 不,没必要 ; is required in C, and optional in shell for each statement in a alone line. ;在C是必须的,在shell中一行中的每一句是可选的 But is forbidden in vim. 但是在vim是禁止的 if you want combine servals statement in one single line, use `|'. 如果想在单行里边写多句,使用‘|' Take your mind that every statement appears in function should be valid in ex-mode(except for some special statement). 谨记除少数特殊声明外,函数中每一句都可以在ex模式下合法可用 Technorati Tags: ,

2006/03/18

Python for S60

Python for S60 brings the power and productivity of the Python programming language to the S60 platform. These snippets make your phone be really SMART!

read more | digg story

Technorati Tags: , ,

2006/03/11

累了。

该歇歇了 so......
Technorati Tags:

2006/02/26

司马迁罗贯中怒斥陈凯歌:人不能无耻到这样的地步

路边社猴年马月讯 根据《史记·刺客列传》部分内容改编制作的电影《荆柯刺秦王》风靡一时,“好评如潮”。当然这样的“好评”,让《史记》作者司马迁感到难堪。

日前现身天国历史研究会的司马迁在接受媒体采访时谈到“荆轲”,明显激动起来:“我们已经起诉他了,我们一定要起诉而且就这一问题要解决到底。”说完这句,又觉得意犹未尽:“我觉得人不能无耻到这样的地步。”

随着《荆轲》的走红,隐藏在神秘银幕之后的导演陈凯歌也迅速被媒体“揪了出来”。不过,因为《荆轲》以《史记》的故事片断为素材,再重新改编并加上了故事里本来没有的内容,恶意扭曲了作者司马迁的本意,一些律师认为,它已经侵犯了历史作品《史记》的著作权,陈凯歌也可能会面临《史记》的官司。不过,对于这一点,身为一名著名的、让人一碰就骂声相向的陈凯歌却一再声称,自己的作品纯粹出于商业目的,就算存在侵权一说,你司马迁能把我如何?

司马迁先生已经委托宋世杰、陈梦吉、方唐镜等著名律师介入此案,虽然司马迁在天国表示已起诉陈凯歌,但宋律师表示,目前尚未进入起诉程序。律师事务所接受司马迁的委托,首先对“荆柯刺秦王”是否对《史记》构成侵权做了法律评估。评估结果为侵权,于是向传播“荆轲刺秦王”的“中影”等两家公司和陈凯歌发出律师函,要求立即禁播“荆轲刺秦王”、在各大报刊发表道歉声明并支付一定赔偿金。目前公司已按要求进行了禁播,但尚未道歉。当然,对于禁播也是一句空话,因为这部片子早已被影迷们遗忘到脑后了。

对于为什么选择《荆柯刺秦王》而不是另一部陈凯歌更知名的电影《霸王别姬》进行起诉,司马迁先生认为:“首先,那部片子的成功,不是陈本人的功劳,而是李碧华女士的故事好,而芦苇先生改编的剧本也功不可没。再加上陈本人还是有一点点功底的,因此那部片子还是值得一看,陈凯歌这辈子还是给人留下了一点东西,如果连这个都给它抹杀,那他就等于一事无成了,起诉一个一事无成的人又有什么意思?”而对于近来盛传的陈凯歌起诉胡戈的事件,司马迁先生如此评论:“人不可以无耻到这种地步,身为一个强势方,向弱势一方施加如此莫须有的罪名,是他做人上的失败,再说的重一点,这个简直就是道德沦丧!”

据悉,《三国演义》的作者罗贯中先生也对此案持观望态度。因为陈凯歌的《吕布与貂蝉》也对他作品中的部分情节进行了改编。在接受采访时,罗先生认为:“扣帽子的行为太让人恶心!如果说胡戈改编他的东西就算是无耻,那他改编甚至扭曲我们的东西又算是什么行为?要扣帽子谁不会扣?我也会!说得重一点,他的电影里让一个中国女人在一个日本男人的身子底下婉转承欢,这又是什么行为?汉奸吗?”意识到自己的观点可能有些过,罗先生语气缓和了一下,“当然,我们绝不会从这一点上给陈凯歌扣大帽子,焚书坑儒和文化大革命的时代已经过去了,艺术不可以如此霸道。”“做人要厚道。”罗贯中先生补充道。


关于此案的进程,本报将做追踪报道。


声明:笔者将不会从这篇东西中获得什么经济利益;其次,热烈欢迎陈凯歌先生把我告上法庭。谢谢!


Technorati Tags: ,

2006/02/24

Life in the Googleplex!

TIME Photo Essay: Life in the Googleplex: Inside Google Headquarters . Googlers are permitted to bring their dogs (but not cats) to the workplace. . PHOTO BY EROS HOAGLAND / REDUX FOR TIMETIME Photo Essay: Life in the Googleplex: Inside Google Headquarters  . The work-weary can unwind with a massage from a professional.  Google subsidizes the cost.. PHOTO BY EROS HOAGLAND / REDUX FOR TIMETIME Photo Essay: Life in the Googleplex: Inside Google Headquarters  . Desktop gizmos and lava lamps, express Google's laid-back ethos.. PHOTO BY EROS HOAGLAND / REDUX FOR TIMETIME Photo Essay: Life in the Googleplex: Inside Google Headquarters  . Laptop of the fritz? Google keeps experts on-site to fix computers and other digital gadgets.  . PHOTO BY EROS HOAGLAND / REDUX FOR TIMETIME Photo Essay: Life in the Googleplex: Inside Google Headquarters  . A lifeguard sits on duty as a Google employee works out in one of two swim-in-place pools that the company maintains at its Mountain View, California, headquarters.. PHOTO BY EROS HOAGLAND / REDUX FOR TIMETIME Photo Essay: Life in the Googleplex: Inside Google Headquarters . Two employees break for coffee beside the  board, a canvas for playfully grand designs like Google spaceships.. PHOTO BY EROS HOAGLAND / REDUX FOR TIMETIME Photo Essay: Life in the Googleplex: Inside Google Headquarters . Googlers can shoot pool while taking a break in one of several employee lounges.. PHOTO BY EROS HOAGLAND / REDUX FOR TIMETIME Photo Essay: Life in the Googleplex: Inside Google Headquarters . Google contracts with stylists to give its employees cut-rate haircuts. . PHOTO BY EROS HOAGLAND / REDUX FOR TIMETIME Photo Essay: Life in the Googleplex: Inside Google Headquarters . Google employees take an afternoon volley ball break. The corporation's Mountain View campus is at once a flurry of playful activity and creative technological innovation. . PHOTO BY EROS HOAGLAND / REDUX FOR TIMETIME Photo Essay: Life in the Googleplex: Inside Google Headquarters . Google is obsessive about food, offering its employees three free gourmet meals a day that can be eaten in a cafeteria adorned by artwork created by Google employees.. PHOTO BY EROS HOAGLAND / REDUX FOR TIMETIME Photo Essay: Life in the Googleplex: Inside Google Headquarters . There are toys for employees' children and for the young-at-heart Googlers like this one. . PHOTO BY EROS HOAGLAND / REDUX FOR TIME Cool!Fantastic!They say BE YOURSELF in Googleplex.That's true meaning of life and work.
Technorati Tags: ,

2006/02/16

VIM TIP34

VimTip 34: control the position of the new window
控制新窗口的位置

:se splitbelow
make the new window appears below the current window.
在当前窗口下方打开新窗口
:se splitright
make the new window appears in right.(only 6.0 version can do a vsplit)
在当前窗口右方打开新窗口(只有在6.0版 可使用vsplit)


Technorati Tags: ,

2006/02/15

VIM TIP33

VimTip 33: toggle off the line-number when enter on-line help
在帮助文档里关闭行号

I like the line-number for myself editing. But I hate it in on-line help page because it force the screen wrapped.
我喜欢在自己编辑时有行号。但是我讨厌在帮助文档里边的行号,因为这样使屏幕转行了。
:au filetype help :se nonu



Technorati Tags: ,

2006/02/13

VIM TIP31

VimTip 31: Find and Replace 查找替换 To find and replace one or more occurences of a given text pattern with a new text string, use the s[ubstitute] command. 为了查找替换文中出现过的一个或多个文本串,使用s命令 There are a variety of options, but these are what you most probably want: 有很多可选的变量,看看什么是你最需要的: :%s/foo/bar/g find each occurance of 'foo' and replace it with 'bar' without asking for confirmation 不确认替换每一个foo为bar :%s/foo/bar/gc find each occurance of 'foo' and replace it with 'bar' asking for confirmation first 首次向用户确认并替换每一个foo为bar :%s//bar/gc find (match exact word only) and replace each occurance of 'foo' with 'bar' 将一个词foo替换为bar :%s/foo/bar/gci find (case insensitive) and replace each occurance of 'foo' with 'bar' 大小写不敏感替换foo为bar :%s/foo/bar/gcI find (case sensitive) and replace each occurance of 'foo' with 'bar' 大小写敏感替换foo为bar NB: Without the 'g' flag, replacement occurs only for the first occurrence in each line. NB: 没有g选项的话,仅仅替换每行的第一个匹配项 For a full description and some more interesting examples of the substitute command refer to 想知道替换详细的解释和一些有趣的例子请参考 :help substitute See also: 或者: :help cmdline-ranges :help pattern :help gdefault Technorati Tags: ,

2006/02/08

VIM TIP30

VimTip 30: Increasing or decreasing numbers 递增或递减数字 To increase a number under or nearest to the right of the cursor, go to Normal mode and type: 在一般模式下可以这样来递增光标下或最靠近光标右侧的数字: Ctrl-A To decrease, type: 递减可以使用: Ctrl-X Using this in a macro simplifies generating number sequences a lot. 使用这样的宏可以简化对数字序列的操作。 Technorati Tags: ,

VIM TIP28

VimTip 28: add a line-number to every line without cat or awk alike utilities.
不使用cat或awk等在添加每行都添加行号

With Unix-like environment, you can use cat or awk to generate a line number easily, because vim has a friendly interface with shell, so everything work in vim as well as it does in shell.
在类Unix环境下,你可以轻松的使用cat或awk产生行号,因为vim与shell有友好的接口,所以同样可以在vim中执行shell中的操作。
:%!call -n
or
:%!awk '{print NR,$0}'

But, if you use vim in MS-DOS, of win9x, win2000, you loss these tookit.here is a very simple way to archive this only by vim:
但是,如果你在MS的系统下,你将无法使用这些工具。下边是仅靠vim来实现上述功能的方法:
fu! LineIt()
exe ":s/^/".line(".")."/"
endf

Well, a sequence composed with alphabet is as easy as above:
那么,压缩为一行包括同样简单:
exe "s/^/".nr2char(line("."))."/"


Technorati Tags: ,

VIM TIP29


VimTip 29: reverse all the line with only 7 keystroke in vim
使用7个键反转所有行

:g/^/m0
well,
1. : bring you to command-line mode(also known as ex-mode) from normal-mode(also known as command mode).
1. : 使你从一般模式进入命令行
2. g means you'll take an action through the whole file, generally perform a search, `v' also perform a search but it match the line not match the canonical expression.
2.g 表明作用域将是整个文件,一般使用在搜索中。'v'也在搜索中使用但是不能使用正则表达式。
3. / begins the regular express
3./开始正则表达式
4. ^ is a special character respect the start of a line.
4. ^使表示行首的元字符
5. the second / ends the regular express and indicate that the remains is action to do.
5. 第二个/在正则表达式的末尾,并表明有后续操作
6. m means move, `t` and `co' for copy, `d' for delete
6. m 表示移动,'t' 和'co'表示复制,d为删除
7. 0 is the destination line.
7. 0 是目标行号
you can use
你可以使用
:g/regexp/t$
to filter all lines and pick the match line together and copy them to the end of the buffer or
为了过滤所有的行并全部取出匹配行到buffer中
:g/regexp/y A
to put them into a register(not eax, ebx...)
将过滤出的匹配项放入寄存器(非汇编中的eax、ebx)


Technorati Tags: ,

2006/02/07

VIM TIP27

VimTip 27: Convert hex to dec


when you check the output of objdump, you'll confused by the $0xFFFFFFc operand, this function translate the hexcamal to decimal.
当查看objdump的输出时,你将被$0xFFFFFFc之类的符号所迷惑,下边这个函数将把十六进制转为十进制。
function! Hex2Dec()
let lstr = getline(".")
let hexstr = matchstr(lstr, '0x[a-f0-9]+')
while hexstr != ""
let hexstr = hexstr + 0
exe 's#0x[a-f0-9]+#'.hexstr."#"
let lstr = substitute(lstr, '0x[a-f0-9]+', hexstr, "")
let hexstr = matchstr(lstr, '0x[a-f0-9]+')
endwhile
endfunction
usage:
5,8call Hex2Dec()


Technorati Tags: ,

2006/02/06

VIM TIP26

VimTip 26: Getting rid of ^M - mixing dos and unix
清除混乱的dos/unix格式换行

If you work in a mixed environment you will often open files that have ^M's in them. An example would be this:
如果你在混合环境下工作的话,你将常常碰到打开的文件中含^M的情况。如下例所示:
------------------------------------------------------------------
import java.util.Hashtable; ^M
import java.util.Properties; ^Mimport java.io.IOException;
import org.xml.sax.AttributeList; ^M
import org.xml.sax.HandlerBase; ^Mimport org.xml.sax.SAXException;

/**^M
* XMLHandler: This class parses the elements contained^M
* within a XML message and builds a Hashtable^M

[snip]
------------------------------------------------------------------

Notice that some programs are not consistent in the way they insert the line breaks so you end up with some lines that have both a carrage return and a ^M and some lines that have a ^M and no carrage return (and so blend into one). There are two steps to clean this up.
值得注意的是一些程序没有以本方法识别出换行符,所以在行尾有的是回车符、有的用^M换行(有的两个混合)。这里有这么两种办法来清理文件
1. replace all extraneous ^M:
1.替换所有的无用^M
:%s/^M$//g

BE SURE YOU MAKE the ^M USING "CTRL-V CTRL-M" NOT BY TYPING "CARROT M"! This expression will replace all the ^M's that have carriage returns after them with nothing. (The dollar ties the search to the end of a line)
确定 ^M是使用 "CTRL-V CTRL-M" 而不是字面上的 ^M。这个正则式将替换所有回车符前的 ^M为空($是为了保证^M出现在行尾)
2. replace all ^M's that need to have carriage returns:
2.替换所有的^M
:%s/^M//g

Once again: BE SURE YOU MAKE the ^M USING "CTRL-V CTRL-M" NOT BY TYPING "CARROT M"! This expression will replace all the ^M's that didn't have carriage returns after them with a carriage return.
再次注意:确定 ^M是使用 "CTRL-V CTRL-M" 而不是字面上的 ^M。这个正则式将替换所有没有回车符的^M为回车符。
Voila! Clean file. Map this to something if you do it frequently.
瞧!干净多了。如果常常这样操作的话映射成命令。
:help ffs - for more info on file formats
:help ffs -有更多的信息
thanks to jonathan merz, douglas potts, and benji fisher
多谢了: jonathan merz douglas potts benji fisher


Technorati Tags: ,

2006/02/05

VIM TIP25

VimTip 25: color highlighting on telnet (esp w/ SecureCRT)
在telnet中色彩高亮

The following settings in .vimrc will enable color highlighting when using SecureCRT and may work on other telnet packages. The terminal type should be selected as ANSI and color enabled.
当使用SecureCRT或其他的telnet包时在.vimrc中进行如下配置可以色彩高亮。终端必须选择ANSI并且激活色彩选项。

if !has("gui_running")
set t_Co=8
set t_Sf=^[[3%p1%dm
set t_Sb=^[[4%p1%dm
endif




Technorati Tags: ,

2006/02/04

VIM TIP22

VimTip 22: handle common typos for :commands 命令模式下的等价录入 I frequently hold the shift key for too long when typing, for instance :wq, and end up with :Wq. Vim then whines "Not an editor command: Wq" 我时常在输入的时候按住shift键,比如:wq当以:Wq录入时,Vim会提示“无:Wq命令”的错误 In my .vimrc, I have taught vim my common typos: 在我的.vimrc配置中,我讲设置如下等价录入 command! Q quit command! W write command! Wq wq this one won't work, because :X is already a built-in command command! X xit 如果不生效的话,那是应为:X已然是内置的命令!X xit了。 Technorati Tags: ,

VIM TIP24

VimTip 24: changing the default syntax highlighting 改变默认语法高亮 Here are some pointers to the vim documentation. Notice that the mechanism is different in vim 6.0 and vim 5.x. 这有一些vim文档的指导。注意其中vim6.0和5.x版本的构架区别。 1. I want *.foo files to be highlighted like HTML files. 1.我希望*.foo 文件按照HTML文件进行语法高亮。 :help new-filetype http://www.vim.org/html/autocmd.html#new-filetype 2. I want to define a syntax file for *.bar files. Read the above and also 2. 我希望定义一个*.bar语法高亮文件。请参考上边文件 :help mysyntaxfile http://www.vim.org/html/syntax.html#mysyntaxfile 3. I want to make a few changes to the existing syntax highlighting. Depending on the x in 5.x, either read the above and page down a few screens, or you may be able to skip right to 3. 我希望对已有的语法高亮文件进行一些改变。在5.x环境下的x,阅读以上的文件和下文,或者直接跳到 :help mysyntaxfile-add http://www.vim.org/html/syntax.html#mysyntaxfile-add 4. I want to change some of the colors from their defaults. Again, read 4.我想改变默认语法高亮的颜色配置。请读: :help mysyntaxfile http://www.vim.org/html/syntax.html#mysyntaxfile Technorati Tags: ,

2006/02/03

VIM TIP23

VimTip 23: Vim xterm title Vim x终端标题 Check out your .vimrc. If 'set notitle' is an entry, comment it out with a quotation mark ("). Now your xterm should inherit the title from Vim. 检查你的配置文件.vimrc.如果设置了set notitle, 请用" 注释掉。现在在图形界面x终端下可以显示Vim的标题了 e.g. 'Vim - ~/.vimrc'. This can be quite nice when programming and editing lots of files at the same time. by [jonasbn@wanadoo.dk] 例如:Vim-~/.vimrc . 这样在编程和编辑多个文件时会非常方便。 Technorati Tags: ,

2006/02/02

VIM TIP21


VimTip 21: easy pasting to windows apps
方便的粘贴到Windows应用程序

In Vim, the unnamed register is the " register, and the Windows Clipboard is the * register. This means that if you yank something, you have to yank it to the * register if you want to paste it into a Windows app.
在Vim中,未命名的寄存器是" register,而在Windows中是* register。这意味这如果你粘贴一些东西,你必须从* register
中粘贴到Windows 应用程序中。
If this is too much trouble, set the 'clipboard' option to 'unnamed'. Then you always yank to *.
如果这样太麻烦的话,设置'clipboard'选项为'unnamed'。这样你全部是从* 中粘贴
So pasting to windows apps doesn't require prefixing "* :
这样粘贴到windows应用程序中不需要前缀*
set clipboard=unnamed


Technorati Tags: ,

VIM TIP20

VimTip 20: Are *.swp and *~ files littering your working directory?
清理swp、~文件

Have you ever been frustrated at swap files and backups cluttering up your working directory?
你曾有过被工作目录中的缓存文件swp和备份文件~所烦恼的时候嘛?
这就是一活生生的例子:
Untidy:
ons.txt
ons.txt~
README
README~
tester.py
tester.py~

Here are a couple of options that can help:
这是一些能够起到改善的选项:
set backupdir=./.backup,.,/tmp
set directory=.,./.backup,/tmp


This way, if you want your backups to be neatly grouped, just create a directory called '.backup' in your working directory.
这样,如果你想将你的备份文件整齐的分类,在工作目录中创建.backup的目录
Vim will stash backups there. The 'directory' option controls where swap files go. If your working directory is not writable,
Vim will put the swap file in one of the specified places.
Vim将在其中备份。directory选项控制缓存文件的位置。如果你的工作目录不是可写的,Vim将在一个给定的目录中放置缓存文件。

Technorati Tags: ,

VIM TIP19



VimTip 19: line numbers...
行号

I have started doing all my code reviews on a laptop because of the number command.
由于行号我在我的膝上电脑完成了我所有的代码回顾。
:set number will put line numbers along the left side of a window
:set number将在窗口的左侧放置行号

:help number


Technorati Tags: ,

2006/01/27

VIM TIP17

VimTip 17: Erasing previosuly entered characters in insert mode
在插入模式删除先前录入字符


In insert mode, to erase previously entered characters, set the following option:
在插入模式下,删除先前字符可以做以下设定:
set backspace=2

By default, this option is empty. If this option is empty, in insert mode, you can not erase characters entered before this insert mode started. This is the standard Vi behavior.
默认此选项为空。如果选项为空的话,在插入模式,你将无法删掉录入的字符除非你打开backspace。这是标准的VI行为#莫非俺的vi为非标准的非传统的?有可能,我测试结果使在windows下的gvim6.4 backspace为空亦能够删除字符
To get more help on this, use
更多帮助请看:
:help 'backspace'

#奇怪?根据帮助我的backspace的默认值indent, eol, start,即backspace =2。所以嘛,传统也是要改变的……


Technorati Tags: ,

2006/01/25

VIP TIP14

VimTip 14: Highlighting all the search pattern matches 高亮显示所有搜索匹配项 To highlight all the search pattern matches in a file set the following option: 高亮显示所有搜索的匹配项可以通过命令 :set hlsearch After this option is set, if you search for a pattern, all the matches in the file will be highlighted in yellow. 这样设定后高亮显示所有搜索的匹配项#又唐僧了不是?! To disable the highlighting temporarily, use the command 暂时废除高亮使用命令 :nohlsearch This command will remove the highlighting for the current search.The highlighting will come back for the next search. 命令可以取消当前搜索的高亮。下次搜索还会高亮 To disable the highlighting completely, set the following option: 废除高亮使用命令 :set nohlsearch By default, the hlsearch option is turned off. 默认高亮搜索是关闭的#我的是开启的,哈哈 To get more help on this option, use 想知道更多,请查阅帮助 :help 'hlsearch' :help :nohlsearch Technorati Tags:

VIM TIP15

VimTip 15: Displaying status line always
总是显示状态行

To display the status line always, set the following option in your .vimrc file:
总是显示状态行,在配置文件中加入:
set laststatus=2

The advantage of having the status line displayed always is, you can see the current mode, file name, file status, ruler, etc.
总是显示状态行的优点就是可以随时看到文件名,及其状态和标尺等等信息。
To get more help on this, use
更多信息请查阅帮助

:help laststatus



Technorati Tags:

2006/01/24

上帝与Google,玉帝与Baidu

最早的时候,上帝很无聊,平时只能看看电视听听广播,偶尔玩玩超级玛丽,再就是和圣母玛丽亚通通电话.时间长了,这种生活越发枯燥.上帝觉得这样的生活太乏味,于是他说:“要有网”.然后就有了互联网,计算机都可以连在一起,这是第一天.  
  光是有互联网也不行,起码得有点东西看吧。上帝说:“要有网站”。然后就有了全世界各种各样的大小网站,上帝在网站上看新闻、看图片,顺便还到论坛上发发贴,觉得互联网有些意思,这是第二天。  
  圣母玛丽亚看上帝这两天没怎么打电话,比较生气,威胁上帝说要把互联网毁了,上帝觉得这样不好,于是上帝说:“要有即时通讯”。然后就有了即时通讯软件,上帝和圣母玛丽亚在互联网上视频语音聊天,圣母玛丽亚也觉得互联网很好玩,这是第三天。  
  网站的数量太多了,也不知道那个网站更好看,上帝觉得这样太杂乱,于是上帝说:“要有导航网站”,然后就有了导航网站,上帝觉得分类目录挺好的,这是第四天。  
  没想到,网站越来越多,网页也越来越多,找分类目录都找不过来了,上帝觉得比较郁闷,心想找个东西怎么这么难呢?但这难不倒上帝,上帝说:
“要有搜索引擎”,然后就有了搜索引擎,上帝使用搜索引擎,很快的就可以找到自己想要的东西,上帝觉得非常有成就感,这是第五天。  
  在第一天上帝搞互联网的时候,远在天界东边的玉皇大帝就从千里眼和顺风耳那里得到了线报。玉帝有点迷惑,“这哥们搞什么东东呢?”问了所有神仙,大家都不知道,玉帝觉得这样不行,我们得与时俱进,向西方学习。玉帝说:“要有中国互联网”。于是中国也有了互联网。  
  第二天,玉帝上互联网,全是英文网站,除了图片以外,什么都看不懂,玉帝很头大。玉帝说:“要有中文网站”。于是中文网站雨后春笋般的出现了。  
  第三天,玉帝不爽了,为什么?联系不方便啊,还是要叫千里眼和顺风耳,丫的,太麻烦了,可是ICQ、MSN都是英文的啊?玉帝说:“要有中文的及时通讯。”于是有了QQ。玉帝玩上了QQ,跟王母娘娘聊的很开心。  
  第四天,中文网站也太多了,看的玉帝眼花缭乱,心情也比较烦乱,就问太白金星怎么办。太白金星这个老家伙说:“好,一得给他们分类,二得推荐
些好网站,三得经常有新东西……”玉帝觉得他很罗嗦。玉帝说,你说什么“好一二三”?然后,hao123就解决了玉帝和中国大众上网导航的问题。    
/>白金星凑过来说,上帝那有个Google,挺不错的,推荐你用用。于是玉帝上Google,一眼看过去,全是英文的,玉帝直接爆炸了,回头把太白金星骂了
个狗血喷头:“你这什么馊主意?让我用他们搞的东西?没听过国货当自强吗?这个玩意我们得自己搞!”玉帝转过身问文曲星该怎么办,文曲星慢条斯里的吟开场
白:“众里寻她千百度,那人却在……”,玉帝说:“千你个头啊,百度!”这一瞬间,百度中文搜索引擎诞生了!  
  玉帝很满意百度。在百度,不但可以便捷的找到想要的信息,还可以在百度mp3搜索上找些小曲听听,更可以躲开王母偷偷的在百度图片搜索弄几张
嫦娥的写真照片看看,更绝的,是玉帝在百度贴吧开了个“玉皇大帝”吧来了解天下百姓对自己的歌功颂德——而这些是Google所没有的。时间长了,甚至在
众神仙为某个事上吵个不停的时候,玉帝就会说:“有问题,百度一下!”然后就没问题了。  
  然而众神仙不明白,为什么玉帝不喜欢同样有中文版的Google,仅仅因为百度更符合中国大众使用习惯吗?后来,玉帝终于自揭谜底:这些洋网站总说用户是上帝,用户是上帝,用户真的是上帝?在中国,用户是玉帝!”大家恍然大悟。

Technorati Tags:

VIM TIP8

VimTip 8: Jumping to the declaration of a local/global variable

'gd' command To jump to the declaration of a local variable in a C program, position the cursor on the name of the variable and use the gd command.
gd 在c语言中就是跳到光标下本地变量的声名处
'gD' command: To jump to the declaration of a global variable in a C program, position the cursor on the name of the variable and use the gD command.
gD 在c语言中就是跳到光标下全局变量的声名处
#其实啊,在普通的文件中我觉得两个命令跟*和#基本上是一样的
My del.icio.us Tags




Technorati Tags:

VIM TIP13

VimTip 13: Incremental search 增强版搜索 To move the cursor to the matched string, while typing the search string, set the following option in the .vimrc file: 在输入关键字的时候移动光标到匹配词,可以在配置文件中添加 set incsearch You can complete the search by pressing the Enter key. To cancel the search, press the escape key. 可以通过按Enter完成搜索,ESC取消搜索 #又是挺无聊的一个技巧 Technorati Tags:

VIM TIP12

VimTip 12: Converting tabs to spaces 让制表符变成空格 To insert space characters whenever the tab key is pressed, set the 'expandtab' option: 想要按下TAB的时候插入的是空格的话,请做如下设定: set expandtab With this option set, if you want to enter a real tab character use Ctrl-V key sequence. 在此设定下,想要输入真正的TAB制表符,用Ctrl-V #说实话,这条tip似乎没有什么用啊~用ts什么的停方便的啊 Technorati Tags:

VIM TIP11

VimTip 11: Completing words quicky in insert mode 自动单词补全 In Insert mode, press the Ctrl-p or Ctrl-n key to complete part of a word that has been typed. 在插入模式下,Ctrl-pCtrl-n 可以补全已经录入单词 This is useful while typing C programs to complete long variable and function names. This also helps in avoiding typing mistakes. 很有用在编程过程中有长的变量或函数名时,也可以有效的避免拼写错误 Note that using the 'complete' option, you can complete keywords defined in one of the include files, tag file, etc. 值得注意的时,使用补全模式,可以补全在include文件或tag文件中的单词 To get more help on this, use 想知道更多,请查阅帮助 :help i_Ctrl-N :help i_Ctrl-P :help ins-completion :help complete Technorati Tags:

VIM TIP10

VimTip 10: Jumping to previosuly visited locations in a file 跳转到文件先前浏览过的位置 Vim remembers all the locations visited by you in a file in a session. You can jump to the older locations by pressing the Ctrl-O key. You can jump to the newer locations by pressing the Ctrl-I or the key. Vim 记得在编辑过程中光标所有的移动位置。可以通过Ctrl-O 来跳转先前位置,Ctrl-I 可以跳转到后来的位置。 #经试验,似乎两个命令发生打开历史文件的作用。类似浏览器中的前进、后退命令。 To get more help on these keys, use 想知道更多,请查阅帮助 :help CTRL-O :help CTRL-I :help jump-motions Technorati Tags:

VIM TIP9

VimTip 9: Displaying a variable/macro definition
显示变量、宏定义


To display the definition of a variable, place the cursor on the variable and use the [i command. To display a macro definition, place the cursor on the macro name and use the [d command.
显示变量、宏定义可将光标放在变量下用[i 命令。宏定义使用[d
Note that these commands will work most of the time (not all the time).
以上命令在绝大多数场合都使用(非所有)#唐僧了吧又
To get more help on these commands, use
想知道更多,请查阅帮助
:help [i
:help [d

Technorati Tags:

Technorati Tags:

2006/01/23

VIM TIP8

VimTip 8: Jumping to the declaration of a local/global variable



'gd' command:
To
jump to the declaration of a local variable in a C program, position
the cursor on the name of the variable and use the gd command.
gd 在c语言中就是跳到光标下本地变量的声名处
'gD' command:
To
jump to the declaration of a global variable in a C program, position
the cursor on the name of the variable and use the gD command.
gd 在c语言中就是跳到光标下全局变量的声名处
#其实啊,在普通的文件中我觉得两个命令跟*和#基本上是一样的
My del.icio.us Tags

VIM TIP6

VimTip 6: Using the % key 使用% The % key can be used %是很有用的!

  1. To jump to a matching opening or closing parenthesis, square bracket or a curly brace i.e. ([{}])
  2. To jump to start or end of a C-style comment /* */.
  3. To jump to a matching #if, #ifdef, #else, #elif, #endif C preprocessor conditionals.
  1. 找到匹配得括号
  2. 找到匹配得c语言风格注释/**/
  3. 找到匹配得c语言预处理块#if, #ifdef,#else, #elif, #endif
To get more information about this, do 想知道更多,请查阅帮助: :help % The % key can be extended to support other matching pairs by modifying the "matchpairs" option. Read the help on 当然,%也可以通过扩展来增加对其他匹配对得匹配查找,想知道请: :help matchpairs
My del.icio.us Tags

VIM TIP7

VimTip 7: Jumping to the start and end of a code block 在代码块中头尾间的跳跃 To jump to the beginning of a C code block (while, switch, if etc),use the [{ command. 跳到代码块头,用[{ To jump to the end of a C code block (while, switch, if etc),use the ]} command. 跳到代码块头,用]} The above two commands will work from anywhere inside the code block. 上边两个命令在代码块中的任何地方都适用 To jump to the beginning of a parenthesis圆括号 use the [( command. 跳到 To jump to the end of a parenthesis圆括号 use the ]) command. To get more help on these commands, do 想知道更多,请查阅帮助
:help [{ :help ]} :help [( :help ])
My del.icio.us Tags

VIM TIP5

VimTip 5: Quickly searching for a word 快速单词搜索技巧 To search for a word under the cursor in the current file you can use either the "*" or "#" keys. 可以用“*”或“#”来搜索光标下的单词 The "*" key will search for the word from the current cursor position to the end of the file. The "#" key will search for the word from the current cursor position to the top of the file. “*”是下文搜索,“#”是上文搜索。 Note that the above two keys will search for the whole word and not the partial word. This is equivalent to using the pattern in the search commands (/ and ?). 注意以上*和#两种用法同/ 和?的用法都是,用来查找整词而不是检索词是被包含在其中单词 To search for partial matches, you can use the "g*" and "g#" keysequence. 找检索词被包含在检索结果中单词 可以用g*和g# You can also use the mouse to search for a word. 同样可以用鼠标来搜索单词 This will only work in the GUI version of VIM (gvim) or a console version of VIM in an xterm which accepts a mouse. 当然实在gvim或支持鼠标的xterm类似的终端环境下 Also, the 'mousemodel' should be set to 'extend'. Add the following line to your .vimrc: 想用的话当然得扩展一下 。在配置文件中加: set mousemodel=extend To search for a word under the cursor from the current cursor position to the end of the file, press the shift key and click on the word using the left mouse button. To search in the opposite direction, press the shift key and click on the word using the the right mouse button. 这样就可以使用shift+左键来搜索下文中光标下得单词咯,上文搜索是shift+右键 To get more help on these, use 想多知道得话查帮助吧! :help * :help # :help g* :help g# :help :help My del.icio.us Tags

由vi和emacs的圣战想

vi抑或Emacs,这是个问题。
对于国外的geek来说,这个问题引发了一次次口诛笔伐,可谓geek圣战。不经意间发现了这样几片文章:
或许对大多数人会说“有什么好争的,编辑器 Notepad就够了,许多IDE中自带的编辑器就够了嘛”;一如浏览器ie就够了,大不了用Maxthon嘛。其中暴露出来的是一种及其恶劣的惰性,懒惰是一种美德,而精致的懒惰或许就是另外的一种境界了。
很多的时候,如同布道者一样苦口婆心介绍,如同传教士一样推广,得到怕麻烦之类的反映亦已习以为常。
所谓人性化、科技以人为本原是广告自我标榜得字汇,易用性、用户习惯是商家产品设计的目标,如今确成为各色人等的人生信条。哪怕是牺牲暂时的适应来获得长久的快捷。对于用户来说,这,的确是个台阶。

希望自己能够成为精致的懒惰的强迫症,偏执狂患者

My del.icio.us Tags:vi,emacs
Technorati Tags: ,

好想一起去旅行

有一什么乐队来着?对,叫星期三的旅行吧?赝品MazzyStar,赝的有点多的那种,不过名字这会听来极为受用。

她在旅行,一个人,为了那个12年前许诺,经历了进15个小时历史上罕见的铁路晚点,出发了……

好想一起去旅行。

其实我们一直都是在旅行,当然不是空间上的那种旅行。因为我们不是叮当,所以这种非空间旅行没有双程票,只是单行道,且不知道目的地,不定到哪就是终点了;没法停,一旦停就是永久的停了;路上及其容易被沿途的风光、旅途的疲劳所淹没,忘记自己是谁,在干吗,一迷糊就一位自己是上帝在天堂巡游要么就是绑老虎凳上嘴里灌了辣椒水的严刑拷打宁死不屈的共产党。其实就一旅客旅行嘛。切

真的,好想一起去旅行。随便什么地,一起就行



Technorati Tags:

2006/01/17

踏上归途

东西还没有收拾好

归心似箭……

一年了吧要有

继续加油

2006/01/15

VIM TIP4

VimTip 4: Any word completion
#自动拼写补齐 ;谁能想想中文的输入补齐?×_×

Either when programming or writing, I tend to have some identifiers or words that I use all the time.
#在写字或编程的时候,总想弄点我总用的标识符来省事;懒惰是灵感的源泉!

By sheer accident, I noticed the 'ctrl-n' command, that will attempt to complete the word under the cursor.
#撞大运后发现 ctrl-n 是在自动补齐
Hit it once, and it will try to complete it with the first match in the current file.
#一次一个
If there is no match, it will (at least in the case of C code) search through all files included from the current one.
#若没有的话,在C 语言的环境下,它将会补齐库的名字
Repeated invocations#符咒。哇,魔法耶 will cycle through all found matches.
#重复ctrl-n 会循环来补齐

VIM TIP3


VimTip 3: use vim to quickly compile java files
#快速编译java

For a number of years I used vim on an SGI box.
#老外的电脑品种那叫个多啊,这里的SGI box也是其中的一种
When I left my job at SGI I went to a company that developed on PCs.
#PC基本上是大白菜级别的玩意
For 2 years I used IDEs. I was unhappy. I was frustrated. #失落,挫败,怎么还没记住这词啊?
I couldn't figure out why. (Beyond my machine crashing twice a day.)
#大白菜老是要坏,整的特郁闷
Finally I upgraded to windows 2000 (kind of stable!) and started using vim as an IDE. All was good.
#还好,用了稳定的win2000。译者注:m$里算是稳定的win2000,艾,帮他加个
is how you use vim to compile your java:
#配置开发java的环境
1.While I'm sure this works with javac, javac is slow slow slow. So download the Jikes complier first. (Jikes is from ibm, search on google for jikes and you will find it..available on most platforms.)
#javac太烂了,用ibm的jikes吧~
2.Add the following to your vimrc:
set makeprg=jikes -nowarn -Xstdout +E
set errorformat=%f:%l:%c:%*\d:%*\d:%*\s%m
#加上边两行进vimrc
3. When you are editing a java file type :make and it will compile the current file and jump you to the first error in the file (if any). Read ":help quickfix" for how to move between errors.
#当你编辑一个java文件时,:make 会编译当前文件,并且跳转到第一个错误的地方。想知道怎#么在错误中跳来跳去嘛?看:help quicktext
To setup your classpath environment either launch gvim from a shell that has your classpath/path setup or use the "let" command to configure it in your vimrc.
#设定classpath环境……

其实java俺不懂,有空汇报一下我的python在vim中的设定


2006/01/14

VIM TIP2

VimTip 2: easy edit of files in the same directory #如何方便的编辑相同文件夹下的文件 It was often frustrating #挫败 when I would open a file deep in the code tree and then realize I wanted to open another file in that same directory. #如果这样的话的确很烦 Douglas Potts taught me a nice way to do this. Add the following snipit to your vimrc: #Douglas高手指点说: " Edit another file in the same directory as the current file " uses expression to extract path from current file's path " (thanks Douglas Potts) if has("unix") map ,e :e . "/" />else map ,e :e . "\" />endif #在配置文件里加这么一段 Then when you type ,e in normal mode you can use tab to complete to the file. You can also expand this to allow for spitting, etc. Very very nice. #当你敲“,e”的时候,就可以用Tab来选你想编辑的文章咯 p.s. 为什么不用类似filetree或者winmanager这样的plugin呢?方便的很啊!另外vim官方网站本条tip下的评论还是有点意思的~感兴趣自己刨哈!

VIM TIP1

VimTip 1: the super star When a discussion started about learning vim on the vim list Juergen Salk mentioned the "*" key as something that he wished he had know earlier. When I read the mail I had to go help on what the heck the "*" did. I also wish I had known earlier... “菊花”键是很有用的,老外说话好费劲啊~中国四个字足以:相见恨晚 Using the "*" key while in normal mode searches for the word under the cursor. “菊花”是查找光标下相同单词用的~ If that doesn't save you a lot of typing, I don't know what will. 如果这样都不能减少你的录入的话,我真不知道什么会了~哈哈,似乎用虚拟语态的话更有感情一些哦

2006/01/13

每日一踢 VIM TIP0

VimTip 0: downloading Vim tips If you are reading this in a help window, then you have probably already installed the "Tip of the Day" script, totd.vim . Congratulations! You can now replace this skeleton#学单词啊学单词:骨架,框架 file with a real vimtips.txt file downloaded from #废话半天的意思就是 鼓励一下! http://vim.sourceforge.net/tip_download.php If you have not yet installed the totd.vim plugin #可能嘛? check that it is in the plugin/ directory. (This file should be in plugin/vimtips/ .) #继续做广告 Then either wait until the next time you start up vim, or source the plugin and get a tip: :runtime plugin/totd.vim :TipOfTheDay (The usual abbreviation rules apply: you can probably just use :Tip .) This file should then show up in a help window #找踢有很多中办法,:Tip,:TipOfTheDay,:runtime plugin/totd.vim

2006/01/05

不可思议

成都的天空竟然在飘雪……
瑞雪兆丰年啊
we will be lucky