Friday, March 20, 2009

VimIM 微软双拼码表



下载

昨天试用了一下 VimIM, 发现没有双拼, 所以就自己作了一个,根据fcitx的全拼码表,用脚本正则替换一下,就成了双拼的了:) 用的微软双拼方案,下载地址


2009 年 三月 29 号 星期日 更新:
此双拼码表已被"招安": 官方下载



使用

具体使用可以google vimim 看看. 如果写程序 , 只是偶尔用中文,可以使用One Key , 不用切换输入法 , 是我个人认为 VimIM 最大的亮点, 我把 <C-^> map 成了<D-u> ,就是mac下的⌘-U , 大拇指比小拇指更强壮些:D

问题

微软双拼使用';' 作为 'ing'的发音,但是在 VimIM 中不好用,解决方案有两种,改码表或者改vimim.vim :

  1. 改码表 : 将';'替换为'y',如果不习惯键位的改动,可以改vimim.vim
  2. 改vimim.vim

    #1136行, 将 ";" 加入 s:char_valid 中
    let s:char_valid = "[;*.0-9A-Za-z]"


2009 年 三月 29 号 星期日 更新:
昨天刚出炉的VimIM 3.2 已经支持双拼,直接下载最新版和双拼码表既可.

Thursday, March 19, 2009

Vim in Chinese

Vim in Chinese

Problem

  • Textmate 酷炫,一说中文马上瘫痪
  • Vim 经典,讲汉语时不太方便
  • 怎么办?

Solution

Textmate

Vim

  • VimIM -- Vim 内嵌输入法
    • 写此文时,就是用的 VimIM , One key 上字很是方便, 不用切换输入法对于 Vim 这样的 modal editor 来说太重要了, Vim fans 应该都有所体会:)

Monday, January 5, 2009

FileSystem Based Wiki

Building a filesystem based wiki

What

  • The idea of building a filesystem-based wiki was inspired by AndyGlew from http://c2.com/cgi/wiki/?FilesystemBasedWiki
  • The main feature about filesystem-based wiki:
    1. No Web server
    2. No Database
    3. Cross-platform
    4. Portable
    5. Raw pages stored as individual text files
    6. Simple wiki markup

How

  • Building a filesystem-based wiki
    1. Store raw pages as plain text files.
    2. Since each wiki page is just a text file,searching,editing,organizing will be easy in most operation systems.
      1. Search wiki content using os built-in search engine or any desktop search engine.
      2. Edit wiki page using os built-in editor or any professional text editor.
      3. Organize wiki pages in folders,or other third-party tools.
    3. Only problem is viewing,the browser will not render wiki markup automatically.
      • For that reason,I wrote a firefox addon called Wiki4X for wiki->html need.
    4. With ViewSourceWith addon,editing is much more convenient.
    5. With portable firefox,filesystem-based wiki will be portable too.
    6. It's not totally ubiquity, but it just works for me.

Why

  • Lightweight
    • For personal use, database+webserver solution is too heavy.
    • It's portable,cross-platform , it can live in a USB flash drive.
  • Extensibility
    • Third-party tools that work for text file will work for filesystem-based wiki too,such as:
      • Version Control tools like svn,cvs,git, way for collaboration.
      • Converter Tools/Scripts,raw pages will be able to publish as html pages.
      • Imaginative play, extensibility will be infinite